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 |
---|---|---|---|---|---|---|
get the vector objects to hide, added via laravelpostgres module | public function gethiddenObjLow()
{
return self::accessPgArray($this->hiddenbuildingsLow);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHideInList() {}",
"static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}",
"public function listVisuels()\n {\n $result = DB::table('panneauxes')\n ->join('clients', 'clients.code', '=', 'panneauxes.idclient')\n ->join('campagnes', 'campagnes.code', '=', 'panneauxes.idcampagne')\n ->join('coms', 'coms.id', '=', 'panneauxes.idcommune')\n ->join('regies', 'regies.code', '=', 'panneauxes.idregie')\n ->select(\n 'panneauxes.idPanneaux as id',\n 'panneauxes.emplacement as emplacement',\n 'panneauxes.partdevoix as partdevoix',\n 'panneauxes.latittude as latitude',\n 'panneauxes.longitude',\n 'panneauxes.image',\n 'clients.Raison_Soc as client',\n 'campagnes.libelle as campagne',\n 'coms.name as commune',\n 'regies.Raison_Soc as regie'\n )\n ->get();\n return $result;\n }",
"public function objects() {\n \t// return call_user_func_array($this->belongsToMany('Object')->withPivot, static::$pivotColumns);\n return $this->belongsToMany('Object')\n ->withPivot('subdivision', 'time', 'place', 'form');\n }",
"public function videos()\n {\n return $this->morphedByMany('App\\Video', 'taggable');\n }",
"protected function getHiddenFacets(): array {\n return [];\n }",
"public static function hidden()\n {\n return [];\n }",
"public function getRemovedObjects() {}",
"public function dtoContentVectorsProvider()\n {\n return [\n [\"pacnem:hall-of-famer\", 150, \"pacnem\", \"hall-of-famer\"],\n [\"nem:xem\", 1500000, \"nem\", \"xem\"],\n [\"my.awesome.subs:mosaics\", 1000, \"my.awesome.subs\", \"mosaics\"],\n [\"special:mos@ic\", 0, \"special\", \"mos@ic\"],\n [\"grégory.saive:identity\", 1, \"grégory.saive\", \"identity\"],\n ];\n }",
"public function gethiddenObj()\n {\n return self::accessPgArray($this->hiddenbuildings);\n }",
"public function values(): VectorInterface;",
"public function expose() {\n return get_object_vars($this);\n }",
"public function getVotosNegativos()\n {\n return $this->getVotos()->where(['positivo' => false]);\n }",
"public function index()\n {\n $products = ProductsModel::where('is_deleted', 0)->orderBy('inmr_hash', 'desc')->get();\n return Reference::collection($products);;\n }",
"public function viewAll()\n {\n return $this->product->all();\n \n }",
"protected function addVirtualColumns()\n {\n \n }",
"public function getListeVisiteurs(){\n\t\t$req = \"select * from visiteur order by VIS_MATRICULE\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}",
"function getObjectives() {\n return Engine::send('getObjectives');\n}",
"public function morphClassVectorsProvider()\n {\n return [\n [\"dim:coin\", \\NEM\\Mosaics\\Dim\\Coin::class],\n [\"dim:token\", \\NEM\\Mosaics\\Dim\\Token::class],\n [\"dim:eur\", \\NEM\\Mosaics\\Dim\\Eur::class],\n [\"nemether:nemether\", \\NEM\\Mosaics\\Nemether\\Nemether::class],\n [\"pacnem:cheese\", \\NEM\\Mosaics\\Pacnem\\Cheese::class],\n [\"pacnem:hall-of-famer\", \\NEM\\Mosaics\\Pacnem\\HallOfFamer::class],\n [\"pacnem:heart\", \\NEM\\Mosaics\\Pacnem\\Heart::class],\n [\"pacnem:personal-token\", \\NEM\\Mosaics\\Pacnem\\PersonalToken::class],\n ];\n }",
"public function get_hidden_columns()\n {\n return array();\n }",
"public function get_hidden_columns()\n {\n return array();\n }",
"public function getWithViewDetails(): Collection\n {\n return $this->getBuilder()->withCount('databases')->with('node')->get();\n }",
"public function vols()\n {\n return $this->belongsToMany('App\\Vol', 'reservation_vols', 'num_reservation', 'id_vol');\n\n }",
"public function verValoraciones(){\n\t\t\t$query = array(\"object\"=>$this->object);\n\t\t\t$queryForView = array(\"_id\"=>false, \"valor\"=>true);\n\t\t\treturn $this->bbdd->findCollection($query,$queryForView);\n\t\t}",
"public static function getAllVideo()\n {\n \treturn VedioGallary::all();\n }",
"public function get_hidden_columns()\r\n {\r\n return array();\r\n }",
"public function getTousLesVisiteurs()\n {\n return Visiteur::all();\n }",
"protected function hiddenColumns(): array\n {\n return [];\n }",
"abstract protected function loadExposedObjects();",
"public function imagenes() {\n return $imagenes = ImagenesProducto::where('fk_producto',$this->codigo) -> orderBy('featured','desc') -> get(); //para mostrar las imagenes ordenadas por las destacada\n }",
"public function getAllVisiteurs(){\r\n\t\t$req =\"select * from visiteur where comptable=0\";\r\n\t\t\r\n\t\t$res = PdoGsb::$monPdo->query($req);\r\n\t\t$lesVisiteurs =array();\r\n\t\t$laLigne = $res->fetch();\r\n\t\twhile($laLigne != null)\t{\r\n\t\t\t$selection = $laLigne['id'];\r\n $nom=$laLigne['nom'];\r\n $prenom=$laLigne['prenom'];\r\n\t\t\t$lesVisiteurs[\"$selection\"]=array(\r\n \"id\"=>\"$selection\",\r\n \"nom\"=>\"$nom\",\r\n \"prenom\"=>\"$prenom\"\r\n );\r\n\t\t\t$laLigne = $res->fetch(); \t\t\r\n\t\t}\r\n\t\treturn $lesVisiteurs;\r\n\t}",
"public function getFeaturesList(){\n return $this->_get(1);\n }",
"static function getAllVoitures(){\r\n $req = Model1::$pdo->query('SELECT * From voiture');\r\n $req->setFetchMode(PDO::FETCH_CLASS,\"ModelVoiture\");\r\n $tab_voit=$req->fetchall();\r\n return $tab_voit;\r\n }",
"public function getVotos()\n {\n return $this->hasMany(VotoComentario::className(), ['comentario_id' => 'id'])->inverseOf('comentario');\n }",
"public function getInvisibleFlag() {}",
"public function imagenes()\n {\n //\n $productes = Producte::where(\"eliminat\", 0)->get();\n $imatges = Imatge::whereHas('producte', function ($query) {\n $query->where('eliminat', 0);\n })->get();\n return view(\"productos.imatges\", [\"imatges\" => $imatges, \"productes\" => $productes]);\n }",
"function getFlagVideos($id) {\n // Load Flag videos based on logged in user id\n $model = Flag::where('user_id', $id)\n ->leftJoin('admin_videos' , 'flags.video_id' , '=' , 'admin_videos.id')\n ->leftJoin('categories' , 'admin_videos.category_id' , '=' , 'categories.id')\n ->leftJoin('sub_categories' , 'admin_videos.sub_category_id' , '=' , 'sub_categories.id')\n ->where('admin_videos.is_approved' , 1)\n ->where('admin_videos.status' , 1)\n ->pluck('video_id')->toArray();\n // Return array of id's\n return $model;\n}",
"static public function showOnlyNotTargetVisits(){\n $registro = static::leftJoin(\"users\",\"visitors.user_id\",\"=\",\"users.id\")\n ->join('handling_times',\"visitors.handling_time_id\",\"=\",\"handling_times.id\")\n ->join('direction_tickets',\"visitors.direction_ticket_id\",\"=\",\"direction_tickets.id\")\n ->join('directions',\"direction_tickets.direction_id\",\"=\",\"directions.id\")\n ->join('sectors',\"directions.sector_id\",\"=\",\"sectors.id\")\n ->select('visitors.id','first_name','last_name','identification_card','phone','sector','input')\n ->where('output','=',null)\n ->orderBy('visitors.id', 'DESC')\n ->paginate(30);;\n return $registro;\n }",
"public function videPanier()\n {\n $this->CollProduit->vider();\n }",
"public function showcases()\n {\n return $this->morphedByMany(Portfolio::class, 'taggable', 'taxonomy_relationships')->withTimestamps();\n }",
"public function index()\n {\n $icons = Product::where('type','icon')->get(); \n $photos = Product::where('type','photo')->get(); \n $vectors = Product::where('type','vector')->get(); \n return view('home', compact('icons'))->withData(null);\n // return view('home');\n }",
"public function get_hidden_columns() {\n\t\treturn array();\n\t}",
"public function getViewedProduct();",
"public function views()\n {\n// $database = $cg->getConnection()->getDatabaseName();\n// return $this->hasMany('App\\Models\\Craiglorious\\View', $database.'.views', 'role_id','view_id');\n //can not do this as the system // or should i?\n //return $this->hasMany('App\\Models\\Craiglorious\\View');\n }",
"public function getVotosPositivos()\n {\n return $this->getVotos()->where(['positivo' => true]);\n }",
"public function getVirtualProducts()\n\t{\n\t\t$sql = '\n\t\t\tSELECT `product_id`, `download_hash`, `download_deadline`\n\t\t\tFROM `'._DB_PREFIX_.'order_detail` od\n\t\t\tWHERE od.`id_order` = '.(int)($this->id).'\n\t\t\t\tAND `download_hash` <> \\'\\'';\n\t\treturn Db::getInstance()->ExecuteS($sql);\n\t}",
"public function get_hidden_columns()\n\t{\n\t\treturn array();\n\t}",
"public function vxvAction()\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 getHiddenFields()\n {\n return [\n 'createdAt',\n 'updatedAt',\n 'version',\n 'locale'\n ];\n }",
"public function seekDerives () {\n\t\tif(Product::DERIVE_TYPE==\"set\"){\n\t\t\t$table = \"derives_set\";\n\t\t}\n\t\telseif(Product::DERIVE_TYPE==\"constant\"){\n\t\t\t$table = \"derives\";\n\t\t}\n\t\t$this->sql = \"SELECT * FROM $table \";\n\t\t$this->db = UConnect::doConnect();\n\t\t$q=$this->db->prepare($this->sql);\n\t\t$q->execute();\n\t\t$d = $q->fetchAll(PDO::FETCH_ASSOC);\n\t\t$this->derives = $d;\n\t\treturn $this->derives;\n\t}",
"public function index()\n {\n return MedicalObservation::with('vet')->orderBy('date','desc')->get();\n }",
"public function getStandaloneViewers(): array\n {\n $ret = [];\n foreach ($this->getValueViewers() as $key => $viewer) {\n if (!$viewer->isLinkedToDbColumn()) {\n $ret[$key] = $viewer;\n }\n }\n return $ret;\n }",
"public function be_hidden() {\n return $this->belongsToMany('App\\Topic', 'hide_topic', 'topic_id', 'user_id')->withTimestamps();\n }",
"public function getVotos()\n {\n return $this->hasMany(Voto::className(), ['usuario_id' => 'id'])->inverseOf('usuario');\n }",
"public function index()\n {\n /*$itemPool = ItemPoolName::pluck('CodeName');*/\n $new_items = RefObjCommon::join('_ItemPoolName', '_RefObjCommon.CodeName128', '!=', '_ItemPoolName.CodeName')\n ->where('CodeName128', '!=', 'DUMMY_OBJECT')\n ->get();\n dd($new_items);\n }",
"public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }",
"public function get_visibility()\n {\n }",
"public function index()\n {\n //\n return Viaje::all();\n }",
"function getAllOptHide($userName) { \t \t\n $sql = \"call spGetOptHide('$userName',@out_status);\";\n $rs = $this->db->Execute($sql);\n \t$data = $rs->getArray();\n\t\t$rs->Close();\n \treturn $data; \n }",
"function getAllOptHide($userName) { \t \t\n $sql = \"call spGetOptHide('$userName',@out_status);\";\n $rs = $this->db->Execute($sql);\n \t$data = $rs->getArray();\n\t\t$rs->Close();\n \treturn $data; \n }",
"public function invmovdets()\n {\n return $this->hasMany(InvMovDet::class);\n }",
"public function villes()\n {\n return $this->belongsToMany('App\\Models\\Ville', 'sl_produits_villes'); //->whereNull('sl_produits_villes.deleted_at'); // le create_at, updated_at, delete_at ne sont pas stockées sur table pivot.\n }",
"public function get_instances() {\n\n\n }",
"public function index()\n {\n return $this->pedido->with(\n 'categoria',\n 'servico',\n 'envios',\n 'envios.prestador',\n 'interessados',\n 'interessados.prestador',\n 'situacao'\n )->where('ativo',1)->orderBy('id','DESC')->get();\n }",
"public function getDefinitionVectorsProvider()\n {\n return [\n [\"dim:coin\", \\NEM\\Mosaics\\Dim\\Coin::class],\n [\"dim:token\", \\NEM\\Mosaics\\Dim\\Token::class],\n [\"dim:eur\", \\NEM\\Mosaics\\Dim\\Eur::class],\n [\"nemether:nemether\", \\NEM\\Mosaics\\Nemether\\Nemether::class],\n [\"pacnem:cheese\", \\NEM\\Mosaics\\Pacnem\\Cheese::class],\n [\"pacnem:hall-of-famer\", \\NEM\\Mosaics\\Pacnem\\HallOfFamer::class],\n [\"pacnem:heart\", \\NEM\\Mosaics\\Pacnem\\Heart::class],\n [\"pacnem:personal-token\", \\NEM\\Mosaics\\Pacnem\\PersonalToken::class],\n ];\n }",
"public function VerDetallesVentas()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM detalleventas LEFT JOIN categorias ON detalleventas.codcategoria = categorias.codcategoria WHERE detalleventas.codventa = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET[\"codventa\"])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\n\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t{\n\t\t\t$this->p[]=$row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}",
"public function videos()\n {\n \treturn $this->belongsToMany( Video::class );\n }",
"function getAllOptHide($userName) { \t \t\n $sql = \"call spGetOptHide('$userName',@out_status);\";\n $rs = $this->db->Execute($sql);\n \t$data = $rs->getArray(); \n\t\t$rs->Close();\n \treturn $data; \n }",
"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 keys(): VectorInterface;",
"function get_votos() {\n\t\t$condicion = array(\n\t\t\t'IdUsuario' => $this->session->userdata('id_usuario'),\n\t\t);\n\t\t\n\t\t$consulta = $this->db->get_where( 'pa_capacitacion_cursos_votos', $condicion ); \n\t\t\n\t\treturn $consulta;\n\t}",
"public function vxcAction()\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 indexProducts() {\n // $prods = Product::all() -> where('deleted', false);\n //secondo modo (ORM Eloquent)\n //$prods = Product::where('deleted', false) -> get();\n // terzo modo (Query builder)\n $prods = DB::table('products') -> where('deleted', false) -> get();\n return view('products.index', compact('prods'));\n }",
"public function index()\n {\n return ThreeDimensionalObject::all();\n }",
"public function index()\n {\n $barters = \\App\\Product::with('barters')->has('barters', '>', 0)->get();\n\n return $barters;\n }",
"public function get_for_admin()\n\t{\n\t\t$return_array = array();\n\t\t$r = $this->where('deleted',NULL)->get_all();\n\n\t\tforeach($r as $key=>$value)\n\t\t{\n\t\t\t$return_array[$value->id]=$value->name;\n\t\t}\n\n\t\treturn $return_array;\n\n\t}",
"public function initVenueratings()\n\t{\n\t\t$this->collVenueratings = new PropelObjectCollection();\n\t\t$this->collVenueratings->setModel('Venuerating');\n\t}",
"public function morphologys2()\n {\n return $this->belongsToMany('App\\SkeletalElement', 'se_morphology', 'morphology_id', 'se_id')\n ->withoutGlobalScope(ProjectScope::class)\n ->withPivot('se_id', 'morphology_id', 'org_id', 'project_id', 'created_by', 'updated_by')\n ->withTimestamps();\n }",
"public function index()\n {\n return Vaccination::all();\n }",
"public function vars()\n {\n \n return new ArrayWrapper(get_object_vars($this->object));\n \n }",
"public function getEav() {\n return $this->objectManager->get ( 'Magento\\Eav\\Model\\Entity\\Attribute' )->getCollection ();\n }",
"public function filterVisible(): self;",
"public function dvehicles(){\n\n\t\t\t$vehicles = DB::table('logistics_vehicles')\n\t\t\t\t->join('vehicle_types','logistics_vehicles.type', '=', 'vehicle_types.id')\n\t\t\t\t//->where('logistics_vehicles.tenant_id', Auth::user()->tenant_id)\n\t\t\t\t->where('logistics_vehicles.status', '=', 0)\n\t\t\t\t->orderBy('logistics_vehicles.status', 'DESC')\n\t\t\t\t->orderBy('logistics_vehicles.id', 'DESC')\n\t\t\t\t->get();\n\n\t\t\treturn view('backend.logistics.vehicles', ['vehicles' => $vehicles]);\n\t\t}",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function getVirtualColumns()\n {\n return $this->virtualColumns;\n }",
"public function videos()\n {\n \treturn $this->belongsToMany('App\\Video')->withTimeStamps();\n }",
"public function getSavLibraryMvcColumns(): array\n {\n return $this->savLibraryMvcColumns;\n }",
"public function get_hidden_columns()\r\n\t{\r\n\t\treturn [ ];\r\n\t}",
"public function getHiddens()\n {\n return $this->filterDatas(function ($data) {\n return isset($data->hidden) && $data->hidden;\n });\n }",
"public function listar(){\n $rol= $this->db->select('*')->from('versions')->join('plans', 'plans.PLAN_PK = versions.VRSN_FK_plans');\n return $rol->get();\n }",
"public function videos()\n {\n return $this->hasManyThrough('App\\Video', 'App\\Modulo');\n }"
] | [
"0.56201726",
"0.56047946",
"0.5516188",
"0.5451353",
"0.5441552",
"0.5438562",
"0.5432635",
"0.5421956",
"0.53526276",
"0.5343734",
"0.534103",
"0.5330038",
"0.5254642",
"0.524294",
"0.52314895",
"0.52264404",
"0.5212517",
"0.5211298",
"0.5204854",
"0.51964754",
"0.51964754",
"0.5188861",
"0.5178263",
"0.51623464",
"0.51611555",
"0.5156441",
"0.5148474",
"0.51467174",
"0.51413953",
"0.51252",
"0.5121525",
"0.5100844",
"0.5099821",
"0.50984454",
"0.50915897",
"0.50891143",
"0.50881934",
"0.50784546",
"0.5063583",
"0.50520957",
"0.5045658",
"0.5044847",
"0.5035677",
"0.5018428",
"0.5014422",
"0.50141585",
"0.501254",
"0.5010379",
"0.50095487",
"0.50065",
"0.49995264",
"0.49973506",
"0.49971727",
"0.4991099",
"0.49835646",
"0.49826297",
"0.4978317",
"0.49688628",
"0.4967957",
"0.4967957",
"0.49665833",
"0.49640438",
"0.49639028",
"0.4958378",
"0.49582157",
"0.49548462",
"0.49533528",
"0.49523705",
"0.49482772",
"0.49451125",
"0.4943463",
"0.4943044",
"0.49429947",
"0.49382383",
"0.4937463",
"0.4933652",
"0.4931946",
"0.49308497",
"0.49210185",
"0.491893",
"0.49173188",
"0.49169606",
"0.49165362",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.4915889",
"0.49155757",
"0.4910114",
"0.49060604",
"0.48963502",
"0.48950303",
"0.48921266"
] | 0.0 | -1 |
Retorna a lista de arquivos Javascript | public static function getJs() {
return self::get('_js', array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFiles ();",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$templateMgr->assign('files', $this->listar());\n\t\t$templateMgr->display('files/files.tpl');\n\t}",
"function get_list_of_files() {\n $result = $this->pdo->query('SELECT * FROM files ORDER BY filename ASC');\n return $result;\n }",
"public function getFiles(): array;",
"function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}",
"public function files();",
"public function files();",
"public function files();",
"protected function getAllFiles() {\n $sql = \"SELECT * FROM satdatameta\";\n $stmt = $this->connect()->prepare($sql);\n $stmt->execute();\n $results = $stmt->fetchAll();\n return $results;\n }",
"function _generateFilesList() {\n return array();\n }",
"function get_js_files_array();",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }",
"public function getFiles() {}",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/google_search.php',\n 'lang_custom/EN/google_search.ini',\n 'sources_custom/blocks/side_google_search.php',\n 'sources_custom/blocks/main_google_results.php',\n 'themes/default/templates_custom/BLOCK_SIDE_GOOGLE_SEARCH.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_GOOGLE_SEARCH_RESULTS.tpl',\n 'themes/default/css_custom/google_search.css',\n 'pages/comcode_custom/EN/_google_search.txt',\n );\n }",
"public function getFilesList() : array {\n $sqlQuery = 'SELECT * FROM files';\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->execute();\n\n $dataSet = [];\n while ($row = $statement->fetch()) {\n $dataSet[] = new File($row);\n }\n return $dataSet;\n }",
"public function listApplicationFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"config/main.js\"\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->applicationPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\", \"compiled.js\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}",
"protected function getFileList()\n\t\t{\n\t\t\t$dirname=opendir($this->ruta);\n\t\t\t$files=scandir($this->ruta);\n\t\t\tclosedir ($dirname);\t\n\t\t\t\n\t\t\treturn $files;\t\t\n\t\t}",
"public function getFileNames();",
"public static function getFiles()\n\t{\n\t\t$result = Array();\n\t\t$files = sfCore::$db->query(\"SELECT * FROM `swoosh_file_storage`\")->asObjects();\n\t\tforeach($files as $file){\n\t\t\t$sfFileStorageItem = sfCore::make('sfFileStorageItem');\n\t\t\t$sfFileStorageItem->loadFromObject($file);\n\t\t\t$result[] = $sfFileStorageItem;\n\t\t}\n\t\treturn $result;\n\t}",
"public function getOtherFiles(): array;",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/geshi.php',\n 'sources_custom/geshi/.htaccess',\n 'sources_custom/geshi/index.html',\n 'sources_custom/geshi/4cs.php',\n 'sources_custom/geshi/abap.php',\n 'sources_custom/geshi/actionscript.php',\n 'sources_custom/geshi/actionscript3.php',\n 'sources_custom/geshi/ada.php',\n 'sources_custom/geshi/apache.php',\n 'sources_custom/geshi/applescript.php',\n 'sources_custom/geshi/apt_sources.php',\n 'sources_custom/geshi/asm.php',\n 'sources_custom/geshi/asp.php',\n 'sources_custom/geshi/autohotkey.php',\n 'sources_custom/geshi/autoit.php',\n 'sources_custom/geshi/avisynth.php',\n 'sources_custom/geshi/awk.php',\n 'sources_custom/geshi/bash.php',\n 'sources_custom/geshi/basic4gl.php',\n 'sources_custom/geshi/bf.php',\n 'sources_custom/geshi/bibtex.php',\n 'sources_custom/geshi/blitzbasic.php',\n 'sources_custom/geshi/bnf.php',\n 'sources_custom/geshi/boo.php',\n 'sources_custom/geshi/c.php',\n 'sources_custom/geshi/c_mac.php',\n 'sources_custom/geshi/caddcl.php',\n 'sources_custom/geshi/cadlisp.php',\n 'sources_custom/geshi/cfdg.php',\n 'sources_custom/geshi/cfm.php',\n 'sources_custom/geshi/cil.php',\n 'sources_custom/geshi/clojure.php',\n 'sources_custom/geshi/cmake.php',\n 'sources_custom/geshi/cobol.php',\n 'sources_custom/geshi/cpp-qt.php',\n 'sources_custom/geshi/cpp.php',\n 'sources_custom/geshi/csharp.php',\n 'sources_custom/geshi/css.php',\n 'sources_custom/geshi/cuesheet.php',\n 'sources_custom/geshi/d.php',\n 'sources_custom/geshi/dcs.php',\n 'sources_custom/geshi/delphi.php',\n 'sources_custom/geshi/diff.php',\n 'sources_custom/geshi/div.php',\n 'sources_custom/geshi/dos.php',\n 'sources_custom/geshi/dot.php',\n 'sources_custom/geshi/eiffel.php',\n 'sources_custom/geshi/email.php',\n 'sources_custom/geshi/erlang.php',\n 'sources_custom/geshi/fo.php',\n 'sources_custom/geshi/fortran.php',\n 'sources_custom/geshi/freebasic.php',\n 'sources_custom/geshi/fsharp.php',\n 'sources_custom/geshi/gambas.php',\n 'sources_custom/geshi/gdb.php',\n 'sources_custom/geshi/genero.php',\n 'sources_custom/geshi/gettext.php',\n 'sources_custom/geshi/glsl.php',\n 'sources_custom/geshi/gml.php',\n 'sources_custom/geshi/gnuplot.php',\n 'sources_custom/geshi/groovy.php',\n 'sources_custom/geshi/haskell.php',\n 'sources_custom/geshi/hq9plus.php',\n 'sources_custom/geshi/html4strict.php',\n 'sources_custom/geshi/idl.php',\n 'sources_custom/geshi/ini.php',\n 'sources_custom/geshi/inno.php',\n 'sources_custom/geshi/intercal.php',\n 'sources_custom/geshi/io.php',\n 'sources_custom/geshi/java.php',\n 'sources_custom/geshi/java5.php',\n 'sources_custom/geshi/javascript.php',\n 'sources_custom/geshi/jquery.php',\n 'sources_custom/geshi/kixtart.php',\n 'sources_custom/geshi/klonec.php',\n 'sources_custom/geshi/klonecpp.php',\n 'sources_custom/geshi/latex.php',\n 'sources_custom/geshi/lisp.php',\n 'sources_custom/geshi/locobasic.php',\n 'sources_custom/geshi/logtalk.php',\n 'sources_custom/geshi/lolcode.php',\n 'sources_custom/geshi/lotusformulas.php',\n 'sources_custom/geshi/lotusscript.php',\n 'sources_custom/geshi/lscript.php',\n 'sources_custom/geshi/lsl2.php',\n 'sources_custom/geshi/lua.php',\n 'sources_custom/geshi/m68k.php',\n 'sources_custom/geshi/make.php',\n 'sources_custom/geshi/mapbasic.php',\n 'sources_custom/geshi/matlab.php',\n 'sources_custom/geshi/mirc.php',\n 'sources_custom/geshi/mmix.php',\n 'sources_custom/geshi/modula3.php',\n 'sources_custom/geshi/mpasm.php',\n 'sources_custom/geshi/mxml.php',\n 'sources_custom/geshi/mysql.php',\n 'sources_custom/geshi/newlisp.php',\n 'sources_custom/geshi/nsis.php',\n 'sources_custom/geshi/oberon2.php',\n 'sources_custom/geshi/objc.php',\n 'sources_custom/geshi/ocaml-brief.php',\n 'sources_custom/geshi/ocaml.php',\n 'sources_custom/geshi/oobas.php',\n 'sources_custom/geshi/oracle11.php',\n 'sources_custom/geshi/oracle8.php',\n 'sources_custom/geshi/pascal.php',\n 'sources_custom/geshi/per.php',\n 'sources_custom/geshi/perl.php',\n 'sources_custom/geshi/perl6.php',\n 'sources_custom/geshi/php-brief.php',\n 'sources_custom/geshi/php.php',\n 'sources_custom/geshi/pic16.php',\n 'sources_custom/geshi/pike.php',\n 'sources_custom/geshi/pixelbender.php',\n 'sources_custom/geshi/plsql.php',\n 'sources_custom/geshi/povray.php',\n 'sources_custom/geshi/powerbuilder.php',\n 'sources_custom/geshi/powershell.php',\n 'sources_custom/geshi/progress.php',\n 'sources_custom/geshi/prolog.php',\n 'sources_custom/geshi/properties.php',\n 'sources_custom/geshi/providex.php',\n 'sources_custom/geshi/purebasic.php',\n 'sources_custom/geshi/python.php',\n 'sources_custom/geshi/qbasic.php',\n 'sources_custom/geshi/rails.php',\n 'sources_custom/geshi/rebol.php',\n 'sources_custom/geshi/reg.php',\n 'sources_custom/geshi/robots.php',\n 'sources_custom/geshi/rsplus.php',\n 'sources_custom/geshi/ruby.php',\n 'sources_custom/geshi/sas.php',\n 'sources_custom/geshi/scala.php',\n 'sources_custom/geshi/scheme.php',\n 'sources_custom/geshi/scilab.php',\n 'sources_custom/geshi/sdlbasic.php',\n 'sources_custom/geshi/smalltalk.php',\n 'sources_custom/geshi/smarty.php',\n 'sources_custom/geshi/sql.php',\n 'sources_custom/geshi/systemverilog.php',\n 'sources_custom/geshi/tcl.php',\n 'sources_custom/geshi/teraterm.php',\n 'sources_custom/geshi/text.php',\n 'sources_custom/geshi/thinbasic.php',\n 'sources_custom/geshi/tsql.php',\n 'sources_custom/geshi/typoscript.php',\n 'sources_custom/geshi/vb.php',\n 'sources_custom/geshi/vbnet.php',\n 'sources_custom/geshi/verilog.php',\n 'sources_custom/geshi/vhdl.php',\n 'sources_custom/geshi/vim.php',\n 'sources_custom/geshi/visualfoxpro.php',\n 'sources_custom/geshi/visualprolog.php',\n 'sources_custom/geshi/whitespace.php',\n 'sources_custom/geshi/whois.php',\n 'sources_custom/geshi/winbatch.php',\n 'sources_custom/geshi/xml.php',\n 'sources_custom/geshi/xorg_conf.php',\n 'sources_custom/geshi/xpp.php',\n 'sources_custom/geshi/z80.php',\n 'sources_custom/geshi.php',\n 'sources_custom/geshi/.gitignore',\n 'sources_custom/geshi/6502acme.php',\n 'sources_custom/geshi/6502kickass.php',\n 'sources_custom/geshi/6502tasm.php',\n 'sources_custom/geshi/68000devpac.php',\n 'sources_custom/geshi/aimms.php',\n 'sources_custom/geshi/algol68.php',\n 'sources_custom/geshi/arm.php',\n 'sources_custom/geshi/asymptote.php',\n 'sources_custom/geshi/autoconf.php',\n 'sources_custom/geshi/bascomavr.php',\n 'sources_custom/geshi/c_loadrunner.php',\n 'sources_custom/geshi/c_winapi.php',\n 'sources_custom/geshi/chaiscript.php',\n 'sources_custom/geshi/chapel.php',\n 'sources_custom/geshi/coffeescript.php',\n 'sources_custom/geshi/cpp-winapi.php',\n 'sources_custom/geshi/dart.php',\n 'sources_custom/geshi/dcl.php',\n 'sources_custom/geshi/dcpu16.php',\n 'sources_custom/geshi/e.php',\n 'sources_custom/geshi/ecmascript.php',\n 'sources_custom/geshi/epc.php',\n 'sources_custom/geshi/euphoria.php',\n 'sources_custom/geshi/ezt.php',\n 'sources_custom/geshi/f1.php',\n 'sources_custom/geshi/falcon.php',\n 'sources_custom/geshi/freeswitch.php',\n 'sources_custom/geshi/genie.php',\n 'sources_custom/geshi/go.php',\n 'sources_custom/geshi/gwbasic.php',\n 'sources_custom/geshi/haxe.php',\n 'sources_custom/geshi/hicest.php',\n 'sources_custom/geshi/html5.php',\n 'sources_custom/geshi/icon.php',\n 'sources_custom/geshi/ispfpanel.php',\n 'sources_custom/geshi/j.php',\n 'sources_custom/geshi/jcl.php',\n 'sources_custom/geshi/lb.php',\n 'sources_custom/geshi/ldif.php',\n 'sources_custom/geshi/llvm.php',\n 'sources_custom/geshi/magiksf.php',\n 'sources_custom/geshi/modula2.php',\n 'sources_custom/geshi/nagios.php',\n 'sources_custom/geshi/netrexx.php',\n 'sources_custom/geshi/nginx.php',\n 'sources_custom/geshi/nimrod.php',\n 'sources_custom/geshi/objeck.php',\n 'sources_custom/geshi/octave.php',\n 'sources_custom/geshi/oorexx.php',\n 'sources_custom/geshi/oxygene.php',\n 'sources_custom/geshi/oz.php',\n 'sources_custom/geshi/parasail.php',\n 'sources_custom/geshi/parigp.php',\n 'sources_custom/geshi/pcre.php',\n 'sources_custom/geshi/pf.php',\n 'sources_custom/geshi/pli.php',\n 'sources_custom/geshi/postgresql.php',\n 'sources_custom/geshi/postscript.php',\n 'sources_custom/geshi/proftpd.php',\n 'sources_custom/geshi/pycon.php',\n 'sources_custom/geshi/pys60.php',\n 'sources_custom/geshi/q.php',\n 'sources_custom/geshi/qml.php',\n 'sources_custom/geshi/racket.php',\n 'sources_custom/geshi/rbs.php',\n 'sources_custom/geshi/rexx.php',\n 'sources_custom/geshi/rpmspec.php',\n 'sources_custom/geshi/rust.php',\n 'sources_custom/geshi/scl.php',\n 'sources_custom/geshi/spark.php',\n 'sources_custom/geshi/sparql.php',\n 'sources_custom/geshi/standardml.php',\n 'sources_custom/geshi/stonescript.php',\n 'sources_custom/geshi/unicon.php',\n 'sources_custom/geshi/upc.php',\n 'sources_custom/geshi/urbi.php',\n 'sources_custom/geshi/uscript.php',\n 'sources_custom/geshi/vala.php',\n 'sources_custom/geshi/vbscript.php',\n 'sources_custom/geshi/vedit.php',\n 'sources_custom/geshi/xbasic.php',\n 'sources_custom/geshi/yaml.php',\n 'sources_custom/geshi/zxbasic.php',\n );\n }",
"public function findFiles();",
"function getAllFiles() {\n global $pdo;\n $statement = $pdo->prepare('SELECT `sid`, `mime_type`, `name`, `comment` FROM `file`');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n}",
"public function readFilesInFileadmin() {\n $fileArr = $newArr = array();\n\n // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind\n $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/';\n $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path);\n\n $pathCount = strlen($path);\n // deployment-Ordner exkludieren\n foreach ($fileList as $filekey => $filevalue) {\n if (strstr($filevalue, '/fileadmin/deployment') == FALSE) {\n $newArr[$filekey] = substr($filevalue, $pathCount);\n }\n }\n\n return $newArr;\n }",
"public function getFiles()\n\t{\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/purrrr.php',\n 'data_custom/images/lolcats/index.html',\n 'data_custom/images/lolcats/thumbs/index.html',\n 'data_custom/images/lolcats/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/ridiculous_poses_moddles.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/thumbs/ridiculous_poses_moddles.jpg',\n );\n }",
"public function getAllFiles()\n {\n }",
"public function load(): array\n {\n $scripts = [];\n\n foreach ($this->path as $path) {\n // Get files\n foreach ($this->filetypes as $filetype) {\n $scripts[] = glob($path . \"/*.{$filetype}\");\n }\n }\n\n return array_reduce($scripts, 'array_merge', []);\n }",
"private function getFileList()\n {\n\n $count = $this->getFileCount();\n $size = $this->getSize() + 4;\n\n $this->seek(\n $this->offset\n + 18\n + $this->getAliasSize()\n + 4\n + $this->getMetadataSize()\n );\n\n return $this->readFileList($count, $size);\n }",
"public function loadFilesAdmin()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null){\r\n $files = $project->files;\r\n }\r\n return json_encode($files);\r\n }",
"public function list_of_fileuploads() {\n $request = $_GET;\n $result = $this->fileupload_model->load_list_of_fileuploads($request, array());\n $result = getUtfData($result);\n echo json_encode($result);\n exit;\n }",
"public function loadFiles()\n\t{\n\t\t$files = array();\n\t\t\n\t\t$searchPath = $this->getLocalFolder().\"/*.*\";\n\t\t$filesArray = glob($searchPath);\n\t\t\n\t\tforeach($filesArray as $file)\n\t\t{\n\t\t\t$files[] = new File($file);\n\t\t}\n\t\t\n\t\treturn $files;\n\t}",
"public function getFiles()\n {\n echo json_encode($this->galery->getFiles());\n }",
"public function loadFilesLaunch()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('public','clientVendor'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'projectId'=>$id];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public static function getAll_files() {\n $db = DBInit::getInstance();\n\n $statement = $db->prepare(\"SELECT id, file_name, uploaded, user FROM files\");\n $statement->execute();\n\n return $statement->fetchAll();\n }",
"public function getJsFiles() {\n //je krijgt op het einde .. en . terug, deze mag je niet opnemen in je links\n $jsFiles = scandir(\"js\", 1);\n \n return $jsFiles;\n }",
"function getAllDownloadDocuments() {\n global $pdo;\n $statement = $pdo->prepare('SELECT `download`.*, `file`.`mime_type` FROM `download` INNER JOIN `file` ON (`download`.`file` = `file`.`sid`)');\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n}",
"public function getAllFilesRobot() {\n $sql = \"SELECT * FROM archivo_organizado\";\n $result = $this->_db->prepare($sql);\n $result->execute();\n\n if(!is_null($result->errorInfo()[2]))\n return array('error' => $result->errorInfo()[2]);\n else\n return $result->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function getList() {\n\t\treturn Cgn_Module_Manager_File::getListStatic();\n\t}",
"public function ShowFiles() {\n $i = 0;\n if ($handle = opendir($this->filePath)) {\n while (false !== ($file = readdir($handle))) {\n if (($file != '..') && ($file != '.') && ($file != 'Thumbs.db')) {\n $files[$i] = $file;\n $i++;\n }\n }\n closedir($handle);\n }\n return($files);\n }",
"public function files() :array\n {\n $files = DB::query(\"SELECT `ft_filename` AS 'filename', `ft_size` AS 'size' FROM `file_table` WHERE `ft_ut_id` = :u_id ORDER BY `ft_filename` ASC\", array(':u_id'=>$_SESSION['user_id']));\n\n $list = [];\n $i = 0;\n\n foreach($files as $file){\n $list[$i] = array($file['filename'], round($file['size']/1024, 2));\n $i++;\n }\n return $list;\n }",
"public function getFiles() {\n\t\tif ($this->_files === null) {\n\t\t\t$command = 'show --pretty=\"format:\" --name-only '.$this->hash;\n\t\t\tforeach(explode(\"\\n\",$this->branch->repository->run($command)) as $line) {\n\t\t\t\t$this->_files[] = trim($line);\n\t\t\t}\n\t\t}\n\t\treturn $this->_files;\n\t}",
"public function loadFilesProduction()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('vendor','university','designer','writer','attorney','2d'));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/mediaelement.php',\n 'data_custom/mediaelement/flashmediaelement.swf',\n 'data_custom/mediaelement/silverlightmediaelement.xap',\n 'themes/default/css_custom/mediaelementplayer.css',\n 'themes/default/images_custom/mediaelement/background.png',\n 'themes/default/images_custom/mediaelement/bigplay.png',\n 'themes/default/images_custom/mediaelement/bigplay_svg.svg',\n 'themes/default/images_custom/mediaelement/controls.png',\n 'themes/default/images_custom/mediaelement/controls_svg.svg',\n 'themes/default/images_custom/mediaelement/jumpforward.png',\n 'themes/default/images_custom/mediaelement/loading.gif',\n 'themes/default/images_custom/mediaelement/skipback.png',\n 'themes/default/javascript_custom/mediaelement-and-player.js',\n 'themes/default/templates_custom/MEDIA_AUDIO_WEBSAFE.tpl',\n 'themes/default/templates_custom/MEDIA_VIDEO_WEBSAFE.tpl',\n );\n }",
"public function getFiles() {\n return $this->getPartFiles(0);\n }",
"public function getPaths();",
"public function getFileList()\n {\n return array_map(\n function (FileEntry $file) {\n return $file->getFilename();\n },\n $this->pharchive->getFiles()\n );\n }",
"function get_script_list() {\n\t$array = array();\n\n\t$dir = opendir(\"scripts\");\n\tif (!$dir) {\n\t\treturn $array;\n\t}\n\twhile($entry = readdir($dir)) {\n\t\tif ($entry == \".\" || $entry == \"..\") continue;\n\t\t$array[] = $entry;\n\t}\n\tclosedir($dir);\n\treturn $array;\n}",
"public function getConcatenateFiles() {}",
"function listContent()\n\t{\n\t\tif (!$this->isOpen)\n\t\t\treturn false;\n\n\t\t$content = array();\n\n\t\t$i = 0;\n\t\twhile ($curFile = $this->zip->statIndex($i++))\n\t\t\t$content[] = $curFile['name'];\n\t\treturn $content;\n\t}",
"public function readAll()\r\n {\r\n $plugins_dir = $this->basePath.\"/extern/openInviter/plugins\";\r\n $array_file=array();\r\n \r\n $temp=glob(\"{$plugins_dir}/*.php\");\r\n foreach ($temp as $file) {\r\n// echo 'File: '.$file.' - Check: '.str_replace(\"{$plugins_dir}/\",'',$file).\"\\n\";\r\n\r\n if (($file!=\".\") AND ($file!=\"..\") AND (!isset($this->ignoredFiles[str_replace(\"{$plugins_dir}/\",'',$file)]))) {\r\n $array_file[$file]=$file;\r\n }\r\n }\r\n\r\n return $array_file;\r\n }",
"public function getContents()\n {\n $list = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($this->_root)\n );\n $elements = array();\n foreach ($list as $element) {\n if ($this->_include->isIncluded($element)\n && !$this->_ignore->isIgnored($element)) {\n $file = substr($element->getPathname(), strlen($this->_root));\n $elements[$file] = array(\n 'role' => $this->_role->getRole($file),\n 'as' => $this->_install_as->getInstallAs($file, 'Horde_' . basename($this->_root))\n );\n }\n }\n return $elements;\n }",
"protected function getFiles(): array\n {\n return [];\n }",
"public function loadFiles(){\n\n $files = array();\n\n if($this->id == -1 || empty($this->databasePath))\n return $series;\n\n\n $sqlQuery = 'SELECT D.* FROM data D , books B WHERE B.id = D.book AND B.id='.$this->id;\n\n $pdo = new SPDO($this->databasePath);\n foreach ($pdo->query($sqlQuery) as $row)\n $files[] = BookFile::_createFromRow($this->databasePath, $row); \n \n return $files;\n }",
"static function loadFiles()\r\n\t{\r\n\t\t//required files\r\n\t\t\r\n\t\t//load bibliotek\r\n\t\t$paths = array(rp_self.\"lib/\");\r\n\t\t$to_header = array();\r\n\t\tforeach($paths as $path)\r\n\t\t{\r\n\t\t\t$scan = scandir($path);\r\n\t\t\tforeach($scan as $file)\r\n\t\t\t{\r\n\t\t\t\tif(is_file($path.$file))\r\n\t\t\t\t{\r\n\t\t\t\t\t$ext = explode(\".\", $file);\r\n\t\t\t\t\t$ext = $ext[1];\r\n\t\t\t\t\tif($ext == \"php\")\r\n\t\t\t\t\t\trequire_once($path.$file);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//tilføj script tag til header hvis det er javascript\r\n\t\t\t\t\tif($ext == 'js')\r\n\t\t\t\t\t\t$to_header[] = '<script type=\"text/javascript\" src=\"'.$path.$file.'\"></script>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn implode('', $to_header);\r\n\t}",
"protected function _getFiles() {\n\t\t$Directory = new RecursiveDirectoryIterator(BACKUPS);\n\t\t$It = new RecursiveIteratorIterator($Directory);\n\t\t$Regex = new RegexIterator($It, '/dbdump_.*?[\\.sql|\\.gz]$/', RecursiveRegexIterator::GET_MATCH);\n\t\t$files = array();\n\t\tforeach ($Regex as $v) {\n\t\t\t$files[] = $v[0];\n\t\t}\n\t\t$files = array_reverse($files);\n\t\treturn $files;\n\t}",
"function get_list_file_download($params) {\n $sql = \"SELECT a.file_id, b.ref_name \n FROM fa_files a\n INNER JOIN fa_file_reference b ON a.ref_id = b.ref_id\n WHERE data_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }",
"public function loadFilesProject()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('internal','public'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"public function all()\n {\n $dir = public_path() . '/uploads/temp/' . Session::getId() . '/';\n $data = [];\n $mimetypes = new Mimetype;\n if(file_exists($dir)) {\n foreach(scandir($dir) as $file) {\n if(in_array($file, ['.', '..'])) continue;\n $filedata = [];\n $filedata['name'] = $file;\n $filedata['url'] = url('/uploads/temp/' .Session::getId() . '/' .$file);\n $filedata['size'] = File::size($dir . $file);\n $filedata['type'] = $mimetypes->detectByFileExtension(File::extension($file));\n $data[] = $filedata;\n }\n return $data;\n }\n }",
"function getFileList() {\n\tglobal $apiBaseURL; // bad practice in production - fine for this example\n\n\t// use the getURL function to call the URL\n\t$response = getURL($apiBaseURL);\n\t// it returned as JSON so lets decode it\n\t$response = json_decode($response);\n\n\t// return the response\n\treturn($response);\n}",
"private function searchFiles()\n {\n $query = File::whereNull('deleted_at');\n $data = $query->get();\n\n return $data;\n }",
"public function getFiles(): array\n {\n return [$this->file];\n }",
"public function Get(){\n\n // TODO: this is horrible - try to use glob or RecursiveIteratorIterator - no time\n $fileList = [];\n\n if (!is_dir($this->currentPath)) {\n return $fileList;\n }\n\n $files = $this->scanFolder($this->currentPath);\n\n // up one level link\n if ($this->currentPath != $this->rootPath) {\n $fileList[] = array(\n 'file_name' => \"↑\",\n 'directory' => true,\n 'extension' => '',\n 'size' => \"\",\n 'link' => $this->oneLevelUp(),\n );\n }\n\n foreach ($files as $file) {\n if($file == \".\" || $file == \"..\"){\n continue;\n }\n\n if ($this->isDir($file)) {\n $fileList[] = array(\n 'file_name' => $file,\n 'directory' => true,\n 'extension' => 'folder',\n 'size' => \"\",\n 'link' => $this->currentPath . $file,\n );\n } else {\n // filter on the fly\n $ext = $this->fileExtension($file);\n if(!empty($this->extensionFilter)){\n if(!in_array($ext, $this->extensionFilter)){\n continue;\n }\n }\n $fileList[] = [\n 'file_name' => $file,\n 'directory' => false,\n 'extension' => $ext,\n 'size' => $this->fileSize($file),\n 'link' => \"\",\n ];\n\n }\n }\n\n return $fileList;\n }",
"public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }",
"public function get_files()\n {\n }",
"function icedrive_get_files($path)\r\n {\r\n $files = array();\r\n $response = $this->icedrive->request('PROPFIND', $path);\r\n $response = $this->icedrive_response_to_array($response['body']);\r\n foreach ($response['dresponse'] as $file) {\r\n $files[] = $file['dhref'];\r\n }\r\n return $files;\r\n }",
"public function getFileStorages() {}",
"function src_inc_list_js(string $assets_url, array $files) : string {\n $source = \"\";\n\n //Process the list of files\n foreach($files as $file){\n\n if(is_array($file))\n $file = $file[\"path\"];\n\n $source .= src_inc_js($assets_url.$file).\"\\n\\t\\t\";\n }\n\n return $source;\n}",
"function get_list_of_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC');\n return $result;\n }",
"protected function getAvailableFiles() {\n\t\t$sql = \"SELECT\tfilename\n\t\t\tFROM\twcf\".WCF_N.'_'.$this->tableName.\"\n\t\t\tWHERE\tpackageID = \".$this->installation->getPackageID();\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\n\t\t$availableFiles = array();\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$availableFiles[] = $row['filename'];\n\t\t}\n\t\t\n\t\treturn $availableFiles;\n\t}",
"public function getList($path);",
"public function listInscriptionFiles(){\n $req = $this->db->query('SELECT file_url, title_file FROM admin_files');\n $req->setFetchMode(\\PDO::FETCH_CLASS | \\PDO::FETCH_PROPS_LATE, \n 'taekwondo\\model\\FileAdmin');\n return $req;\n }",
"public function list_owned_files() {\n $stmt = $this->pdo->prepare('select filename from file where user_id = :id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, $f['filename']);\n }\n return $result;\n }",
"static function getList()\n {\n $out = array();\n\n if ($dh = opendir(__DIR__ . '/../img/')) {\n while (($file = readdir($dh)) !== false) {\n if (substr($file, -4) === '.jpg') {\n $filename = substr($file, 0, -4);\n $out[$filename] = realpath(__DIR__ . '/../img/' . $file);\n }\n }\n\n closedir($dh);\n }\n\n return $out;\n }",
"public function getLocalJavascripts($withNULL = false)\n\t{\n\t\t$_dir = sfConfig::get('sf_web_dir').'/js';\n\t\t\n\t\t$files = array();\n\t\t\n\t\tif( $withNULL )\n\t\t{\n\t\t\t$files[NULL] = NULL;\n\t\t}\n\t\t\n\t\t$handle = opendir($_dir);\n\t\t\n\t\twhile (false !== ($file = readdir($handle))) {\n\t if($file == '.' or $file == '..' )\n\t {\n\t \tcontinue;\n\t }\n\t $files[$file] = $file;\n\t }\n \t\n\t closedir($handle);\n\t return $files; \n\t}",
"public function getFiles(){\r\n $fids = Input::get('FILES');\r\n $files = array();\r\n foreach($fids as $fid){\r\n $file = UploadedFiles::find($fid);\r\n if($file == null)\r\n return -1;\r\n $files[]=$file;\r\n }\r\n return json_encode($files);\r\n }",
"public function getFiles()\n {\n return R::findAll('upload');\n }",
"protected function obtenerListadoDeArchivos(){\n $directorio = storage_path() . '/app/backup';\n // Array en el que obtendremos los resultados\n $res = array();\n\n // Agregamos la barra invertida al final en caso de que no exista\n if(substr($directorio, -1) != \"/\") $directorio .= \"/\";\n\n // Creamos un puntero al directorio y obtenemos el listado de archivos\n $dir = @dir($directorio) or die(\"getFileList: Error abriendo el directorio $directorio para leerlo\");\n while (($archivo = $dir->read()) !== false) {\n // Obviamos los archivos ocultos\n if($archivo[0] == \".\") continue;\n if(is_dir($directorio . $archivo)) {\n $res[] = array(\n \"nombre\" => $archivo,\n \"tamaño\" => 0,\n \"modificado\" => filemtime($directorio . $archivo)\n );\n } else if (is_readable($directorio . $archivo)) {\n $fileTime = Carbon::now()->timestamp(filemtime($directorio . $archivo));\n $res[] = array(\n \"nombre\" => $archivo,\n \"tamaño\" => $this->formatBytes(filesize($directorio . $archivo)),\n //\"modificado\" => date(\"F d Y H:i:s.\",filemtime($directorio . $archivo))\n //\"modificado\" => filemtime($directorio . $archivo)->diffForHuman()\n \"modificado\" => $fileTime->diffForHumans(),\n );\n }\n }\n $dir->close();\n return $res;\n }",
"function fetchFileList() {\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"SELECT\n id,\n path\n FROM \".$db_table_prefix.\"filelist\";\n\n $stmt = $db->prepare($query);\n\n if (!$stmt->execute()){\n // Error\n return false;\n }\n\n while ($r = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $i = $r['id'];\n $results[$i] = $r['path'];\n }\n $stmt = null;\n\n return $results;\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}",
"public function fileList()\n {\n return array_values(array_diff(scandir($this->location), ['.', '..']));\n }",
"public function getDocs()\n {\n\n\t\t$rootPath = 'modules/Mediasharex/docs';\n $docs = FileUtil::getFiles($rootPath, true, true, false, false);\n\t\treturn $docs;\n\t}",
"public static function filelist()\n\t{\n\t\tglobal $g_relative_file_directory;\t// '../../UPLOADS/';\n\t\tglobal $g_relative_root_directory;\t// 'UPLOADS/';\n\n\t\t$actualdirectory = $_POST['actualdir'];\n\t\tif(!$actualdirectory)\n\t\t\t$actualdirectory='';\n\n\t\t$result = [];\n\t\t$result['directory'] = $g_relative_root_directory;\n\t\t$result['actualdir'] = $actualdirectory;\n\n\t\tif(strlen($actualdirectory)>0)\n\t\t\t$actualdirectory.=\"/\";\n\n\t\t$reldir = $g_relative_file_directory.$actualdirectory;\n\t\t$dirs=[];\n\t\tforeach(glob($reldir.'*', GLOB_ONLYDIR) as $d)\n\t\t{\n\t\t\t$fn=str_replace($reldir,'',$d);\n\t\t\t$dirs[] = $fn;\n\t\t}\n\t\t$result['dirs']=$dirs;\n\t\t//$result['reldir']=$reldir;\n\n\t\t$filenames = [];\n\t\tforeach(array_filter(glob($reldir.'*.*'), 'is_file') as $file)\n\t\t{\n\t\t\t$farray = [];\n\t\t\t$fn=str_replace($reldir,'',$file);\n\n\t\t\t$f=filesize($file);\n\t\t\t$fe=\"bytes\";\n\t\t\tif($f/1024 > 1)\n\t\t\t{\n\t\t\t\t$f/=1024;\n\t\t\t\t$fe=\"kb\";\n\t\t\t\tif($f/1024 > 1)\n\t\t\t\t{\n\t\t\t\t\t$f/=1024;\n\t\t\t\t\t$fe=\"Mb\";\n\t\t\t\t\tif($f/1024 > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$f/=1024;\n\t\t\t\t\t\t$fe=\"GB\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$farray['Filename'] = $fn;\n\t\t\t$farray['Filesize'] = number_format($f,1);\n\t\t\t$farray['FilesizeDeterminant'] = $fe;\n\n\t\t\t$filenames[] = $farray;\n\t\t}\n\t\t$result['files']=$filenames;\n\n\t\theader('Content-Type: application/json');\n\t\techo(json_encode($result));\n\t}",
"public function getEmbeddedFiles() {}",
"public static function get_file_list() {\n\t\t$new_file_list = array();\n\t\t$files = new RecursiveIteratorIterator( new RecursiveDirectoryIterator( ABSPATH ), RecursiveIteratorIterator::SELF_FIRST );\n\t\tforeach ( $files as $file ) {\n\t\t\t$file = realpath( $file );\n\t\t\tif ( File_List::in_ignore_list( $file ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( is_dir( $file) ) {\n\t\t\t\t$file .= '/';\n\t\t\t}\n\t\t\t$new_file_list[] = array( $file, File_List::INCLUDED ) ;\n\t\t}\n\t\tasort( $new_file_list );\n\t\treturn array_values( $new_file_list );\n\t}",
"function llista_carpeta($ruta,$extensions)\n{\n\t$llistat=array();\n\t$extensions=var2array($extensions,',');\n\tif ($handle = opendir($ruta))\n\t{\n\t\twhile (false !== ($file = readdir($handle)))\n\t\t{\n\t\t\tforeach ($extensions as $extensio)\n\t\t\t{\n\t\t\t\t$tipus=filetype(\"$ruta/$file\");\n\t\t\t\tif ($extensio=='.' && $tipus==='dir' && $file != \".\" && $file != \"..\" || substr($file, strrpos($file, '.')+1) == $extensio && $tipus==='file')\n\t\t\t\t\t{$llistat[]=$file;break;}\n\t\t\t}\n\t\t}\n\t}\n\treturn $llistat;\n}",
"public function listFiles() {\r\n $list = ftp_nlist($this->connessione, '.');\r\n return $list;\r\n }",
"public function find_all() {\n $this->ensure_path_exists();\n $files = glob($this->glob_keys_pattern(), GLOB_MARK | GLOB_NOSORT);\n $return = array();\n if ($files === false) {\n return $return;\n }\n foreach ($files as $file) {\n $return[] = substr(basename($file), 0, -6);\n }\n return $return;\n }",
"public function loadFilesVendor()\r\n {\r\n $id = Input::get('ID');\r\n $uid = Input::get('UID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $rol = $this->getRol($uid);\r\n $internalFiles = $project->filesByType(array('vendor',$rol));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url];\r\n }\r\n }\r\n return json_encode($files);\r\n }",
"function list_all_files($path) {\n\t\t\t$files = scandir($path);\n\t\t\tprint_r($files);\n\t\t}",
"function ajaxlistfiles(){\n\n\t\t//Glob all files in uploaddir\n\t\t$files = array();\n\t\tforeach(glob($this->uploaddir.'*') as $file){\n\n\t\t\t//Strip path\n\t\t\t$filename = str_replace($this->uploaddir,'',$file);\n\n\t\t\t$files[$filename]['filename']=$filename;\n\t\t\t$files[$filename]['filesize']=filesize($file) / 1024 / 1024; //Mb\n\t\t\t$files[$filename]['modified']=filemtime($file); //Mb\n\n\t\t\t//Check torrent\n\t\t\tif( file_exists( $this->torrentdir.$filename.'.torrent' )){\n\n\t\t\t\t//Add torrent file\n\t\t\t\t$files[$filename]['torrent']=$filename.'.torrent';\n\n\t\t\t\t//Check database table phptracker_peers for torrent peers:\n\t\t\t\tif($torrent = $this->Torrent->findByName($filename)){\n\t\t\t\t\tif($peers = $this->Peer->findAllByInfoHash($torrent['Torrent']['info_hash'])){\n\t\t\t\t\t\t$files[$filename]['peers']=$peers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('files',$files);\n\n\t\t$this->layout = 'ajax';\n\t}",
"protected function getAllStaticFiles()\n {\n $dir = $this->dirList->getPath('static');\n $js = [];\n $css = [];\n $this->getDirContents($dir, $js, $css);\n $result = [self::A_JS => $js, self::A_CSS => $css];\n return $result;\n }",
"public function listAll()\n {\n $files = \\Core\\File\\System::listFiles($this->_getPath(), \\Core\\File\\System::EXCLUDE_DIRS);\n $result = [];\n foreach (array_keys($files) as $file) {\n $result[] = pathinfo($file, PATHINFO_FILENAME);\n }\n return $result;\n }",
"abstract function list_files($path = '.');",
"function get_urls(){\n\tglobal $urllist;\n\t$list = file($urllist);\n\t//print_r($list);\n\treturn $list;\n}",
"public function files()\n {\n if($this->collection->empty())\n {\n foreach($this->fileList() as $file)\n {\n if(!is_dir($file))\n {\n $this->files->push($file);\n $this->collection->push(new Reader($this->path . $file));\n }\n else\n {\n $this->directories->push($file);\n }\n }\n }\n\n return $this->collection->get();\n }"
] | [
"0.71901864",
"0.7148936",
"0.7148936",
"0.7148936",
"0.70244753",
"0.6985555",
"0.6947344",
"0.6922616",
"0.68358403",
"0.68358403",
"0.68358403",
"0.6819728",
"0.6786284",
"0.6774349",
"0.6745213",
"0.67362034",
"0.67323464",
"0.67239803",
"0.6684824",
"0.66447055",
"0.6638802",
"0.66075283",
"0.65466243",
"0.65272194",
"0.65202796",
"0.64576745",
"0.6447099",
"0.64442664",
"0.6430637",
"0.64296645",
"0.64257514",
"0.64094245",
"0.6401807",
"0.6391834",
"0.63506526",
"0.6344783",
"0.6343626",
"0.63384",
"0.6336802",
"0.6332252",
"0.6303788",
"0.6285167",
"0.62519115",
"0.6245599",
"0.62359613",
"0.62281704",
"0.62254554",
"0.62194437",
"0.6214397",
"0.620953",
"0.6206931",
"0.6191047",
"0.61744595",
"0.61640793",
"0.61626565",
"0.61622983",
"0.61618644",
"0.6154777",
"0.614794",
"0.6138326",
"0.6131381",
"0.6127027",
"0.61079437",
"0.61046267",
"0.610375",
"0.6101872",
"0.60787964",
"0.6073905",
"0.6073066",
"0.60730505",
"0.6072569",
"0.6068029",
"0.6058309",
"0.6057102",
"0.6053396",
"0.6052896",
"0.6045649",
"0.60438824",
"0.6043652",
"0.60431147",
"0.60408837",
"0.60299784",
"0.6014422",
"0.60080755",
"0.5999399",
"0.5997896",
"0.59969336",
"0.5992351",
"0.5976143",
"0.59723794",
"0.5971987",
"0.5965957",
"0.5955806",
"0.5942212",
"0.59383565",
"0.5928783",
"0.59191924",
"0.5915967",
"0.5914733",
"0.5901733",
"0.589903"
] | 0.0 | -1 |
Retorna a lista de arquivos CSS | public static function getCss() {
return self::get('_css', array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function findCssFiles();",
"public function getCSSFiles() {\n //je krijgt op het einde .. en . terug, deze mag je niet opnemen in je links\n $cssFiles = scandir(\"css\", 1);\n \n return $cssFiles;\n }",
"function get_css_files() {\n\t$csslist = array();\n\n\t// List pfSense files, then any BETA files followed by any user-contributed files\n\t$cssfiles = glob(\"/usr/local/www/css/*.css\");\n\n\tif (is_array($cssfiles)) {\n\t\tarsort($cssfiles);\n\t\t$usrcss = $pfscss = $betacss = array();\n\n\t\tforeach ($cssfiles as $css) {\n\t\t\t// Don't display any login/logo page related CSS files\n\t\t\tif (strpos($css, \"login\") == 0 &&\n\t\t\t strpos($css, \"logo\") == 0) {\n\t\t\t\tif (strpos($css, \"BETA\") != 0) {\n\t\t\t\t\tarray_push($betacss, $css);\n\t\t\t\t} else if (strpos($css, \"pfSense\") != 0) {\n\t\t\t\t\tarray_push($pfscss, $css);\n\t\t\t\t} else {\n\t\t\t\t\tarray_push($usrcss, $css);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$css = array_merge($pfscss, $betacss, $usrcss);\n\n\t\tforeach ($css as $file) {\n\t\t\t$file = basename($file);\n\t\t\t$csslist[$file] = pathinfo($file, PATHINFO_FILENAME);\n\t\t}\n\t}\n\treturn $csslist;\n}",
"public function get_css_files()\n\t{\n\t\treturn $this->_css_files;\n\t}",
"public function getCss()\n {\n $result = $this->_css;\n foreach ($this->_packages as $package) {\n $config = $this->getConfig($package);\n if (!empty($config['css'])) {\n foreach ($config['css'] as $item) {\n $result[] = $item;\n }\n }\n }\n return $result;\n }",
"public function styles() {\n $styles = array();\n if (\\File::isDirectory(public_path('assets/fontello/css'))) {\n foreach (glob(public_path('assets/fontello/css/') . '*', GLOB_BRACE) as $path) {\n $file = explode('/', $path);\n $styles[] = \\HTML::style('public/assets/fontello/css/' . end($file));\n }\n\n return join(\"\\n\", $styles);\n }\n }",
"public function getCSS()\n\t{\n\t\t$css = array();\n\t\treturn $css;\n\t}",
"public function getAllCSS()\n {\n return $this->css;\n }",
"public function getCss();",
"public function getCss();",
"function allLoadCss($path){\n \n $diretorio = dir($path);\n\n while($arquivo = $diretorio -> read()){\n //verifica apenas as extenções do css \n if(strpos($arquivo, '.css')!==FALSE)\n echo (\"<link rel='stylesheet' href='\".BARRA.url_base.BARRA.$path.$arquivo.\"' type='text/css' />\\n\");\n }\n $diretorio -> close();\n\n }",
"private function _getCSSIncludes () {\n $ret = array();\n foreach ($this->_styles as $stylesheet => $included) {\n if (!$included) {\n $this->_styles[$stylesheet] = true;\n array_push($ret, self::CSS_PATH . $stylesheet);\n }\n }\n\n return $ret;\n }",
"protected function getContentCssFileNames() {}",
"function get_the_css_urls() {\n\n md_get_the_css_urls();\n \n }",
"function get_css_files_media_array();",
"public function getCssFiles(): array\n {\n return $this->cssFiles;\n }",
"private function getStylesheets() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = $theme_handler->listInfo();\n $names = $themes[$name]->info['name'];\n $path = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n $stylesheete = $path . '/css/' . $name . '.' . 'ckeditor.css';\n $default_stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n\n if (file_exists($stylesheete)) {\n $stylesheet_options = [$stylesheete => $names];\n } elseif (!file_exists($stylesheete)) {\n $stylesheet_options = [$default_stylesheet => $names];\n }\n return $stylesheet_options ;\n }\n }",
"private function parseCSS(){\n\t\t// collect all unique values from the arrays in $links\n\t\t$css_links = array();\n\t\tforeach ($this->links as $key => $paths) {\n\t\t\tforeach ($paths as $key => $value) {\n\t\t\t\t$css_links[] = $value;\n\t\t\t}\n\t\t}\n\t\t$css_links = array_unique($css_links);\n\t\tsort($css_links);\n\t\t// loop through all values look for files\n\t\tforeach ($css_links as $value) {\n\t\t\tif(count(explode('.', $value)) > 1){\n\t\t\t\t$temp = explode('.', $value);\n\t\t\t\t$qry = false;\n\t\t\t\t// if a file is found, see if it has a querystring\n\t\t\t\tforeach ($temp as $key => $css) {\n\t\t\t\t\tif(count(explode('?', $css)) > 1){\n\t\t\t\t\t\t$temp[$key] = explode('?', $css);\n\t\t\t\t\t\t$qry = $key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if it has a query string, remove it\n\t\t\t\tif($qry){\n\t\t\t\t\t$type = $temp[$qry][0];\n\t\t\t\t// otherwise, just grab the extension\n\t\t\t\t} else {\n\t\t\t\t\t$type = count($temp);\n\t\t\t\t\t$type = $temp[$type-1];\n\t\t\t\t}\n\t\t\t\t// check if the file extension is css\n\t\t\t\tif($type === 'css'){\n\t\t\t\t\t// ensure path to file exists\n\t\t\t\t\t$path = 'http://'.$this->url.$value;\n\t\t\t\t\tif(@file_get_contents($path)){\n\t\t\t\t\t\t// add file to $visited\n\t\t\t\t\t\t$this->visited[] = $value;\n\t\t\t\t\t\t// set current path for relativePathFiX()\n\t\t\t\t\t\t$dir = explode('/', $value);\n\t\t\t\t\t\tarray_pop($dir);\n\t\t\t\t\t\t$this->current_path = implode('/', $dir).'/';\n\t\t\t\t\t\t// open the file to start parsing\n\t\t\t\t\t\t$file = file_get_contents($path);\n\t\t\t\t\t\t$imgs = array();\n\t\t\t\t\t\t// find all occurrences of the url() method used to include images\n\t\t\t\t\t\tpreg_match_all(\"%.*url\\('*(.*)[^\\?]*\\).*\\)*%\", $file, $matches);\n\t\t\t\t\t\t// loop through occurrences\n\t\t\t\t\t\tforeach ($matches[1] as $key => $img) {\n\t\t\t\t\t\t\t// check if a query string is attached to the image (used to prevent caching)\n\t\t\t\t\t\t\tif(count(explode('?', $img)) > 1){\n\t\t\t\t\t\t\t\t// if there is, remove it and fix the path\n\t\t\t\t\t\t\t\t$temp = explode('?', $img);\n\t\t\t\t\t\t\t\t$imgs[] = $this->relativePathFix($temp[0]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// if there isn't a query string, make sure to remove the closing bracket\n\t\t\t\t\t\t\t\t$temp = explode(')', $img);\n\t\t\t\t\t\t\t\t$imgs[] = $this->relativePathFix($temp[0]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// if images were found, add them to $links\n\t\t\t\t\t\tif(count($imgs) > 0){\n\t\t\t\t\t\t\t$this->links[$value] = $imgs;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function happys_getCssAssets() {\n\t \t $filepath = glob(\"wp-content/themes/happys/css/app-v*.css\");\n\t\t $filename = basename($filepath[count($filepath) - 1]).PHP_EOL;\n\t \t echo $filename;\n }",
"function stylesheets() {\n $sheets = func_get_args();\n foreach($this->included_stylesheets as $name) $sheets[] = $name;\n return $this->context->stylesheet_links($sheets, $this->base_url().\"/stylesheets\");\n }",
"protected function _getFromCSS()\n {\n // styles to apply\n $styles = array();\n\n // list of the selectors to get in the CSS files\n $getit = array();\n\n // get the list of the selectors of each tags\n $lst = array();\n $lst[] = $this->value['id_lst'];\n for ($i=count($this->table)-1; $i>=0; $i--) {\n $lst[] = $this->table[$i]['id_lst'];\n }\n\n // foreach selectors in the CSS files, verify if it match with the list of selectors\n foreach ($this->cssKeys as $key => $num) {\n if ($this->_getReccursiveStyle($key, $lst)) {\n $getit[$key] = $num;\n }\n }\n\n // if we have selectors\n if (count($getit)) {\n // get them, but in the definition order, because of priority\n asort($getit);\n foreach ($getit as $key => $val) $styles = array_merge($styles, $this->css[$key]);\n }\n\n return $styles;\n }",
"function _asset_css_all(string $pack = '') {\n\t\treturn Asset::setThemePack($pack)->getCssAll();\n\t}",
"static public function extract_css( $content ) {\n\t\t$content = preg_replace( '~<!--.*?-->~s', '', $content );\n\n\t\t$tags_files = array();\n\n\t\t$matches = null;\n\t\tif ( preg_match_all( '~<link\\s+([^>]+)/?>(.*</link>)?~Uis', $content,\n\t\t\t\t$matches, PREG_SET_ORDER ) ) {\n\t\t\tforeach ( $matches as $match ) {\n\t\t\t\t$attrs = array();\n\t\t\t\t$attr_matches = null;\n\t\t\t\tif ( preg_match_all( '~(\\w+)=[\"\\']([^\"\\']*)[\"\\']~', $match[1],\n\t\t\t\t\t\t$attr_matches, PREG_SET_ORDER ) ) {\n\t\t\t\t\tforeach ( $attr_matches as $attr_match ) {\n\t\t\t\t\t\t$attrs[$attr_match[1]] = trim( $attr_match[2] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( isset( $attrs['href'] ) && isset( $attrs['rel'] ) &&\n\t\t\t\t\tstristr( $attrs['rel'], 'stylesheet' ) !== false &&\n\t\t\t\t\t( !isset( $attrs['media'] ) || stristr( $attrs['media'], 'print' ) === false ) ) {\n\t\t\t\t\t$tags_files[] = array( $match[0], $attrs['href'] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif ( preg_match_all( '~@import\\s+(url\\s*)?\\(?[\"\\']?\\s*([^\"\\'\\)\\s]+)\\s*[\"\\']?\\)?[^;]*;?~is',\n\t\t\t\t$content, $matches, PREG_SET_ORDER ) ) {\n\t\t\tforeach ( $matches as $match )\n\t\t\t\t$tags_files[] = array( $match[0], $match[2] );\n\t\t}\n\n\t\treturn $tags_files;\n\t}",
"function src_inc_list_css(string $assets_url, array $files) : string {\n $source = \"\";\n\n //Process the list of files\n foreach($files as $file){\n $source .= src_inc_css($assets_url.$file).\"\\n\\t\\t\";\n }\n\n return $source;\n}",
"function readStyles() { $this->ParseCSSFile();\n return $this->_stylelist; }",
"public static function css();",
"public function get_css_common()\n {\n return array\n (\n \"lgwebapp.css\"\n );\n }",
"private function load_css () {\n $buffer = '';\n if (count($this->css_files)) {\n foreach ($this->css_files as $file) {\n $file = explode('/', $file);\n // TODO: use $this->config->item('modules_locations') for modules path\n $file = 'application/modules/'.$file[0].'/views/'.$this->get_skin().'/skin/'.implode('/',array_slice($file, 1));\n $buffer .= \"\\n\".'<link rel=\"stylesheet\" href=\"'.base_url($file).'\">';\n }\n return $buffer.\"\\n\";\n } else {\n return \"\\n\";\n }\n }",
"public function read_css() {\r\n\t\t// 1. wir müssen wissen, welche Thema zZ. aktiv ist.\r\n\t\t$cssfile = $this->get_cssfile_name();\r\n\t\t// 2. den Inhalt der CSS-Datei auslesen\r\n\t\t$csscont = $this->read_cssfile($cssfile);\r\n\t\treturn $csscont;\r\n\t}",
"private function getStylesheet() {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes = [];\n $stylesheet_options = [];\n $theme_handler = Drupal::service('theme_handler');\n foreach ($theme_handler->listInfo() as $name => $theme) {\n $themes[$name] = DRUPAL_ROOT . '/' . $theme\n ->getPath();\n if (file_exists($themes[$name])) {\n $stylesheet = $themes[$name] . '/css/' . $name . '.' . 'ckeditor.css';\n }\n else {\n $stylesheet = drupal_get_path('module', 'ckeditor_stylesheetparser') . '/js/plugins/stylesheetparser/samples/assets/sample.css';\n }\n }\n $stylesheet_options = $stylesheet;\n return $stylesheet_options;\n }\n }",
"public function getStylesheets()\n {\n return array('/cpCmsPlugin/css/widget.css' => 'all');\n }",
"function media_theplatform_mpx_extract_all_css_links($text) {\n $pattern = '/\\<link rel\\=\\\"stylesheet\\\" type\\=\\\"text\\/css\\\" media\\=\\\"screen\\\" href\\=\\\"(.*?)\\\" \\/\\>/';\n preg_match_all($pattern, $text, $results);\n return $results[1];\n}",
"private function _getResourceCss()\n {\n return array(\n '../libs/css/plugins/validationEngine.jquery.css'\n );\n }",
"protected function get_assets() {\n\t\treturn [\n\t\t\tnew StyleAsset(\n\t\t\t\tself::CSS_HANDLE,\n\t\t\t\tself::CSS_URI\n\t\t\t),\n\t\t];\n\t}",
"function loadCSS() {\n\t\t$first = true;\n\t\t$cssPart = '';\n\t\tforeach( $this->conf->css->file as $file ) {\n\t\t\tif( ! $first ) {\n\t\t\t\t$cssPart .= chr( 9 );\n\t\t\t}\n\t\t\t$cssPart .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"';\n\t\t\t$cssPart .= $this->conf->path->baseUrl . $this->conf->path->css . $file;\n\t\t\t$cssPart .= '\" />' . chr( 10 );\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\tif( count( $this->additionalCSS ) >= 1 ) {\n\t\t\tforeach( $this->additionalCSS as $key => $value ) {\n\t\t\t\t$cssPart .= '<style type=\"text/css\">' . chr( 10 );\n\t\t\t\t$cssPart .= $value . chr( 10 );\n\t\t\t\t$cssPart .= '</style>' . chr( 10 );\n\t\t\t}\n\t\t\n\t\t}\n\t\treturn $cssPart;\n\t}",
"public function getCss($link)\n {\n $cssLinks = [];\n $content = file_get_contents($link);\n\n if (preg_match_all('/(@import) (url)\\(\\\"([^)]+)\\\"\\)/', $content, $matches)) {\n if (isset($matches[3])) {\n foreach ($matches[3] as $match) {\n $cssLinks[] =$this->getFullLink($link, $match);\n }\n }\n }\n\n if (preg_match_all('/<link.+href=[\\'\"]([^\\'\"]+)[\\'\"].*>/', $content, $matches)) {\n if (isset($matches[1])) {\n foreach ($matches[1] as $match) {\n if (!preg_match('/\\.(xml|ico)$/', $match)) {\n $cssLinks[] = $this->getFullLink($link, $match);\n }\n }\n }\n }\n\n return [$content, $cssLinks];\n }",
"public function css(){\n if (func_num_args() > 0){\n for ($i = 0; $i < func_num_args(); $i++){\n $arg = func_get_arg($i); // Fatal error: func_get_arg(): Can't be used as a function parameter\n if (preg_match('/^(.+)\\[(.+)\\]$/', $arg, $matches)){\n $filename = $matches[1];\n $media = $matches[2];\n } else {\n $filename = $arg;\n $media = 'screen,projection';\n }\n \n array_push($this->css, $this->stylesheet_tag($filename, $media));\n }\n }\n \n return join($this->css, \"\\n\");\n }",
"function get_editor_stylesheets()\n {\n }",
"public function getCssSources(): string\n {\n return '<link rel=\"stylesheet\" type=\"text/css\" href=\"'\n . $this->uri\n . 'bower_components/jquery-ui/themes/ui-lightness/jquery-ui.min.css\" />'\n . '<link rel=\"stylesheet\" type=\"text/css\" href=\"'\n . $this->uri\n . 'bower_components/jquery-ui/themes/ui-lightness/theme.css\" />'\n . '<link rel=\"stylesheet\" type=\"text/css\" href=\"'\n . $this->uri\n . 'themes/default/style.css\" />';\n }",
"function retrieve_path_values($css_list)\n{\n $path_list = array_map('_get_path_values',$css_list);\n return $path_list;\n}",
"function getStyles () {\n return array(\"template.css\");\n }",
"public static function enteteCSS() {\r\n foreach (Page::getInstance()->css as $link) {\r\n ?>\r\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo $link; ?>\" />\r\n <?php\r\n }\r\n }",
"public static function getStylesheets() {\n\t\t$html = '';\n\t\t$_Stylesheets = Configuration::getStylesheets();\n\t\tforeach($_Stylesheets as $stylesheet) {\n\t\t\t$html .= '<link rel=\"stylesheet\" href=\"'.$stylesheet.'\" />'.PHP_EOL.\"\\t\";\n\t\t}\n\t\treturn $html;\n\t}",
"public static function css() {\r\n\t\t\t$s = '';\r\n\t\t\tforeach(func_get_args() as $css) {\r\n\t\t\t\t$file = WEB_ROOT . '/' . $css;\r\n\t\t\t\tif(!file_exists($file)) {\r\n\t\t\t\t\tABPF::logger()->error(\"CSS file $file doesn't exist!\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t$v = filemtime($file);\r\n\t\t\t\t$s .= sprintf('<link rel=\"stylesheet\" type=\"text/css\" href=\"%s/%s?v=%d\" />', BASE_URL, $css, $v);\r\n\t\t\t}\r\n\t\t\treturn $s;\r\n\t\t}",
"public function get_stylesheet_css()\n {\n }",
"static public function getCSS() {\n\t\treturn self::$css;\n\t}",
"function css($arquivo);",
"public function getCssPath();",
"public function getStylesheets()\n {\n return array('/sfEntityAttributeValuePlugin/css/jquery.formbuilder.css' => 'all');\n }",
"private function loadCss($dir)\n {\n $css = [];\n if(file_exists($dir.'objavi.css')){\n $css[] = file_get_contents($dir.'objavi.css');\n }\n if(file_exists($dir.'css/extra.css')){\n $css[] = file_get_contents($dir.'css/extra.css');\n }\n\n return $css;\n }",
"function _asset_css(array $files = [], string $pack = '') {\n\t\treturn Asset::setThemePack($pack)->getCss($files);\n\t}",
"public function css()\n {\n $dir = new \\Ninja\\Directory(NINJA_DOCROOT . 'public/');\n /**\n * @var $files \\Ninja\\File[]\n */\n $files = $dir->scanRecursive(\"*.css\");\n\n echo \"\\nMinifying Css Files...\\n\";\n foreach($files as $sourceFile)\n {\n // Skip all foo.#.js (e.g foo.52.js) which are files from a previous build\n if (is_numeric(substr($sourceFile->getName(true), strrpos($sourceFile->getName(true), '.') + 1)))\n continue;\n\n /**\n * @var $destFile \\Ninja\\File\n */\n $destFile = $sourceFile->getParent()->ensureFile($sourceFile->getName(true) . '.' . self::REVISION . '.' . $sourceFile->getExtension());\n\n $destFile->write(\\Minify_Css::process($sourceFile->read()));\n echo ' ' . $sourceFile->getPath() . \"\\n\";\n\n unset($sourceFile);\n }\n }",
"public function getCompressCss() {}",
"public static function getExternalStylesFiles($dom)\n {\n $doc = new \\DOMDocument();\n $doc->loadHTML($dom);\n $elements = $doc->getElementsByTagName('link');\n\n $fileNames = [];\n\n foreach ($elements as $node) {\n $href = $node->attributes->getNamedItem('href');\n $rel = $node->attributes->getNamedItem('rel');\n\n if ($node->hasAttributes() &&\n null !== $href &&\n null !== $rel) {\n if ($rel->value == \"stylesheet\") {\n $fileNames[] = $href->value;\n }\n }\n }\n\n return $fileNames;\n }",
"public function getConcatenateCss() {}",
"public static function getExternalStylesheets()\n\t{\n\t\t$stylesheets = new \\DomDocument('1.0', 'utf-8');\n\t\t$stylesheets->appendChild($root = $stylesheets->createElement('stylesheets'));\n\t\tforeach (self::$externalStylesheets as $asset)\n\t\t{\n\t\t\t$root->appendChild($external = $stylesheets->createElement('stylesheet'));\n\t\t\t$external->setAttribute('href', $asset->path);\n\t\t\tif (isset($asset->media) && $asset->media)\n\t\t\t{\n\t\t\t\t$external->setAttribute('media', $asset->media);\n\t\t\t}\n\t\t}\n\t\treturn $stylesheets;\n\t}",
"function cssFiles($cssFile = false) {\n\t\n\tif ($cssFile) $this->cssFiles[] = $cssFile;\n\telse return $this->cssFiles;\n }",
"public function automaticCss()\n \t{\n \t\t$css = array();\n \t\tif (isset($this->pluginPath)) {\n\t \t\t\n\t \t\t# CSS Plugin Path\n\t\t\t$css_path_plugin = $this->pluginPath . $this->constant['webroot'] . DS . $this->constant['cssBaseUrl'];\n\t\t\tif (is_file($css_path_plugin . $this->controller . '.css')) {\n\t\t \t$css[] = $this->plugin.'.'.$this->controller;\n\t\t \t}\n\n\t\t \tif (is_file($css_path_plugin . $this->controller . DS . $this->action . '.css')) {\n\t\t \t$css[] = $this->plugin.'.'.$this->controller . '/' . $this->action;\n\t\t \t}\n \t\t}\n \t\t\n \t\t$css_path = $this->constant['www_root'] . $this->constant['cssBaseUrl'];\n \t\tif (is_file($css_path . $this->controller . '.css')) {\n\t \t$css[] = $this->controller;\n\t\t}\n\n\t \tif (is_file($css_path . $this->controller . DS . $this->action . '.css')) {\n\t \t$css[] = $this->controller . DS . $this->action;\n\t\t}\n\t\treturn $this->css($css);\n \t}",
"function ReadCSS($html)\n{\n//! @desc CSS parser\n//! @return string\n\n/*\n* This version ONLY supports: .class {...} / #id { .... }\n* It does NOT support: body{...} / a#hover { ... } / p.right { ... } / other mixed names\n* This function must read the CSS code (internal or external) and order its value inside $this->CSS. \n*/\n\n\t$match = 0; // no match for instance\n\t$regexp = ''; // This helps debugging: showing what is the REAL string being processed\n\t\n\t//CSS inside external files\n\t$regexp = '/<link rel=\"stylesheet\".*?href=\"(.+?)\"\\\\s*?\\/?>/si'; \n\t$match = preg_match_all($regexp,$html,$CSSext);\n $ind = 0;\n\n\twhile($match){\n //Fix path value\n $path = $CSSext[1][$ind];\n $path = str_replace(\"\\\\\",\"/\",$path); //If on Windows\n //Get link info and obtain its absolute path\n $regexp = '|^./|';\n $path = preg_replace($regexp,'',$path);\n if (strpos($path,\"../\") !== false ) //It is a Relative Link\n {\n $backtrackamount = substr_count($path,\"../\");\n $maxbacktrack = substr_count($this->basepath,\"/\") - 1;\n $filepath = str_replace(\"../\",'',$path);\n $path = $this->basepath;\n //If it is an invalid relative link, then make it go to directory root\n if ($backtrackamount > $maxbacktrack) $backtrackamount = $maxbacktrack;\n //Backtrack some directories\n for( $i = 0 ; $i < $backtrackamount + 1 ; $i++ ) $path = substr( $path, 0 , strrpos($path,\"/\") );\n $path = $path . \"/\" . $filepath; //Make it an absolute path\n }\n elseif( strpos($path,\":/\") === false) //It is a Local Link\n {\n $path = $this->basepath . $path; \n }\n //Do nothing if it is an Absolute Link\n //END of fix path value\n $CSSextblock = file_get_contents($path);\t\n\n //Get class/id name and its characteristics from $CSSblock[1]\n\t $regexp = '/[.# ]([^.]+?)\\\\s*?\\{(.+?)\\}/s'; // '/s' PCRE_DOTALL including \\n\n\t preg_match_all( $regexp, $CSSextblock, $extstyle);\n\n\t //Make CSS[Name-of-the-class] = array(key => value)\n\t $regexp = '/\\\\s*?(\\\\S+?):(.+?);/si';\n\n\t for($i=0; $i < count($extstyle[1]) ; $i++)\n\t {\n \t\tpreg_match_all( $regexp, $extstyle[2][$i], $extstyleinfo);\n \t\t$extproperties = $extstyleinfo[1];\n \t\t$extvalues = $extstyleinfo[2];\n \t\tfor($j = 0; $j < count($extproperties) ; $j++) \n \t\t{\n \t\t\t//Array-properties and Array-values must have the SAME SIZE!\n \t\t\t$extclassproperties[strtoupper($extproperties[$j])] = trim($extvalues[$j]);\n \t\t}\n \t\t$this->CSS[$extstyle[1][$i]] = $extclassproperties;\n\t \t$extproperties = array();\n \t\t$extvalues = array();\n \t\t$extclassproperties = array();\n \t}\n\t $match--;\n\t $ind++;\n\t} //end of match\n\n\t$match = 0; // reset value, if needed\n\n\t//CSS internal\n\t//Get content between tags and order it, using regexp\n\t$regexp = '/<style.*?>(.*?)<\\/style>/si'; // it can be <style> or <style type=\"txt/css\"> \n\t$match = preg_match($regexp,$html,$CSSblock);\n\n\tif ($match) {\n \t//Get class/id name and its characteristics from $CSSblock[1]\n \t$regexp = '/[.#]([^.]+?)\\\\s*?\\{(.+?)\\}/s'; // '/s' PCRE_DOTALL including \\n\n \tpreg_match_all( $regexp, $CSSblock[1], $style);\n\n\t //Make CSS[Name-of-the-class] = array(key => value)\n\t $regexp = '/\\\\s*?(\\\\S+?):(.+?);/si';\n\n\t for($i=0; $i < count($style[1]) ; $i++)\n\t {\n \t\tpreg_match_all( $regexp, $style[2][$i], $styleinfo);\n \t\t$properties = $styleinfo[1];\n \t\t$values = $styleinfo[2];\n \t\tfor($j = 0; $j < count($properties) ; $j++) \n \t\t{\n \t\t\t//Array-properties and Array-values must have the SAME SIZE!\n \t\t\t$classproperties[strtoupper($properties[$j])] = trim($values[$j]);\n \t\t}\n \t\t$this->CSS[$style[1][$i]] = $classproperties;\n \t\t$properties = array();\n \t\t$values = array();\n \t\t$classproperties = array();\n \t}\n\t} // end of match\n\n\t//Remove CSS (tags and content), if any\n\t$regexp = '/<style.*?>(.*?)<\\/style>/si'; // it can be <style> or <style type=\"txt/css\"> \n\t$html = preg_replace($regexp,'',$html);\n\n \treturn $html;\n}",
"public function getLocalStylesheets($withNULL = false)\n\t{\n\t\t\n\t\t$_dir = sfConfig::get('sf_web_dir').'/css';\n\t\t$files = array();\n\t\t\n\t\tif( $withNULL )\n\t\t{\n\t\t\t$files[NULL] = NULL;\n\t\t}\n\t\t\n\t\t$handle = opendir($_dir);\n\t\t\n\t\twhile (false !== ($file = readdir($handle))) {\n\t if($file == '.' or $file == '..' )\n\t {\n\t \tcontinue;\n\t }\n\t $files[$file] = $file;\n\t }\n \t\n\t closedir($handle);\n\t return $files; \n\t}",
"function generate_css() {\r\n global $config;\r\n\r\n $res = '';\r\n foreach ($config['css']as $v) {\r\n $res .= \"<link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"$v\\\"/>\";\r\n }\r\n return $res;\r\n}",
"protected function getStylesheets()\n {\n $stylesheets = parent::getStylesheets();\n $stylesheets[] = 'styles/css/minimal/minimal.css';\n return $stylesheets;\n }",
"function GetStylesheetes()\n{\n $isMobile = check_user_agent('mobile') === false && @$_GET['screen'] != 'mobile' ? false :true;\n $append = $isMobile ? '.mobile.css':'.css';\n $stylesheets = GetTheDataArray(array('theme','stylesheet'));\n $returnData = '';\n foreach($stylesheets as $key => $style)\n {\n $file = '';\n if($key == 'core') {\n //include core stylesheet and decide if mobile stylesheet should be used\n if(check_user_agent('mobile') === false && @$_GET['screen'] != 'mobile')\n {\n $style = $style['primary'];\n\n } else {\n $style = $style['mobile'];\n\n }\n\n $httpFile = base_url().'theme/'.THEMESELECTED.'/css/'.$style;\n $file = THEMEPATH.THEMESELECTED.'/css/'.$style;\n //including files from project data css folder configured in projectconfig.php\n } elseif($key == 'include'){\n foreach($style as $st)\n {\n $httpFile = base_url().'project/'.PROJECT.'/data/css/'.$st.$append;\n $file = PROJECTROOT.PROJECT.'/data/css/'.$st.$append;\n }\n\n }\n\n if(file_exists($file))\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.$httpFile.'\"/>';\n }\n\n }\n //adding include files depending on what device is being used\n foreach($stylesheets['core']['includes'] as $includes)\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.base_url().'theme/'.THEMESELECTED.'/css/includes/'.$includes.$append.'\"/>';\n }\n //adding animation files\n if(iteraxcontroller::Instance()->it->data['theme']['animations'] === true)\n {\n foreach($stylesheets['animations'] as $includes)\n {\n $returnData .= '<link rel=\"stylesheet\" href=\"'.base_url().'theme/'.THEMESELECTED.'/css/animation/'.$includes.'\"/>';\n }\n }\n\n\n return $returnData;\n}",
"public function getStyleSheets()\n {\n return $this->style_sheets;\n }",
"protected function loadCss() {}",
"function fancybox_get_css()\n{\n global $PHORUM;\n\n $css = dirname(__FILE__) . '/code/' .\n 'jquery.fancybox-' . FANCYBOX_VERSION . '.css';\n $code = file_get_contents($css);\n $url = $PHORUM['http_path'] . '/' . FANCYBOX_PATH;\n\n // Update all background-image url references to use an absolute URL.\n $code = preg_replace(\n '/\\burl\\(\\'?([\\w-]+\\.\\w+)\\'?\\)/',\n \"url('$url/\\$1')\",\n $code\n );\n\n // Update all src='fancybox/someimage.png' references.\n $code = preg_replace(\n '/src=\\'?fancybox\\/(\\w+\\.\\w+)\\'/',\n \"src='$url/\\$1'\",\n $code\n );\n\n return $code;\n}",
"public function getCssClasses(): array;",
"public function css();",
"public function getCss()\n {\n return $this->data(self::CSS);\n }",
"public function configAction()\n {\n $styles = array_map(function ($fn) {\n return basename($fn, '.css');\n }, glob(App::locator()->get('highlight:assets/styles').'/*.css'));\n\n return compact('styles');\n }",
"private function getStyles() {\n $file = drupal_get_path('module', 'site_audit') . '/css/bootstrap-overrides.css';\n $styles = \"/* $file */\\n\" . file_get_contents($file);\n return $styles;\n }",
"protected function getCssFilesFromConfig()\n {\n return $this->getConfig()->getHasUnglueConfigSection('css', []);\n }",
"public function getStylesheets() {\n return array_merge(parent::getStylesheets(), array('/sfAdminTemplatePlugin/css/jquery.fancybox-1.3.4.css' => 'screen'));\n }",
"public function getDynamicCss(){\r\n\t\t$db = new RevSliderDB();\r\n\r\n\t\t$styles = $db->fetch(RevSliderGlobals::$table_css);\r\n\t\t$styles = RevSliderCssParser::parseDbArrayToCss($styles, \"\\n\");\r\n\r\n\t\treturn $styles;\r\n\t}",
"static protected function CSSFileNamesMap() {\n return array(\n DeductionPageDispatcher::LIST_DEDUCTION => \"spisak.css\",\n DeductionPageDispatcher::DETAILS_DEDUCTION => \"detalji.css\",\n DeductionPageDispatcher::NEW_DEDUCTION => \"formstyle.css\",\n DeductionPageDispatcher::UPDATE_DEDUCTION => \"formstyle.css\",\n );\n }",
"protected function getEnqueuingStyles() { \n return array(\n dirname( __FILE__ ) . '/asset/token-input.css',\n dirname( __FILE__ ) . '/asset/token-input-facebook.css',\n dirname( __FILE__ ) . '/asset/token-input-mac.css', \n dirname( __FILE__ ) . '/asset/token-input-admin_page_framework.css', \n );\n }",
"static public function getCssContent($file)\n {\n // Don't try to parse empty (or non-existing) files\n if (empty($file)) return null;\n\n // Skip files that have already been included\n static $files = array();\n if (in_array($file, $files)) {\n return null;\n } else {\n $files[] = $file;\n }\n\n // Initialize the buffer\n $buffer = @file_get_contents($file);\n if (empty($buffer)) return null;\n\n // Initialize the basepath\n $basefile = ScriptMergeHelper::getFileUrl($file, false);\n\n // Follow all @import rules\n if (ScriptMergeHelper::getParams()->get('follow_imports', 1) == 1) {\n if (preg_match_all('/@import\\ url\\((.*)\\);/i', $buffer, $matches)) {\n foreach ($matches[1] as $index => $match) {\n\n // Strip quotes\n $match = str_replace('\\'', '', $match);\n $match = str_replace('\"', '', $match);\n\n $importFile = ScriptMergeHelper::getFilePath($match, $file);\n if (empty($importFile) && strstr($importFile, '/') == false) $importFile = dirname($file).'/'.$match;\n $importBuffer = ScriptMergeHelper::getCssContent($importFile);\n\n if (!empty($importBuffer)) {\n $buffer = str_replace($matches[0][$index], \"\\n\".$importBuffer.\"\\n\", $buffer);\n } else {\n $buffer = \"\\n/* ScriptMerge error: CSS import of $importFile returned empty */\\n\\n\".$buffer;\n }\n }\n }\n }\n\n // Replace all relative paths with absolute paths\n if (preg_match_all('/url\\(([^\\(]+)\\)/i', $buffer, $url_matches)) {\n foreach ($url_matches[1] as $url_index => $url_match) {\n\n // Strip quotes\n $url_match = str_replace('\\'', '', $url_match);\n $url_match = str_replace('\"', '', $url_match);\n\n // Skip CSS-stylesheets which need to be followed differently anyway\n if (strstr($url_match, '.css')) continue;\n\n // Skip URLs and data-URIs\n if (preg_match('/^(http|https):\\/\\//', $url_match)) continue;\n if (preg_match('/^\\/\\//', $url_match)) continue;\n if (preg_match('/^data\\:/', $url_match)) continue;\n\n // Normalize this path\n $url_match_path = ScriptMergeHelper::getFilePath($url_match, $file);\n if (empty($url_match_path) && strstr($url_match, '/') == false) $url_match_path = dirname($file).'/'.$url_match;\n if (!empty($url_match_path)) $url_match = ScriptMergeHelper::getFileUrl($url_match_path);\n \n // Include data-URIs in CSS as well\n if (ScriptMergeHelper::getParams()->get('data_uris', 0) == 1) {\n $imageContent = ScriptMergeHelper::getDataUri($url_match_path);\n if (!empty($imageContent)) {\n $url_match = $imageContent;\n }\n }\n\n $buffer = str_replace($url_matches[0][$url_index], 'url('.$url_match.')', $buffer);\n }\n }\n\n // Detect PNG-images and try to replace them with WebP-images\n if (preg_match_all('/([a-zA-Z0-9\\-\\_\\/]+)\\.(png|jpg|jpeg)/i', $buffer, $matches)) {\n foreach ($matches[0] as $index => $image) {\n $webp = ScriptMergeHelper::getWebpImage($image);\n if ($webp != false && !empty($webp)) {\n $buffer = str_replace($image, $webp, $buffer);\n } \n }\n }\n\n // If compression is enabled\n $compress_css = ScriptMergeHelper::getParams()->get('compress_css', 0);\n if ($compress_css > 0) {\n\n switch ($compress_css) {\n\n case 1: \n $buffer = preg_replace('#[\\r\\n\\t\\s]+//[^\\n\\r]+#', ' ', $buffer);\n $buffer = preg_replace('/[\\r\\n\\t\\s]+/s', ' ', $buffer);\n $buffer = preg_replace('#/\\*.*?\\*/#', '', $buffer);\n $buffer = preg_replace('/[\\s]*([\\{\\},;:])[\\s]*/', '\\1', $buffer);\n $buffer = preg_replace('/^\\s+/', '', $buffer);\n $buffer .= \"\\n\";\n break;\n\n case 2:\n // Compress the CSS-code\n $cssMin = JPATH_SITE.'/components/com_scriptmerge/lib/cssmin.php';\n if(file_exists($cssMin)) include_once $cssMin;\n if(class_exists('CssMin')) {\n $buffer = CssMin::minify($buffer);\n }\n break;\n\n case 0:\n default:\n break;\n }\n\n // If compression is disabled\n } else { \n\n // Append the filename to the CSS-code\n if(ScriptMergeHelper::getParams()->get('use_comments', 1)) {\n $start = \"/* [start] ScriptMerge CSS-stylesheet: $basefile */\\n\\n\";\n $end = \"/* [end] ScriptMerge CSS-stylesheet: $basefile */\\n\\n\";\n $buffer = $start.$buffer.\"\\n\".$end;\n }\n }\n\n return $buffer;\n }",
"public function assets_css() {\n \n $data = '<link rel=\"stylesheet\" type=\"text/css\" href=\"//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.9.0/fullcalendar.min.css?ver=' . MD_VER . '\" media=\"all\"/> ';\n $data .= \"\\n\";\n $data .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . base_url() . 'assets/apps/dashboard/styles/css/dashboard.css?ver=' . MD_VER . '\" media=\"all\"/> ';\n $data .= \"\\n\";\n \n if ( $this->css_urls_widgets ) {\n \n foreach ( $this->css_urls_widgets as $url ) {\n \n $data .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $url . '?ver=' . MD_VER . '\" media=\"all\"/> ';\n $data .= \"\\n\"; \n \n }\n \n }\n \n return $data;\n \n }",
"public function styles() {\n\t\t$styles = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'static_content_styles_css',\n\t\t\t\t'src' => $this->get_base_url() . '/css/static_content_styles.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray( 'field_types' => array( 'staticcontent' ) )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn array_merge( parent::styles(), $styles );\n\t}",
"public static function getCaptionsCssContentArray(){\r\n\t\tif(file_exists(RS_PLUGIN_PATH.'public/assets/css/captions.css'))\r\n\t\t\t$contentCSS = file_get_contents(RS_PLUGIN_PATH.'public/assets/css/captions.css');\r\n\t\telse if(file_exists(RS_PLUGIN_PATH.'public/assets/css/captions-original.css'))\r\n\t\t\t$contentCSS = file_get_contents(RS_PLUGIN_PATH.'public/assets/css/captions-original.css');\r\n\t\telse if(file_exists(RS_PLUGIN_PATH.'backup/'.'captions.css'))\r\n\t\t\t$contentCSS = file_get_contents(RS_PLUGIN_PATH.'backup/'.'captions.css');\r\n\t\telse if(file_exists(RS_PLUGIN_PATH.'backup/'.'captions-original.css'))\r\n\t\t\t$contentCSS = file_get_contents(RS_PLUGIN_PATH.'backup/'.'captions-original.css');\r\n\t\telse\r\n\t\t\tRevSliderFunctions::throwError(\"No captions.css found! This installation is incorrect, please make sure to reupload the Slider Revolution plugin and try again!\");\r\n\t\t\r\n\t\t$result = RevSliderCssParser::parseCssToArray($contentCSS);\r\n\r\n\t\treturn($result);\r\n\t}",
"function css_list() {\n?>\n<link rel=\"Stylesheet\" type=\"text/css\" href=\"/schedule/css/style.css\" /> \n\n<?php \n }",
"public function get_styles() {\n\t\treturn [];\n\t}",
"function show_all_styles() {\n\tglobal $wp_styles;\n\t\n\t// arrange the queue based on its dependency\n\t$wp_styles->all_deps($wp_styles->queue);\t\n\t\n\t// The result\n\t$handles = $wp_styles->to_do;\n\t\n\t$css_code = '';\n\n\t// New file location: E:xampp\\htdocs\\wordpress\\wp-content\\theme\\wdc\\merged-style.css\n\t$merged_file_location = get_stylesheet_directory() .'/_/css/merged-style.css';\n\t$merged_file = file_get_contents($merged_file_location);\n\t//echo '<pre>';print_r($wp_styles->queue);echo '</pre>';\n\t// loop all styles\n\tforeach ($handles as $handle)\n\t{\n\t\t/*\n\t\t\tClean up the url, for example: wp-content/themes/wdc/style.min.css?v=4.6\n\t\t\tbecome wp-content/themes/wdc/style.min.css\n\t\t*/\n\t\t$src = strtok($wp_styles->registered[$handle]->src, '?');\n\t\t\n\t\t// #1. Combine CSS File.\n\t\t// If the src is url\t\t\n\t\tif (strpos($src, 'http') !== false || strpos($src, 'https') !== false) {\n\t\t\t// Get thr site url, e.g. http://webdevzoom.com/wordpress\n\t\t\t$site_url = site_url();\n\t\t\n\t\t\t/*\n\t\t\t\tIf the css file come from local server, change the full url into relative path\n\t\t\t\tFor example: http://webdevzoom.com/wordpress/wp-content/plugins/wpnewsman/css/menuicon.css\n\t\t\t\tBecome: /wp-content/plugins/wpnewsman/css/menuicon.css\n\t\t\t\t\n\t\t\t\tOtherwise, leave it as is, e.g: https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css\n\t\t\t*/\n\t\t\tif (strpos($src, $site_url) !== false)\n\t\t\t\t$css_file_path = str_replace($site_url, '', $src);\n\t\t\telse\n\t\t\t\t$css_file_path = $src;\n\t\t\t\n\t\t\t/*\n\t\t\t\tIn order to be able to use file_get_contents function, we need to remove preceding slash,\n\t\t\t\tFor example: /wp-content/plugins/wpnewsman/css/menuicon.css\n\t\t\t\tBecome: wp-content/plugins/wpnewsman/css/menuicon.css\n\t\t\t*/\n\t\t\t$css_file_path = ltrim($css_file_path, '/');\n\t\t} else {\t\t\t\n\t\t\t$css_file_path = ltrim($src, '/');\n\t\t}\n\t\t\n\t\t// Check wether file exists then merge\n\t\tif (file_exists($css_file_path)) {\n\t\t\t$css_code .= file_get_contents($css_file_path);\n\t\t}\n\t}\n\n\t// write the merged styles into current theme directory\n\tif ($merged_file != $css_code) {\n\tfile_put_contents ($merged_file_location , $css_code);\n\t}\n\t\n\t// #2. Load the URL of merged file\n\twp_enqueue_style('merged-style', get_stylesheet_directory_uri() . '/_/css/merged-style.css');\n\t\n\t// #3. Deregister all handles\n\tforeach ($handles as $handle)\n\t{\n\t\twp_deregister_style($handle);\n\t}\n\n\t\n}",
"static public function findStylesheetFiles($styles) {\n\t\t$theme=OC_Config::getValue( 'theme' );\n\n\t\t// Read the detected formfactor and use the right file name.\n\t\t$fext = self::getFormFactorExtension();\n\n\t\t$files = array();\n\t\tforeach($styles as $style) {\n\t\t\t// is it in 3rdparty?\n\t\t\tif(self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $style.'.css')) {\n\n\t\t\t// or in the owncloud root?\n\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"$style$fext.css\" )) {\n\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"$style.css\" )) {\n\n\t\t\t// or in core ?\n\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"core/$style$fext.css\" )) {\n\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"core/$style.css\" )) {\n\n\t\t\t}else{\n\t\t\t\t$append = false;\n\t\t\t\t// or in apps?\n\t\t\t\tforeach( OC::$APPSROOTS as $apps_dir)\n\t\t\t\t{\n\t\t\t\t\tif(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], \"$style$fext.css\")) {\n\t\t\t\t\t\t$append = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telseif(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], \"$style.css\")) {\n\t\t\t\t\t\t$append = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(! $append) {\n\t\t\t\t\techo('css file not found: style:'.$style.' formfactor:'.$fext\n\t\t\t\t\t\t.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Add the theme css files. you can override the default values here\n\t\tif(!empty($theme)) {\n\t\t\tforeach($styles as $style) {\n\t\t\t\t if(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"themes/$theme/apps/$style$fext.css\" )) {\n\t\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"themes/$theme/apps/$style.css\" )) {\n\n\t\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"themes/$theme/$style$fext.css\" )) {\n\t\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"themes/$theme/$style.css\" )) {\n\n\t\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"themes/$theme/core/$style$fext.css\" )) {\n\t\t\t\t}elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, \"themes/$theme/core/$style.css\" )) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $files;\n\t}",
"function media_theplatform_mpx_extract_all_css_inline($text) {\n $pattern = '/<style.*>(.*)<\\/style>/sU';\n preg_match_all($pattern, $text, $results);\n return $results[1];\n}",
"public function css()\n {\n return $this->css;\n }",
"public function getSkinStylesheetDirectories() {}",
"public static function getThemes() {\r\n\t\t$themes = array();\r\n\r\n\t\t// Special files to ignore\r\n\t\t$ignore = array('admin.css');\r\n\r\n\t\t// Get themes corresponding to .css files.\r\n\t\t$dir = dirname(__FILE__) . '/css';\r\n\t\tif ($handle = opendir($dir)) {\r\n\t\t while (false !== ($entry = readdir($handle))) {\r\n\t\t\t if (in_array($entry, $ignore)) {\r\n\t\t\t\t continue;\r\n\t\t\t }\r\n\r\n\t\t\t $file = $dir . '/' . $entry;\r\n\t\t\t if (!is_file($file)) {\r\n\t\t\t\t continue;\r\n\t\t\t }\r\n\r\n\t\t\t // Beautify name\r\n\t\t\t $name = substr($entry, 0, -4); // Remove \".css\"\r\n\t\t\t $name = str_replace('--', ', ', $name);\r\n\t\t\t $name = str_replace('-', ' ', $name);\r\n\t\t\t\t$name = ucwords($name);\r\n\r\n\t\t\t // Add theme\r\n\t $themes[$entry] = $name;\r\n\t\t }\r\n\t\t closedir($handle);\r\n\t\t}\r\n\r\n\t\t$themes['none'] = 'None';\r\n\r\n\t\t// Sort alphabetically\r\n\t\tasort($themes);\r\n\r\n\t\treturn $themes;\r\n\t}",
"public static function getExternalStyles($dom)\n {\n $cssFiles = static::getExternalStylesFiles($dom);\n\n // Concat all css-file in one string\n $cssContent = \"\";\n foreach ($cssFiles as $css) {\n if (file_exists($css)) {\n $cssContent .= file_get_contents($css) . PHP_EOL;\n } elseif (file_exists(ROADIZ_ROOT . $css)) {\n $cssContent .= file_get_contents(ROADIZ_ROOT . $css) . PHP_EOL;\n }\n }\n\n return $cssContent;\n }",
"static protected function CSSFileNamesMap() {\n return array(\n ShopPageDispatcher::LIST_SHOP => \"spisak.css\",\n ShopPageDispatcher::DETAILS_SHOP => \"detalji.css\",\n ShopPageDispatcher::NEW_SHOP => \"formstyle.css\",\n ShopPageDispatcher::UPDATE_SHOP => \"formstyle.css\",\n );\n }",
"static public function css($files, $path = null)\n {\n $output = null;\n\n if ( !is_array($files) )\n $files = array($files);\n\n if ( $path === null )\n $path = 'globals/views/css';\n \n $path = (URL_REWRITING) ? ROOT.$path : $path;\n\n foreach ( $files as $file )\n {\n $output .= '<link rel=\"stylesheet\" type=\"text/css\" '.\n\t'href=\"'.$path.'/'.$file.'.css\" />';\n }\n\n return $output;\n }",
"private function getCSS()\n\t{\n\t\t$prefix = $this->getPrefix();\n\t\tlist($firstElement, $lastElement) = $this->getBounds();\n\t\t$isFirst = ($firstElement == $this->element);\n\t\t$isLast = ($lastElement == $this->element);\n\t\t$hasChildren = ($this->element->ContainerElement->Children->Count() > 0);\n\t\t$CSSClasses = [];\n\t\t\n\t\tif ($isFirst && $isLast) {\n\t\t\t$CSSClasses[] = \"$prefix-last\";\n\t\t} else if ($isFirst) {\n\t\t\t$CSSClasses[] = \"$prefix-first\";\n\t\t} else if ($isLast) {\n\t\t\t$CSSClasses[] = \"$prefix-last\";\n\t\t}\n\t\tif ($hasChildren) {\n\t\t\t$CSSClasses[] = \"$prefix-parent\";\n\t\t}\n\t\tif ($this->element->GetCollapsed()) {\n\t\t\t$CSSClasses[] = \"$prefix-collapsed\";\n\t\t}\n\t\tif ($this->element->GetDisabled()) {\n\t\t\t$CSSClasses[] = \"$prefix-item-disabled\";\n\t\t}\n\t\treturn array_merge($this->element->CSSClass, $CSSClasses);\n\t}",
"public function css_includes()\n {\n }",
"public static function get_css_paths($components) {\r\n\t\t$css_components = array(\r\n\t\t\tself::CORE\r\n\t\t);\r\n\t\t$css_having = self::get_components_having_css();\r\n\t\t\r\n\t\tforeach($components as $c) {\r\n\t\t\tif (in_array($c, $css_having)) {\r\n\t\t\t\t$css_components[] = $c;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$css_components[] = 'ui.theme';\r\n\t\t\r\n\t\t$ret = array();\r\n\t\t$prefix = self::is_version_1_8_or_higher() ? 'jquery.' : '';\r\n\t\tforeach($css_components as $c) {\r\n\t\t\t$path = 'css/jqueryui/' . $prefix . $c . '.css';\r\n\t\t\tif (!in_array($path, $ret)) {\r\n\t\t\t\t$ret[] = $path;\r\n\t\t\t}\t\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}",
"protected function ParseCSSFile()\n {\n $this->_stylelist=$this->BuildStyleList($this->FileName, $this->_inclstandard, $this->_inclid, $this->_incsubstyle);\n }",
"public function get_custom_css()\n {\n }",
"static public function getThemeResourceTypes()\n\t\t{\n\t\t\treturn array('css');\n\t\t}",
"public function getCssIncludes() {\n return $this->cssIncludes;\n }",
"protected function getAllStaticFiles()\n {\n $dir = $this->dirList->getPath('static');\n $js = [];\n $css = [];\n $this->getDirContents($dir, $js, $css);\n $result = [self::A_JS => $js, self::A_CSS => $css];\n return $result;\n }",
"function GetStyles()\n {\n if ( $this->is_naked_day() )\n {\n return \"<!-- Sorry, no stylesheets - it's annual CSS Naked Day! -->\";\n }\n\n foreach($this->mStyles as $media => $stylesheet)\n {\n $out.= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$stylesheet.'\" media=\"'.$media.'\" />'.\"\\n\";\n }\n return $out;\n }"
] | [
"0.7980199",
"0.7705979",
"0.7662851",
"0.7594721",
"0.7503362",
"0.7484169",
"0.7431319",
"0.7413066",
"0.72974855",
"0.72974855",
"0.72279865",
"0.7216365",
"0.7172619",
"0.71657825",
"0.7154179",
"0.711784",
"0.7116806",
"0.6983952",
"0.6909629",
"0.68976116",
"0.68697286",
"0.6850016",
"0.6811114",
"0.6785781",
"0.67844915",
"0.67840815",
"0.6781365",
"0.6765652",
"0.6732401",
"0.66777956",
"0.6673633",
"0.6656044",
"0.6621536",
"0.6619493",
"0.65887547",
"0.6587093",
"0.6565211",
"0.65584594",
"0.6544628",
"0.65432376",
"0.6538743",
"0.6535104",
"0.65337646",
"0.6533076",
"0.6527956",
"0.65229833",
"0.64864576",
"0.64812505",
"0.645992",
"0.64419",
"0.64390475",
"0.6436312",
"0.6430112",
"0.6419135",
"0.6405747",
"0.64039433",
"0.63806784",
"0.63798857",
"0.6369557",
"0.6367146",
"0.6359249",
"0.63397795",
"0.633616",
"0.6334299",
"0.6313816",
"0.6306668",
"0.6283692",
"0.6274786",
"0.6268029",
"0.6262888",
"0.62495595",
"0.62442577",
"0.62403816",
"0.6223645",
"0.62201864",
"0.6217442",
"0.6212432",
"0.6202215",
"0.618443",
"0.617529",
"0.6169414",
"0.615164",
"0.6148891",
"0.6139601",
"0.61378443",
"0.61235565",
"0.6116275",
"0.6114899",
"0.6090982",
"0.60814524",
"0.6081339",
"0.60796756",
"0.6075243",
"0.6073923",
"0.60725296",
"0.6072393",
"0.6061976",
"0.605406",
"0.6052667",
"0.6049488"
] | 0.69740456 | 18 |
$sql="SElECT From stage e inner join formationphp.stage a on e.cin= a.cin"; | function afficherstages(){
$sql="SElECT * From stage";
$db = config::getConnexion();
try{
$liste=$db->query($sql);
return $liste;
}
catch (Exception $e){
die('Erreur: '.$e->getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n ->sql();\r\n\r\n $table = EyufDocument::find()\r\n ->where('\"id\" IN ' . $query)\r\n ->all();\r\n\r\n $second = EyufDocument::findAll(EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n );\r\n\r\n vdd($second);\r\n }",
"function joinQuery()\n {\n }",
"public function getJobp($id=''){\t\t\n $this->db->select(\"jobspreview.*,package.name as package_name,package.price as package_price,industry.name as industry_name\");\n $this->db->join(\"package\",\"jobspreview.package_id=package.id\",\"left\"); \n $this->db->join(\"industry\",\"jobspreview.industry_id=industry.id\",\"left\"); \n $this->db->where(\"jobspreview.id\",$id); \n $result = $this->db->get('jobspreview')->result();\n //echo $this->db->last_query(); die(); \n return $result;\t\t\n}",
"function enquery_view_sql()\n\t{\n\t\t$view_enquery=mysqli_query($this->con,\"SELECT enquery.*,categories.c_name FROM enquery,categories where enquery.c_id=categories.c_id order by enquery.id desc\");\n\t\treturn $view_enquery;\n\t}",
"private static function selectAndJoins()\n {\n $sql = \"SELECT * FROM \" . dbPerformance::DBNAME;\n\n $sql .= \" INNER JOIN \" . dbCompetition::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::COMPETITOINID . \" = \" . dbCompetition::DBNAME . \".\" . dbCompetition::ID;\n $sql .= \" INNER JOIN \" . dbDisziplin::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::DISZIPLINID . \" = \" . dbDisziplin::DBNAME . \".\" . dbDisziplin::ID;\n $sql .= \" INNER JOIN \" . dbAthletes::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ATHLETEID . \" = \" . dbAthletes::DBNAME . \".\" . dbAthletes::ID;\n $sql .= \" LEFT JOIN \" . dbPerformanceDetail::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ID . \" = \" . dbPerformanceDetail::DBNAME . \".\" . dbPerformanceDetail::PERFORMANCEID;\n\n $sql .= \" INNER JOIN \" . dbCompetitionLocations::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::LOCATIONID . \" = \" . dbCompetitionLocations::DBNAME . \".\" . dbCompetitionLocations::ID;\n $sql .= \" INNER JOIN \" . dbCompetitionNames::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::NAMEID . \" = \" . dbCompetitionNames::DBNAME . \".\" . dbCompetitionNames::ID;\n return $sql;\n }",
"function sql_inner_join_statement(string $table_name, string $coloum_name, int $count)\n {\n $sql = \" FROM \" . $table_name . \" AS T1 \";\n for($i = 1; $i < $count; $i++){\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n \n $sql .= \"INNER JOIN $table_name AS $t_name USING ( \" . $coloum_name . \" ) \";\n }\n return $sql;\n }",
"public function mainTable(){\n //selects needed\n $select[] = 'date_eos';\n\n //build where\n $where = 'overall_status = \"GO\" AND job_type != \"TIA\" ORDER BY crew_1 ASC';\n //add join\n $join = ' LEFT JOIN ' .$this->revTable . ' ON admin_jobs.id = admin_revisions_current.admin_id LEFT JOIN ' .$this->empTable . ' ON admin_jobs.crew_1 = employee.id';\n\n //build query\n $result = $this->runQuery($where,$select,$join);\n\n return $result;\n\n }",
"public function innerJoin($table);",
"public function query_employee(){\n $this->db->select('*');\n $this->db->from('hr_pic_center');\n $this->db->join('hr_section','hr_section.sec_id = hr_pic_center.pic_sec_id');\n $this->db->join('hr_position','hr_position.position_id = hr_pic_center.pic_position_id');\n $this->db->where('hr_pic_center.pic_upd','00');\n\n $employee = $this->db->get();\n return $employee;\n }",
"function EpicsDetails() \n {\n \n // $EpicsDetails=\"SELECT * FROM epics\n // LEFT JOIN team\n // ON team.id = epics.team_id\";\n\n\n $EpicsDetails=\"SELECT e.*,stf.*,ed.*,team.name as teamname,epics_statuses.name as statusename\n FROM epics AS e\n LEFT JOIN team as team ON team.id=e.team_id\n LEFT JOIN epics_statuses as epics_statuses ON epics_statuses.id=e.e_status_id\n LEFT JOIN staff AS stf ON stf.staff_id = e.e_owner \n LEFT JOIN epic_details AS ed ON ed.e_id = e.e_id where ed.e_id = e.e_id\";\n $EpicsDetailsresult = $this->ds->select($EpicsDetails);\n //print '<pre>';print_r($EpicsDetailsresult);\n return $EpicsDetailsresult;\n }",
"function sql_query_issplaninscr ($q20_planilha, $campos = \"*\") {\n\t \t\n\t \t$sql = \"select \";\n\t \tif ( $campos != \"*\") {\n\t \t\t\n\t \t\t$campos_sql = split(\"#\",$campos);\n\t \t\t$virgula = \"\";\n\t \t\tfor($i=0;$i<sizeof($campos_sql);$i++){\n\t \t\t\t$sql .= $virgula.$campos_sql[$i];\n\t \t\t\t$virgula = \",\";\n\t \t\t}\n\t \t} else { \n\t \t\t$sql .= $campos;\n\t \t}\n\t \t\n\t \t$sql .= \" from issplan\";\n\t \t$sql .= \" \tleft join issplaninscr on q24_planilha = q20_planilha\";\n\t \t$sql .= \" left join issplannumpre on q32_planilha = q20_planilha\";\n\t \t$sql .= \" where issplan.q20_planilha = {$q20_planilha}\";\n\n\t \treturn $sql;\n\t }",
"function operasiJoin2(){\n\t\t$date = date('Y-m-d');\n\t\t$query = $this->db->query(\"SELECT o.id_operasi, o.operasi, o.id_alat, a.id_kategori, o.tanggal, o.keterangan, a.nama_alat FROM operasi o INNER JOIN alat a ON o.id_alat = a.id_alat\"); \n\t\treturn $query->result();\n\t}",
"public function cpJoin() {\n $sql=\"select packages.packageName, prices.id, prices.price, products.productName, products.cid, prices.productID, prices.areaID, prices.packageID \"\n . \"from prices\"\n . \" inner join packages on packages.packageID=prices.packageID\"\n . \" inner join products on prices.productID=products.productID where products.cid='9'\";\n $sth=$this->dbh->prepare($sql);\n \n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n}",
"function sql_leftJoin(){\n\t\t$dbconnection = $this->db_connect();\n\t\tif($dbconnection !=1)\n\t\t{\n\t\t\t$result=\"MySql Connection Error\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//LIST OF SELECTIONS\n\t\t\t//INSTEAD of a listOfFields I need a listOfSelections like \"db.tbl_1.fld_1\"\n\t\t\t// a_selections = array(\"db.tbl_1.fld_1\",\"db.tbl_1.fld_2\",\"db.tbl_2.fld_1\");\n\t\t\t\n\t\t\tif($this->a_fields !=\" \"){\n\t\t\t\t$a_selections = $this->arraySELECTIONS($this->db,$this->table,$this->a_fields);\n\t\t\t}else{\n\t\t\t\t$a_selections = $this->db.\".\".$this->table.\" \";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->a_fields2 !=\" \"){\n\t\t\t\t$a_selections2 = $this->arraySELECTIONS($this->db2,$this->table2,$this->a_fields2);\n\t\t\t}else{\n\t\t\t\t$a_selections2 = $this->db2.\".\".$this->table2.\" *\";\n\t\t\t}\n\t\t\t\n \t\t\t$listOfSelections = $this->arrayFieldsToList($a_selections);\n\t\t\t$listOfSelections2 = $this->arrayFieldsToList($a_selections2);\n\t\t\t\n \t\t\t$sql = mysql_query(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n\t\t\t\n \t\t\t //echo(\"SELECT \".$listOfSelections.\",\".$listOfSelections2.\" FROM \".$this->db.\".\".$this->table.\" LEFT JOIN \".$this->db2.\".\".$this->table2.\" ON \".$this->db.\".\".$this->table.\".\".$this->relation.\" = \".$this->db2.\".\".$this->table2.\".\".$this->relation2.\"\");\n \t\t\t\tif (mysql_num_rows($sql) > 0) \n\t\t\t \t{\n\t\t\t \twhile ($row = mysql_fetch_assoc($sql)) \n\t\t\t \t{\n\t\t\t \t$a_data[]=$row ;\n\t\t\t \t}\n\t\t \t\t$result= $a_data;\t\n\t\t\t\t}else{\n\t\t\t\t\t$result=\"NO DATA AVAILABLE\";\n\t\t\t\t}\n\t\t}\n\t\treturn $result;\n\t\n\t}",
"function sqlStudentAll()\n\t{\n\t\t//echo '<hr>Nama class ini :' . __METHOD__ . '()<hr>';\n\t\t$sql = \"SELECT student_name,student_roll_number,student_dob,student_grade_id,student_id\"\n\t\t. \" FROM tbl_student INNER JOIN tbl_grade \"\n\t\t. \" ON tbl_grade.grade_id = tbl_student.student_grade_id \"\n\t\t. \"\";\n\n\t\treturn $sql;\n\t}",
"public function consultaOfertas(){\n //join Tabla2 T2 ON T1.PK = T2.FK\n \n //select * from Tabla1 T1, Tabla2 T2\n //WHERE T!.PK = T2.FK\n \n \n \n //$this->db->select(\"*\"); \n //$this->db->from(\"productos\");//nombrebase\n //$this->db->join(\"carrera\",\"alumno.idCarrera = carrera.idCarrera\");\n \n //$sql = $this->db->get();\n //return $sql->result();\n }",
"public function sql_query_ensino ($ed10_i_codigo = null,$campos = \"*\", $ordem = null, $dbwhere = \"\") {\n\n $sql = \"select {$campos}\";\n $sql .= \" from ensino \";\n $sql .= \" left join censocursoprofiss on censocursoprofiss.ed247_i_codigo = ensino.ed10_censocursoprofiss\";\n $sql .= \" inner join mediacaodidaticopedagogica on mediacaodidaticopedagogica.ed130_codigo = ensino.ed10_mediacaodidaticopedagogica\";\n $sql .= \" inner join tipoensino on tipoensino.ed36_i_codigo = ensino.ed10_i_tipoensino\";\n $sql2 = \"\";\n if (empty($dbwhere)) {\n if (!empty($ed10_i_codigo)) {\n $sql2 .= \" where ensino.ed10_i_codigo = $ed10_i_codigo \";\n }\n } else if (!empty($dbwhere)) {\n $sql2 = \" where $dbwhere\";\n }\n $sql .= $sql2;\n if (!empty($ordem)) {\n $sql .= \" order by {$ordem}\";\n }\n return $sql;\n }",
"function join_product_table(){\n global $db;\n $sql =\" SELECT p.id,p.name,p.keywords,p.quantity,p.url,p.buy_price,p.sale_price,p.media_id,p.date,c.name\";\n $sql .=\" AS categorie,m.file_name AS image\";\n $sql .=\" FROM products p\";\n $sql .=\" LEFT JOIN categories c ON c.id = p.categorie_id\";\n $sql .=\" LEFT JOIN media m ON m.id = p.media_id\";\n $sql .=\" ORDER BY p.id ASC\";\n return find_by_sql($sql);\n\n }",
"function select() {\r\n\r\n $oc_id = $this->oc_id;\r\n $prov_id = $this->prov_id;\r\n $oc_tipo = $this->oc_tipo;\r\n $oc_estado = $this->oc_estado;\r\n $oc_fecha_entrega = $this->oc_fecha_entrega;\r\n $oc_fecha_entrega_fin = $this->oc_fecha_entrega_fin;\r\n\r\n $sql = \"SELECT * FROM ing_oc p LEFT JOIN efectua_compra h ON p.oc_id=h.oc_id WHERE \";\r\n\r\n if ($oc_estado != null) {\r\n $sql = $sql . \"p.oc_estado = '\" . $oc_estado . \"' \";\r\n } else {\r\n $sql = $sql . \"p.oc_estado > '0' \";\r\n }\r\n if ($oc_id != null) {\r\n $sql = $sql . \"AND p.oc_id = '\" . $oc_id . \"' \";\r\n }\r\n if ($prov_id != null) {\r\n $sql = $sql . \"AND p.prov_id = '\" . $prov_id . \"' \";\r\n }\r\n if ($oc_tipo != null) {\r\n $sql = $sql . \"AND p.oc_tipo = '\" . $oc_tipo . \"' \";\r\n }\r\n if ($oc_fecha_entrega != null) {\r\n if ($oc_fecha_entrega_fin != null) {\r\n $sql = $sql . \"AND P.oc_fecha_entrega BETWEEN '\" . $oc_fecha_entrega . \"' AND '\" . $oc_fecha_entrega_fin . \"' \";\r\n }\r\n $sql = $sql . \"AND P.oc_fecha_entrega = '\" . $oc_fecha_entrega . \"' \";\r\n }\r\n\r\n $result = $this->database->query($sql);\r\n// $result = $this->database->result;\r\n// $row = mysql_fetch_object($result);\r\n\r\n $i = 0;\r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arringoc[$i]['prov_id'] = $datos['prov_id'];\r\n $this->arringoc[$i]['oc_id'] = $datos['oc_id'];\r\n $this->arringoc[$i]['oc_codigo'] = $datos['oc_codigo'];\r\n $this->arringoc[$i]['oc_tipo'] = $datos['oc_tipo'];\r\n $this->arringoc[$i]['oc_empresa'] = $datos['oc_empresa'];\r\n $this->arringoc[$i]['oc_log'] = $datos['oc_log'];\r\n $this->arringoc[$i]['oc_estado'] = $datos['oc_estado'];\r\n $this->arringoc[$i]['oc_fecha_entrega'] = $datos['oc_fecha_entrega'];\r\n $this->arringoc[$i]['oc_solicitante'] = $datos['oc_solicitante'];\r\n $this->arringoc[$i]['oc_observacion'] = $datos['oc_observacion'];\r\n $this->arringoc[$i]['oc_neto'] = $datos['oc_neto'];\r\n $this->arringoc[$i]['oc_iva'] = $datos['oc_iva'];\r\n $this->arringoc[$i]['oc_total'] = $datos['oc_total'];\r\n $this->arringoc[$i]['oc_forma_pago'] = $datos['oc_forma_pago'];\r\n $this->arringoc[$i]['oc_condiciones'] = $datos['oc_condiciones'];\r\n $this->arringoc[$i]['oc_tipo_descuento'] = $datos['oc_tipo_descuento'];\r\n $this->arringoc[$i]['oc_impuesto'] = $datos['oc_impuesto'];\r\n $this->arringoc[$i]['oc_gasto_envio'] = $datos['oc_gasto_envio'];\r\n $this->arringoc[$i]['solc_id'] = $datos['solc_id'];\r\n $i++;\r\n }\r\n\r\n// $this->prov_id = $row->prov_id;\r\n//\r\n// $this->oc_id = $row->oc_id;\r\n//\r\n// $this->oc_codigo = $row->oc_codigo;\r\n//\r\n// $this->oc_tipo = $row->oc_tipo;\r\n//\r\n// $this->oc_empresa = $row->oc_empresa;\r\n//\r\n// $this->oc_log = $row->oc_log;\r\n//\r\n// $this->oc_estado = $row->oc_estado;\r\n//\r\n// $this->oc_fecha_entrega = $row->oc_fecha_entrega;\r\n//\r\n// $this->oc_solicitante = $row->oc_solicitante;\r\n//\r\n// $this->oc_observacion = $row->oc_observacion;\r\n//\r\n// $this->oc_neto = $row->oc_neto;\r\n//\r\n// $this->oc_iva = $row->oc_iva;\r\n//\r\n// $this->oc_total = $row->oc_total;\r\n//\r\n// $this->oc_forma_pago = $row->oc_forma_pago;\r\n//\r\n// $this->oc_condiciones = $row->oc_condiciones;\r\n//\r\n// $this->oc_rut_emision = $row->oc_rut_emision;\r\n//\r\n// $this->oc_rut_aprobacion = $row->oc_rut_aprobacion;\r\n//\r\n// $this->oc_cheque_adjunto = $row->oc_cheque_adjunto;\r\n//\r\n// $this->oc_descuento = $row->oc_descuento;\r\n//\r\n// $this->oc_tipo_descuento = $row->oc_tipo_descuento;\r\n//\r\n// $this->oc_impuesto = $row->oc_impuesto;\r\n//\r\n// $this->oc_gasto_envio = $row->oc_gasto_envio;\r\n//\r\n// $this->oc_estado_pago = $row->oc_estado_pago;\r\n }",
"protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n LEFT JOIN \".$this->_getPagamento()->getModel()->getTableName().\" pagto_pedido ON ( cv_pagto_lanc.id_pagto_pedido = pagto_pedido.id ) \n LEFT JOIN \".$this->_getLancamento()->getModel()->getTableName().\" lancamento ON ( cv_pagto_lanc.id_lancamento = lancamento.id ) \"; \n return $sql;\n }",
"public function pagadaall(){\n$sql = $this->db->query(\"SELECT pago_factura.*, facturas.id_factura FROM pago_factura INNER JOIN facturas ON pago_factura.factura_id = facturas.id\");\nreturn $sql;\n}",
"public function _complex_join()\n {\n // LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n // LEFT JOIN (SELECT a.* FROM `%1$sproout` as a INNER JOIN (SELECT max(`id`) as id FROM `%1$sproout` group by `jpid`) as b on a.id = b.id) as `%1$sproout` on `%1$spro`.`id` = `%1$sproout`.`jpid`\n // LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n\n $join = sprintf('LEFT JOIN `%1$sproin` ON `%1$spro`.`id` = `%1$sproin`.`jpid`\n LEFT JOIN `%1$sauth_group` on `%1$spro`.`depid` = `%1$sauth_group`.`id`\n LEFT JOIN `%1$sproout` on `%1$sproout`.`jpid` = `%1$spro`.`id`\n LEFT JOIN `%1$sproout` tmp_out on tmp_out.`jpid` = `%1$sproout`.`jpid` and tmp_out.`id` > `%1$sproout`.`id`\n LEFT JOIN `%1$scust` on `%1$spro`.`cid` = `%1$scust`.`id`', C('DB_PREFIX'));\n return $join;\n }",
"function myjoin()\n {\n $this->db\n ->select('puestos.nombre AS pnombre')\n ->select('puestos.id AS pid')\n ->select('entidades.nombre AS enombre')\n ->select('entidades.id AS eid')\n ->select('departamentos.nombre AS dnombre')\n ->select('departamentos.id AS did')\n ->select('ubicaciones.nombre AS unombre')\n ->select('ubicaciones.id AS uid')\n ->join ('puestos', 'users.puesto = puestos.id' , 'left')\n ->join ('entidades', 'users.entidad = entidades.id' , 'left')\n ->join('departamentos', 'users.departamento = departamentos.id' , 'left')\n ->join('ubicaciones', 'users.ubicaciontrabajo = ubicaciones.id' , 'left');\n //$this->db->where('users.id',7);\n return $datosuser = $this->db->get('users')->result_array();\n }",
"protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getName() .\" \n JOIN \".$this->_getPessoa()->getModel()->getTableName().\" cliente ON ( ca_cliente_contrato.id_cliente = cliente.id ) \n JOIN \".$this->_getContrato()->getModel()->getTableName().\" contrato ON ( ca_cliente_contrato.id_contrato = contrato.id ) \"; \n return $sql;\n }",
"protected function innerJoin() {\n return \" INNER JOIN ImageDetails ON MainPostImage = ImageID\n INNER JOIN Users ON Posts.UserID = Users.UserID\"; }",
"public function query(){\n // $this->db->select('idk,id_kain,nm_kain')\n $this->db->select('*')\n ->from($this->table);\n }",
"function select() {\n\n $query = 'SELECT '\n .'trafficjam.id, '\n .'trafficjam.from, '\n .'trafficjam.from_loc_lat, '\n .'trafficjam.from_loc_lon, '\n .'trafficjam.to, '\n .'trafficjam.to_loc_lat, '\n .'trafficjam.to_loc_lon, '\n .'trafficjam.start, '\n .'trafficjam.delay, '\n .'trafficjam.distance, '\n .'trafficjam.timestamp, '\n .'trafficjam.road_name '\n .'FROM trafficjam '\n .'JOIN trafficjam tj ON tj.from = trafficjam.from AND tj.to = trafficjam.to AND tj.start = trafficjam.start AND tj.id = ? ';\n \n // Prepare statement.\n $stmt = $this->conn->prepare($query);\n \n // Bind id parameter.\n $stmt->bindParam(1, $this->id);\n \n // Execute query.\n $stmt->execute();\n \n return $stmt;\n }",
"public function make_sql()\n\t{\n\t\ttry{\n\t\t\t$metot = $this->metot;\n\t\t\t$metot = strtolower($metot);\n\t\t\t\n\t\t\tif($metot == \"select\") /* Select için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif ((count($this->tables))== 1)\n\t\t\t\t{\n\t\t\t\t\tfor ($c=1;$c<=(count($this->tables[0])-1);$c++){\n\t\t\t\t\t$col .= $this->tables[0][$c].\", \";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr(\"$col\", 0, -1);\n\t\t\t\t\t$table = $this->tables[0][0]; \n\t\t\t\t\t/*\n\t\t\t\t\t\tvar_dump($col);\n\t\t\t\t\t\tvar_dump($table);\n\t\t\t\t\t\tstring 'id, adsoyad' (length=12)\n\t\t\t\t\t\tstring 'email' (length=5)\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tforeach ($this->tables AS $row){\n\t\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t\tfor($c=1; $c<=(count($row)-1);$c++){\n\t\t\t\t\t\t\t$var = trim($row[$c]);\n\t\t\t\t\t\t\t$col .= \"{$table}.{$var}, \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$table = $this->tables[0][0]; \n\t\t\t\t\t/*\n\t\t\t\t\t\tvar_dump($col);\n\t\t\t\t\t\tvar_dump($table);\n\t\t\t\t\t\tstring 'email.id, email.adsoyad, blog.id, blog.title' (length=44)\n\t\t\t\t\t\tstring 'email' (length=5)\n\t\t\t\t\t*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!is_null($this->join)){\n\t\t\t\t\tforeach($this->join AS $row) {$join .=\" $row \";}\n\t\t\t\t}\n\t\t\t\telse $join = \"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->order)) $order = $this->order;\n\t\t\t\telse $order =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->group)) $group = $this->group;\n\t\t\t\telse $group =\"\";\n\t\t\t\t\n\t\t\t\tif (!is_null($this->limit)) $limit = $this->limit;\n\t\t\t\telse $limit =\"\";\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$this->sql = $this->metot.\" \". $col.\" FROM \".$table.\" \".$join.\" \".$where.\" \".$group.\" \".$order.\" \".$limit;\n\t\t\t\t/*var_dump($this->sql); string 'SELECT id, adsoyad FROM email WHERE email.id=35 ' (length=53)*/\n\t\t\t} /*if($metot == \"select\")*/\n\t\t\t\n\t\t\tif($metot == \"insert\") /* Insert için sql oluşturma*/\n\t\t\t{\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$col \t.= strstr($row[$c], \"=\", true).\", \";\n\t\t\t\t\t\t$colVal .= substr((strstr($row[$c], \"=\")), 1).\", \";\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$colVal = trim($colVal);\n\t\t\t\t\t$colVal = substr($colVal, 0, -1);\n\t\t\t\t\t\n\t\t\t\t\t$sql[] = \"INSERT INTO {$table} ($col) VALUES ($colVal) \";\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if($metot == \"insert\")*/\n\t\t\t\n\t\t\tif ($metot == \"update\") /* Update için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$col \t.= $row[$c].\", \";\n\t\t\t\t\t}\n\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t$sql[] = \"UPDATE {$table} SET {$col} {$where}\";\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if ($metot == \"update\")*/\n\t\t\t\n\t\t\tif ($metot == \"delete\") /* Delete için sql oluşturma*/\n\t\t\t{\n\t\t\t\tif (!is_null($this->where)) $where = $this->where;\n\t\t\t\telse $where =\"\";\n\t\t\t\t\n\t\t\t\tforeach ($this->tables AS $row)\n\t\t\t\t{\n\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t$col = \"\";\n\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$table = $row[0];\n\t\t\t\t\t\t$col = \"\";\n\t\t\t\t\t\t$colVal = \"\";\n\t\t\t\t\t\tfor ($c=1;$c<=(count($row)-1);$c++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$col \t.= strstr($row[$c], \"=\", true).\", \";\n\t\t\t\t\t\t\t$colVal .= substr((strstr($row[$c], \"=\")), 1).\", \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$col = trim($col);\n\t\t\t\t\t\t$col = substr($col, 0, -1);\n\t\t\t\t\t\t$colVal = trim($colVal);\n\t\t\t\t\t\t$colVal = substr($colVal, 0, -1);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$sql[] = \"DELETE FROM {$table} WHERE ($col) = ($colVal) \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->sql = $sql;\n\t\t\t} /*if ($metot == \"delete\")*/\n\t\t\t\n\t\t\t$this->run();\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\techo \"Error : \".$e->getMessage() .\"<br/>\".\"File : \".$e->getFile() . \"<br/>\".\"Line : \".$e->getLine() . \"<br/>\";\n\t\t}\n\t}",
"protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_pagto_pedido.id_pedido = pedido.id ) \n LEFT JOIN \".$this->_getFormaPagamento()->getModel()->getTableName().\" forma_pagto ON ( cv_pagto_pedido.id_forma_pagto = forma_pagto.id ) \n LEFT JOIN \".$this->_getParcela()->getModel()->getTableName().\" parcela ON ( cv_pagto_pedido.id_parcela = parcela.id ) \"; \n return $sql;\n }",
"function sql_query_dados_plano ( $c60_anousu=null, $campos=\"*\",$ordem=null,$dbwhere=\"\") {\n $sql = \"select \";\n if($campos != \"*\" ){\n $campos_sql = split(\"#\",$campos);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }else{\n $sql .= $campos;\n }\n $sql .= \" from conplanoorcamento \";\n $sql .= \" left join conplanoorcamentoanalitica on conplanoorcamento.c60_codcon = conplanoorcamentoanalitica.c61_codcon \";\n $sql .= \" and conplanoorcamento.c60_anousu = conplanoorcamentoanalitica.c61_anousu \";\n $sql .= \" left join conplanoorcamentoconta on conplanoorcamento.c60_codcon = conplanoorcamentoconta.c63_codcon \";\n $sql .= \" and conplanoorcamento.c60_anousu = conplanoorcamentoconta.c63_anousu \";\n $sql .= \" left join conplanoorcamentocontabancaria on conplanoorcamento.c60_codcon = conplanoorcamentocontabancaria.c56_codcon \";\n $sql .= \" and conplanoorcamento.c60_anousu = conplanoorcamentocontabancaria.c56_anousu \";\n $sql .= \" inner join conclass on conplanoorcamento.c60_codcla = conclass.c51_codcla \";\n $sql2 = \"\";\n if($dbwhere==\"\"){\n if($c60_anousu!=null ){\n $sql2 .= \" where conplanoorcamento.c60_anousu = $c60_anousu \";\n }\n }else if($dbwhere != \"\"){\n $sql2 = \" where $dbwhere\";\n }\n\n //$sql2 .= ($sql2!=\"\"?\" and \":\" where \") . \" c61_instit = \" . db_getsession(\"DB_instit\");\n $sql .= $sql2;\n if($ordem != null ){\n $sql .= \" order by \";\n $campos_sql = split(\"#\",$ordem);\n $virgula = \"\";\n for($i=0;$i<sizeof($campos_sql);$i++){\n $sql .= $virgula.$campos_sql[$i];\n $virgula = \",\";\n }\n }\n return $sql;\n }",
"private static function sqlJoining() : string {\n $relations = self::getsRelationsHasOne();\n\n $baseTable = static::tableName();\n $baseProperties = self::getProperties();\n foreach ($baseProperties as &$property) {\n $property = $baseTable . '.' . $property;\n }\n $colsFromBaseTabel = implode(', ', $baseProperties);\n $colsFromJoinedTables = '';\n foreach ($relations as $relation) {\n $modelNamespace = '\\\\' . $relation['model'];\n $modelTableName = $modelNamespace::tableName();\n $modelProperties = $modelNamespace::getProperties();\n foreach ($modelProperties as $key => &$value) {\n $value = $modelTableName . '.' . $value . ' AS ' . $modelTableName . '_' . $value;\n }\n $colsFromJoinedTables .= ', ' . implode(', ', $modelProperties);\n\n }\n $sql = 'SELECT ' . $colsFromBaseTabel . ' ' . $colsFromJoinedTables . ' FROM ' . $baseTable;\n\n foreach ($relations as $relation) {\n $modelNamespace = '\\\\' . $relation['model'];\n $modelTableName = $modelNamespace::tableName();\n $sql .= ' INNER JOIN ' . $modelTableName . ' ON ' . $baseTable . '.' . $relation['column'] . ' = ' . $modelTableName . '.' . $relation['joined-table-column'];\n }\n\n return $sql . ' WHERE ' . $baseTable . '.';\n }",
"function allComponentes($codPrograma) {\n \n$sql= \"select a3.cod_componente, a1.nombre_componente, excusamedica, calamidad, transporte, estudio, nojustificada, trabajo, transportemenos, totalinasistencia\nfrom inasistencia_componente_j a1 , inasistencia_componente_noj a2, total_inasistencia_componente a3\nwhere \n\na1.nombre_componente=a2.nombre_componente and a1.nombre_componente=a3.nombre_componente\"\n;\n \n return DB::query($sql);\n }",
"function getActiveCases($conn)\n {\n\n $result = $conn->query(\"\n SELECT \n active_cases.case_id, \n active_cases.class_name_code, \n professor.fname, \n professor.lname, \n aio.fname, \n aio.lname \n FROM active_cases \n LEFT JOIN professor \n ON professor.professor_id = active_cases.prof_id \n LEFT JOIN aio \n ON aio.aio_id = active_cases.aio_id\n ORDER BY active_cases.case_id \");\n\n return $result;\n\n }",
"function editor_joins(){\n //\n //begin with an empty collection of joins \n $joins=[];\n //\n //Push the editor joins also\n foreach ($this->editor_joins as $join){\n array_push($joins, $join);\n }\n //\n //Set the new joins \n $this->joins=new joins($joins);\n }",
"function portfolio_view_sql()\n\t{\n\t\t$view_port=mysqli_query($this->con,\"SELECT portfolio.*,categories.c_name FROM portfolio,categories where portfolio.c_id=categories.c_id order by portfolio.p_id desc\");\n\t\treturn $view_port;\n\t}",
"public function getSQL(){\n $sqlString = \"select \";\n $campos = $this->getCampos();\n //var_dump($campos);\n if (is_array($campos) && empty($campos)) {\n $sqlString .= \" * \";\n } else {\n $campos = \"\";\n foreach ($this->getCampos() as $key => $value) {\n if (!$campos == \"\") { \n $campos.=\" ,\"; \n };\n $campos.=\" \".$value.\" as \".$key.\" \";\n }\n $sqlString .= $campos;\n }\n $sqlString .= \" from \" . $this->getTabla();\n if ( $this->getSQLFilter() != \"\" ) {\n $sqlString .= \" where \" . $this->getSQLFilter();\n }\n \n $sqlString .= $this->getSQLGroupBy();\n $sqlString .= $this->getSQLOrderBy();\n //echo $sqlString.\"\\n\";\n return $sqlString; \n }",
"function getmyepics($epicOwnerID)\n {\n //$myepics = \"SELECT * from epics\";\n $myepics= \"SELECT e.*,staff.*,epics_statuses.name as epicsname,team.name as teamname\n FROM epics AS e\n LEFT JOIN epics_statuses AS epics_statuses ON epics_statuses.id = e.e_status_id\n LEFT JOIN team AS team ON team.id = e.team_id\n LEFT JOIN staff AS staff ON staff.staff_id = e.e_owner WHERE e.e_owner='\".$epicOwnerID.\"'\"; \n $myepicsresult = $this->ds->select($myepics); \n //print_r($myepicsresult);\n return $myepicsresult;\n }",
"function queryOther($conn, $currentid, $currenttable, $currentfield){\n\t\t\t$otherquery = \"SELECT $currentfield FROM $currenttable WHERE id='$currentid'\";\n\t\t\t$result = $conn->query($otherquery);\n\t\t\techo \"Selected $currenttable: \";\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t\techo $row[\"$currentfield\"] . \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</br>\";\n\t\t}",
"protected function _getSqlBase() {\n $sql = $this->getModel()->getTableName().' '.$this->getModel()->getAlias() .\" \n JOIN \".$this->_getPedido()->getModel()->getTableName().\" pedido ON ( cv_item_pedido.id_pedido = pedido.id ) \n JOIN \".$this->_getProduto()->getModel()->getTableName().\" produto ON ( cv_item_pedido.id_produto = produto.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_inc ON ( cv_item_pedido.id_usu_inc = usu_inc.id ) \n JOIN \".$this->_getConta()->getModel()->getTableName().\" usu_alt ON ( cv_item_pedido.id_usu_alt = usu_alt.id ) \"; \n return $sql;\n }",
"function trainer_view_sql()\n\t{\n\t\t$view_trainer=mysqli_query($this->con,\"SELECT trainer.*,categories.c_name FROM trainer,categories where trainer.c_id=categories.c_id and trainer.status=1 order by trainer.t_id desc\");\n\t\treturn $view_trainer\t;\n\t}",
"public function getQueryFrom() {\n $R = 'R_'. $this->id;\n return \"INNER JOIN tracker_changeset_value AS $R ON ($R.changeset_id = c.id)\";\n }",
"function operasiJoin(){\n\t\t$date = date('Y-m-d');\n\t\t$query = $this->db->query(\"SELECT o.id_operasi, o.operasi, o.id_alat, a.id_kategori, o.tanggal, o.keterangan, a.nama_alat FROM operasi o INNER JOIN alat a ON o.id_alat = a.id_alat WHERE o.tanggal = '$date'\"); \n\t\treturn $query->result();\n\t}",
"function getallepics()\n {\n //$allepics = \"SELECT * from epics\";\n $allepics= \"SELECT e.*,staff.*,epics_statuses.name as epicsname,team.name as teamname\n FROM epics AS e\n LEFT JOIN epics_statuses AS epics_statuses ON epics_statuses.id = e.e_status_id\n LEFT JOIN team AS team ON team.id = e.team_id\n LEFT JOIN staff AS staff ON staff.staff_id = e.e_owner\"; \n $allepicsresult = $this->ds->select($allepics); \n //print_r($myepicsresult);\n return $allepicsresult;\n }",
"function get_mapping() {\n\n\n $query = $this->db->query('SELECT\n A.map_id\n ,C1.stage_title AS place_name\n ,C2.stage_title AS dress_name\n ,C3.stage_title AS crown_name\n ,C4.stage_title AS stage_name\n ,C5.stage_title AS props_name\n ,B.character_name AS char_name \n ,A.image_path \nFROM mapping AS A\nINNER JOIN stage AS C1\n ON A.place_id = C1.id\nINNER JOIN stage AS C2\n ON A.dress_id = C2.id\n\n INNER JOIN stage AS C3\n ON A.crown_id = C3.id\n\n INNER JOIN stage AS C4\n ON A.stage_id = C4.id\n \n INNER JOIN stage AS C5\n ON A.props_id = C5.id\n\nINNER JOIN napoleon_characters AS B ON A.character_id = B.character_id');\n\n// $this->db->where('id', $intid);\n// $query = $this->db->get();\n// echo \"<pre>\";\n// print_r($query->result_array());\n// die;\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n else {\n return array();\n }\n }",
"public function select() \n { \n $this->load->database(); \n $query = $this->db->query(\"SELECT * FROM empresa p inner join persona c on p.Persona_idPersona = c.idPersona \");\n $this->db->close();\n return $query->result();\n }",
"function selectSubcategory() {\n\n\tglobal $db;\n\n\tglobal $result;\n\n\t$query = \"SELECT * FROM sub_category \";\n\t$query .= \"LEFT JOIN category ON sub_category.cat_name_id = category.cat_id\";\n\n\t$result = mysqli_query($db, $query);\n\n\tconfirmQuery($result);\n\n\n\n}",
"function sqlStudentTajuk()\n\t{\n\t\t//echo '<hr>Nama class ini :' . __METHOD__ . '()<hr>';\n\t\t$sql0 = \"SELECT 'Bil',\n\t\t'Student Name',\n\t\t'Roll No.',\n\t\t'Date of Birth',\n\t\t'Location & Grade',\n\t\t' Edit',\n\t\t' Delete' \";\n\t\t$sql = \" SELECT \\\"\\\" as Bil,\"\n\t\t. \" student_name 'Student Name',\"\n\t\t. \" student_roll_number 'Roll No.',\"\n\t\t. \" student_dob 'Date of Birth',\"\n\t\t. \" student_grade_id 'Location & Grade',\"\n\t\t. \" student_id ' Edit', student_id ' Delete' \"\n\t\t. \" FROM tbl_student INNER JOIN tbl_grade \"\n\t\t. \" ON tbl_grade.grade_id = tbl_student.student_grade_id \"\n\t\t. \"\";\n\n\t\treturn $sql0;\n\t}",
"public function producto_tralado_por_id($id_producto,$id_ingreso){\n $conectar= parent::conexion();\n $sql=\"select p.modelo,p.marca,p.medidas,p.color,e.id_producto,e.id_ingreso,e.categoriaub,e.stock from producto as p inner join existencias as e on p.id_producto=e.id_producto and e.id_producto=? and id_ingreso=?\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $id_producto);\n $sql->bindValue(2, $id_ingreso);\n $sql->execute();\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"function GetMultipleDataJoin($table1=false,$table2=false,$filter1=false,$filter2=false)\n\t{\t//echo $table1; echo $table2; echo $filter1; echo $filter2;die;\n\t\t$qry=$this->db->query(\"select $table1.*,$table2.* from $table1,$table2 where $table1.$filter1=$table2.$filter1 \");//print_r($qry);die;\n\t\treturn $qry->result();\n\t}",
"function getJoinFK($col,$tab1,$tab2,$key1,$key2){\n $array=array();\n $conn=connectDB();\n $query=\"SELECT $tab2.$col FROM $tab1 JOIN $tab2 ON $tab1.$key1 = $tab2.$key2\";\n foreach ($conn->query($query)as $row){\n array_push($array,$row[$col]);\n }\n return $array;\n }",
"public static function Rechercher_Stages(){\n\t\t \t//connexion à la base de données\n\t\t \t$oMysqliLib = new MySqliLib();\n\t\t \t//requête de recherche du Document\n\t\t \t$sRequete = \"SELECT * FROM stages\";\t\t \t\t\n\t\t \t\n\t\t \t//exécuter la requête\n\t\t \t$oResult = $oMysqliLib->executer($sRequete); \n\t\t \t//récupérer le tableau des enregistrements\n\t\t \t$aStage= $oMysqliLib->recupererTableau($oResult);\n\t\t\t\n\t\t \t//retourner array contenant les stages\n\t\t \treturn $aStage;\t\n\t\t }",
"public static function sq_selectSubjectsCourse()\n {\n return \"SELECT corsi.PK_id, corsi.nome AS c_name, lauree.nome AS l_name\n FROM corsi INNER JOIN lauree ON corsi.FK_laurea = lauree.PK_id\";\n }",
"public function fullOuterJoin($table);",
"function get_ons(){\n //\n //Map for each and return an on clause \n $col_str=array_map(array($this, 'map'), $this->foreigns); //\n //\n //Return on joined on \n return implode(\"AND \\t\",$col_str);\n }",
"function getJoin($table,$col,$join){\n $array=array();\n $conn=connectDB();\n $query=\"SELECT $table.$col FROM $join\";\n foreach ($conn->query($query)as $row){\n array_push($array,$row[$col]);\n }\n return $array;\n }",
"function sqlTeacherAll()\n\t{\n\t\t//echo '<hr>Nama class ini :' . __METHOD__ . '()<hr>';\n\t\t$sql = \"SELECT teacher_image,teacher_name,teacher_emailid,\"\n\t\t. \" grade_name,teacher_acc,teacher_id\"\n\t\t. \" FROM tbl_teacher INNER JOIN tbl_grade \"\n\t\t. \"\tON tbl_grade.grade_id = tbl_teacher.teacher_grade_id \"\n\t\t. \"\";\n\n\t\treturn $sql;\n\t}",
"function map_joins($join){\n //\n //return field to str\n return $join->to_str();\n }",
"function esadmin($user){\r\n$sql_queryadmin = \"Select * From usuario inner join administrador \r\n\t\t\t\t\ton administrador.admin_id = usuario.login \r\n\t\t\t\t\tWhere login = '$user';\";\t\r\n$result = pg_query($sql_queryadmin);\r\nreturn $result;}",
"function esadmin($user){\r\n$sql_queryadmin = \"Select * From usuario inner join administrador \r\n\t\t\t\t\ton administrador.admin_id = usuario.login \r\n\t\t\t\t\tWhere login = '$user';\";\t\r\n$result = pg_query($sql_queryadmin);\r\nreturn $result;}",
"function stream_results(){\r\n // \r\n //Get all the subjects that this student is taught \r\n $subjects= $this->get_student($stream, $grade, $year);\r\n //\r\n $sql= \"select student.name as name\";\r\n // \r\n //Appends every subjects name\r\n foreach ($subjects as $value) {\r\n //\r\n $sql.\"{$value}.score as $value\"; \r\n }\r\n \r\n }",
"function prikazi_sve($nesto) {\n\n\tglobal $db;\n\n\t$komanda = \"SELECT * FROM $nesto\";\n\techo prikazi($komanda);\n\n}",
"public function leftOuterJoin($table);",
"function sql_inner_join_select_statement(int $count, array $keys)\n {\n $sql = \"\";\n for($i = 0; $i < $count; $i++ ) {\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n\n $sql .= $t_name . \".value AS \" . $keys[$i];\n $sql .= ($i != $count - 1) ? \", \" : \"\";\n }\n return $sql;\n }",
"function get_single_object_info($id,$table, $Manipulation){\r\n $this->db->select('*');\r\n // $this->db->select('c.name as country_name');\r\n $this->db->from($table);\r\n // $this->db->join('country c','c.id = u.country','LEFT');\r\n $this->db->where($Manipulation,$id);\r\n $query = $this->db->get();\r\n $query = $query->row(); \r\n return $query;\r\n }",
"function getcursadas($usuario_id){ //Este metodo obtiene las cursadas de un determinado alumno activo.\r\n //Tecnica Query Binding.\r\n $sql = \"SELECT M.nombre, C.nota, C.fecha, C.id FROM cursadas C LEFT JOIN materias M ON C.materia_id = M.id WHERE C.usuario_id = ?\";\r\n $datos = $this->db->query($sql, array($usuario_id));\r\n return $datos->result_array();\r\n}",
"static function getLoadQry()\n {\n return \"SELECT `smartukm_band`.*, \n `td`.`td_demand`,\n `td`.`td_konferansier`\n \";\n }",
"public function crossJoin($table);",
"public function from($sql);",
"public static function budgethomeadmin(){\n \n $sql= DB::table('budgets')\n ->select('budgets.*', 'departments.department',DB::raw('FORMAT(budgets.cost,2) as costt'),DB::raw('DATE_FORMAT(budgets.created_at, \"%d-%b-%Y\") as date'))\n ->leftjoin('departments','budgets.department_id', '=', 'departments.id')\n ->whereIn('budgets.status',[1,3]) \n //->where('budgets.head_id',$logedid)\n ->get();\n return $sql; \n }",
"private function makeSelectAndFrom()\r\n\t{\r\n\t\t// Build SQL\r\n\t\t$sql = 'SELECT ';\r\n\t\r\n\t\t// Add custom fields (subqueries)\r\n\t\tif ($this->hasCustomFields())\r\n\t\t{\r\n\t\t\t// Find custom fields\r\n\t\t\tforeach ($this->fields as $field)\r\n\t\t\t{\r\n\t\t\t\tif ($field instanceOf CustomField)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql .= '(' . $field->query . ') AS `' . $field->name . '`, ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif (!$this->hasForeignFields())\r\n\t\t{\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\t$sql .= implode(', ', $this->selectFields) . ' ';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Take all fields\r\n\t\t\t\t$sql .= '`'.$this->name.'`.* ';\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$sql .= 'FROM `'.$this->name.'` ';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// Get foreign fields\r\n\t\t\t$cols = array();\r\n\t\r\n\t\t\tif (isset($this->selectFields))\r\n\t\t\t{\r\n\t\t\t\t// Use custom field selection\r\n\t\t\t\tforeach ($this->selectFields as $field)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cols[] = $field;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// Take all fields\r\n\t\t\t\t$cols[] = 't1.*';\r\n\t\t\t}\r\n\t\r\n\t\t\t$from_sql = 'FROM `'.$this->name.'` t1 ';\r\n\t\t\t$joined = array();\r\n\t\t\t$joins = array();\r\n\t\t\t$alias_no = 2;\r\n\t\t\t$tables[] = array('table' => $this->name, 'alias' => 't1');\r\n\t\r\n\t\t\t// Iterate over fields\r\n\t\t\tforeach ($this->fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$use_alias = false;\r\n\t\r\n\t\t\t\tif ($field instanceof ForeignField)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Check if foreign field should be included, if select fields were set\r\n\t\t\t\t\tif (isset($this->selectFields))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$found = false;\r\n\t\t\t\t\t\tforeach ($this->selectFields as $sel_field)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (str_contains($sel_field, $field->name))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$found = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!$found)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\t// Find out what kind of join it should be (INNER or LEFT)\r\n\t\t\t\t\t$join_type = strtoupper($field->joinType);\r\n\t\r\n\t\t\t\t\t// Check if it's a join between two foreign tables\r\n\t\t\t\t\tif ($field->joinFromTable == null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between this table and other table\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' => $this->name, \r\n\t\t\t\t\t\t\t'to_table' => $field->table,\r\n\t\t\t\t\t\t\t'from' => $field->joinFrom, \r\n\t\t\t\t\t\t\t'to' => $field->joinTo\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->CheckJoinExists($this_join, $joins))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table .'` t'.$alias_no.' ON t1.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Join between two other tables\r\n\t\r\n\t\t\t\t\t\t// Check if we need to make a new join\r\n\t\t\t\t\t\t$this_join = array(\r\n\t\t\t\t\t\t\t'from_table' \t=> $this->table_name, \r\n\t\t\t\t\t\t\t'to_table' \t\t=> $field->foreign_field->table,\r\n\t\t\t\t\t\t\t'from' \t\t\t=> $field->foreign_field->join_from, \r\n\t\t\t\t\t\t\t'to' \t\t\t=> $field->foreign_field->join_to\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tif (!$this->checkJoinExists($this_join, $joins)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false) \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON '.$alias.'.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t} \r\n\t\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$from_sql .= $join_type.' JOIN `'.$field->table.'` t'.$alias_no.' ON `'.$field->joinFromTable.'`.`'.$field->joinFrom.'` = t'.$alias_no.'.`'.$field->joinTo.'` ';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$joins[] = $this_join;\r\n\t\t\t\t\t\t\t$use_alias = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\r\n\t\t\t\t\tif ($use_alias)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$cols[] = 't'.$alias_no.'.`'.$field->foreignFieldName .'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t$tables[] = array('table' => $field->table, 'alias' => 't'.$alias_no);\r\n\t\t\t\t\t\t$alias_no++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t// Check if table has alias\r\n\t\t\t\t\t\tif (($alias = $this->tableHasAlias($field->table, $tables)) !== false)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = $alias.'.`'.$field->foreignFieldName.'` AS `'.$field->name .'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$cols[] = '`'.$field->table.'`.`'.$field->foreignFieldName.'` AS `'.$field->name.'`';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->tableAliases = $tables;\r\n\t\r\n\t\t\t$sql .= implode(', ', $cols).' '.$from_sql;\r\n\t\r\n\t\t\t$this->table_aliases = $tables;\r\n\t\t}\r\n\t\r\n\t\treturn $sql;\r\n\t}",
"function _inscription_jesa_prochain_stage($account_uid) {\n $query = '\n SELECT\n IFNULL(p.field_stagiaire_paiement_value, 0) AS paiement,\n IFNULL(f.field_stagiaire_formulaire_value, 0) AS formulaire,\n n.title\n FROM\n field_data_field_stagiaire_user u\n JOIN field_data_field_stagiaire_stage s\n ON s.entity_type = u.entity_type\n AND s.bundle = u.bundle\n AND s.revision_id = u.revision_id\n AND s.delta = 0\n AND s.deleted = 0\n AND s.entity_id = u.entity_id\n JOIN field_data_field_stage_dates d\n ON d.entity_type = s.entity_type\n AND d.bundle = :stage_bundle\n AND d.revision_id = s.field_stagiaire_stage_nid\n AND d.delta = 0\n AND d.deleted = 0\n AND d.entity_id = s.field_stagiaire_stage_nid\n JOIN node n\n ON n.nid = s.field_stagiaire_stage_nid\n JOIN field_data_field_stagiaire_paiement p\n ON p.entity_type = u.entity_type\n AND p.bundle = u.bundle\n AND p.revision_id = u.revision_id\n AND p.delta = 0\n AND p.deleted = 0\n AND p.entity_id = u.entity_id\n JOIN field_data_field_stagiaire_formulaire f\n ON f.entity_type = u.entity_type\n AND f.bundle = u.bundle\n AND f.revision_id = u.revision_id\n AND f.delta = 0\n AND f.deleted = 0\n AND f.entity_id = u.entity_id\n WHERE\n u.entity_type = :entity_type\n AND u.bundle = :stagiaire_bundle\n AND u.deleted = 0\n AND u.language = :language\n AND u.delta = 0\n AND u.field_stagiaire_user_uid = :uid\n AND d.field_stage_dates_value2 >= DATE_FORMAT(now(),:format_date)\n ';\n\n\ttry {\n $results = db_query_range(\n $query,\n 0,\n 1,\n array(\n ':entity_type' => 'node',\n ':stage_bundle' => 'stage',\n ':stagiaire_bundle' => 'stagiaire',\n ':language' => LANGUAGE_NONE, //language indépendant\n ':uid' => $user->uid, // pour l'utilisateur connecté\n ':format_date' => '%Y-%m-%dT00:00:00', //dans le futur\n ),\n array('throw_exception' => TRUE,));\n }\n catch(PDOException $e) {\n watchdog_exception('jesa inscription', $e, 'DB error of %type: !message in %function (line %line of %file).', array(), WATCHDOG_ALERT, NULL);\n throw new ErrorException(\n t('Error during database access.'),\n 0,\n E_USER_NOTICE\n );\n }\n return $results->fetchAll();\n}",
"public function getSystems()\r\n{\r\n $query_string = \"SELECT systemid, systemname \";\r\n $query_string .= \"FROM voting_system\";\r\n\r\n return $query_string;\r\n}",
"function to_str(){\n //\n //Get the name of the entity \n $ename= $this->entity->name;\n //\n //The type of the join eg inner join, outer join\n $join_str=\"$this->type\"\n //\n //The on clause\n . \"\\t `$ename` \\tON \\t{$this->get_ons()}\";\n return $join_str;\n }",
"public function checkPickup(){\n $point=input::get('pointid');\n\n $tmp=DB::table('tmp_pickup')->join('ms_pickup','tmp_pickup.pick_id','=','ms_pickup.pick_id')->where('id','=',$point)->first();\n echo ''.$tmp->city.'';\n }",
"function getCustInact($db_link){\n\t\t$sql_custinact = \"SELECT * FROM customer LEFT JOIN custsex ON custsex.custsex_id = customer.custsex_id WHERE cust_id != 0 AND cust_active != 1 ORDER BY cust_id\";\n\t\t$query_custinact = mysqli_query($db_link, $sql_custinact);\n\t\tcheckSQL($db_link, $query_custinact, $db_link);\n\n\t\treturn $query_custinact;\n\t}",
"public function query() {\n /** @var Sql $query */\n $query = $this->query;\n\n $configuration = array(\n 'table' => 'node_field_revision',\n 'field' => 'vid',\n 'left_table' => 'node_field_data',\n 'left_field' => 'vid',\n 'operator' => '=',\n 'type'=>'INNER',\n 'left_query' => 'select max(vid) from node_field_revision where nid = nfr.nid',\n 'extra' => 'node_field_data.nid = nfr.nid',\n );\n\n /** @var Subquery $join */\n $join = Views::pluginManager('join')->createInstance('subquery', $configuration);\n\n $query->addRelationship(\"nfr\", $join ,'node_field_revision' );\n $query->addWhere(0, 'nfr.moderation_state', $this->value, 'IN');\n }",
"function esprEspMarchiID($con) {\n $result = mysqli_query($con,\"SELECT mark_id, mark_nome FROM esposizioni_prodotti JOIN marchi ON marchi.mark_nome = esposizioni_prodotti.espr_mark_esp\");\n while($row= mysqli_fetch_array($result)) {\n $mark_id = $row['mark_id'];\n $mark_nome = $row['mark_nome'];\n $sql=\"UPDATE esposizioni_prodotti SET espr_mark_esp_id='$mark_id' WHERE espr_mark_esp = '$mark_nome'\";\n mysqli_query($con,$sql);\n }\n}",
"public function f_get_distPoints()\n {\n\n // $sql = $this->db->query(\"SELECT DISTINCT a.sl_no, b.bdo_name \n // FROM md_dist_point a , md_dm_bdo b \n // WHERE a.dist_cd = b.dist_cd\n // AND a.sdo = b.sdo_cd\n // AND a.bdo = b.sl_no \");\n\n$sql = $this->db->query(\"SELECT DISTINCT a.sl_no, b.bdo_name,c.sdo_name sdo_name,a.agent\n FROM md_dist_point a , md_dm_bdo b ,md_dm_sdo c\n WHERE a.dist_cd = b.dist_cd \n AND b.dist_cd = c.dist_cd\n and a.sdo =c.sl_no\n and a.bdo = b.sl_no\");\n echo $this->db->last_query();\n return $sql->result();\n \n }",
"function getCustAct($db_link){\n\t\t$sql_custact = \"SELECT * FROM customer LEFT JOIN custsex ON custsex.custsex_id = customer.custsex_id WHERE cust_id != 0 AND cust_active = 1 ORDER BY cust_id\";\n\t\t$query_custact = mysqli_query($db_link, $sql_custact);\n\t\tcheckSQL($db_link, $query_custact, $db_link);\n\n\t\treturn $query_custact;\n\t}",
"function select() {\n // TODO: clb.organization_name should only be selected if a primary relationship exists.\n return \"\n contact_a.id AS contact_id,\n contact_a.last_name,\n contact_a.first_name,\n contact_a.preferred_language,\n ca.street_address as contact_street_address,\n ca.postal_code as contact_postal_code,\n ca.city as contact_city,\n cc.name as contact_country,\n email,\n phone,\n clb.organization_name\n \";\n }",
"function listQueryPajak() {\n $sql = \"select * from \" . static::table('ms_pajak');\n\n return $sql;\n }",
"protected function innerJoinImages(){\n return ' INNER JOIN ImageDetails ON PostImages.ImageID = ImageDetails.ImageID';\n }",
"public static function listaSabana($idsede, $idfacultad, $anio)\n {\n $sql =\"SELECT sed.nombre as sede, CONCAT(car.nombre,' - ',pe.nombre) as carreraplan, car.nombre as carrera, fac.nombre as facultad, CONCAT(per.apellido,', ',per.nombre) as persona,\n per.apellido, per.nombre,\n tp.descripcion as tipodocumento, \n per.numerodoc,\n m.nombre as materia,\n td.descripcion as tipodesignacion,\n cd.descripcion as categoria, \n cd.idcategoriadesignacion,\n edes.descripcion as estadodesignacion,\n mp.anodecursada,\n IFNULL(des.horas, 0 ) as horas,\n td.descripcion as tipo, \n if(des.adhonorem,'AD HONOREM','') as adhonorem, \n if(des.licencia,'EN LICENCIA','') as licencia, \n ded.descripcion as dedicacion,\n sed.abreviacion as sedeabreviada,\n car.idcarrera,\n YEAR(des.inicio) as ciclolectivo,\n DATE_FORMAT(des.inicio, '%d/%m/%Y') AS inicioformat, DATE_FORMAT(des.fin, '%d/%m/%Y') AS finformat,\n des.idresolucionprofesor,\n rp.resolucion,\n des.iddesignacion \n FROM designaciones des \n JOIN estados_designaciones edes ON des.idestadodesignacion = edes.idestadodesignacion\n JOIN profesores prof ON des.idprofesor = prof.idprofesor\n JOIN personas per ON prof.idpersona = per.idpersona \n JOIN tipos_documentos tp ON per.idtipodoc = tp.idtipodoc\n JOIN dedicaciones ded ON des.iddedicacion = ded.iddedicacion\n JOIN catedras cat ON des.idcatedra = cat.idcatedra \n JOIN sedes sed ON cat.idsede = sed.idsede \n JOIN materias_planes mp ON cat.idmateriaplan = mp.idmateriaplan\n JOIN materias m ON mp.idmateria = m.idmateria\n JOIN planes_estudios pe ON mp.idplanestudio = pe.idplanestudio\n JOIN carreras car ON pe.idcarrera = car.idcarrera \n JOIN facultades fac ON car.idfacultad = fac.idfacultad \n JOIN tipos_designaciones td ON des.idtipodesignacion = td.idtipodesignacion\n JOIN categoria_designaciones cd ON td.idcategoriadesignacion= cd.idcategoriadesignacion \n LEFT JOIN resoluciones_profesores rp ON des.idresolucionprofesor = rp.idresolucionprofesor\n WHERE des.idestadodesignacion = 4 AND YEAR(des.inicio)= \".$anio.\" AND car.idfacultad = \".$idfacultad.\" AND sed.idsede= \".$idsede.\" \n ORDER BY car.nombre, per.apellido; \";\n \n $q = Doctrine_Manager::getInstance()->getCurrentConnection()->fetchAssoc($sql);\n\n return $q;\n }",
"function operasiJoin3(){\n\t\t$date = date('Y-m-d');\n\t\t$query = $this->db->query(\"SELECT k.id_kondisi, k .kondisi, k.id_alat, a.id_kategori, k.tanggal, k.keterangan AS keterangan_kondisi , a.nama_alat FROM kondisi k INNER JOIN alat a ON k.id_alat = a.id_alat WHERE k.tanggal='$date' GROUP BY a.id_alat\"); \n\t\treturn $query->result();\n\t}",
"private function sql_join($filter, $structure) {\n\t\t$sql = \"\";\n\t\t$table = $structure['table'];\n\t\t$class = $structure['class'];\n\t\t$pool_class = $class . 'Pool_Model';\n\t\t$full_structure = $pool_class::get_full_structure();\n\t\tforeach ($structure['relations'] as $relation) {\n\t\t\tlist($foreign_key, $foreign_table, $key) = $relation;\n\t\t\t$foreign_structure = $full_structure[$foreign_table];\n\t\t\t$ftable = $foreign_structure['table'];\n\t\t\t$join_expr = ' LEFT JOIN '.$ftable.' AS '.$key;\n\t\t\t$join_expr .= ' ON '.implode(' AND ',array_map(function($fk,$lk) use($key,$table) {\n\t\t\t\treturn \"$key.$fk = $table.$lk\";\n\t\t\t}, $foreign_structure['key'], $foreign_key));\n\t\t\t$sql .= $join_expr;\n\t\t}\n\t\treturn $sql;\n\t}",
"function rel_cliente_ag(){\r\n\t\t$db = banco();\r\n\t\t\r\n\t\t$query =\"SELECT user.cod, user.name, user.cpf, cliente.fone, especialidade.nom_espec, consulta.dt_consul, consulta.aprovado, consulta.presente\r\n\t\t\t\tFROM user, cliente, consulta, especialidade\r\n\t\t\t\tWHERE user.cod = cliente.cod_clien AND\r\n\t\t\t\t\t user.cod = consulta.cod_clien AND\r\n\t\t\t\t\t consulta.cd_esp = especialidade.cod_espec\r\n\t\t\t\t\t \r\n\t\t\t\t\";\r\n\t\t$row = $db->query($query);\r\n\t\t$db->close();\r\n\t\treturn $row;\t\r\n\t}",
"function select() {\r\n $ing_item = $this->ing_item;\r\n $ing_estado_ingreso = $this->ing_estado_ingreso;\r\n $ing_item = $this->ing_item;\r\n $prov_id = $this->prov_id;\r\n $ing_numerodoc = $this->ing_numerodoc;\r\n $ing_tipodoc = $this->ing_tipodoc;\r\n $bod_codigo = $this->bod_codigo;\r\n\r\n $sql = \"SELECT * FROM ing_ingreso_det h INNER JOIN ingreso_compra p ON p.ing_numerodoc = h.ing_numerodoc WHERE p.ing_estado_doc > '0' \";\r\n if ($ing_estado_ingreso != null) {\r\n $sql = $sql . \"AND h.ing_estado_ingreso = '\" . $ing_estado_ingreso . \"' \";\r\n } else {\r\n $sql = $sql . \"AND h.ing_estado_ingreso > '0' \";\r\n }\r\n if ($ing_item != null) {\r\n $sql = $sql . \"AND h.ing_item = '\" . $ing_item . \"' \";\r\n }\r\n if ($prov_id != null) {\r\n $sql = $sql . \"AND h.prov_id = '\" . $prov_id . \"' \";\r\n }\r\n if ($ing_numerodoc != null) {\r\n $sql = $sql . \"AND h.ing_numerodoc = '\" . $ing_numerodoc . \"' \";\r\n }\r\n if ($ing_tipodoc != null) {\r\n $sql = $sql . \"AND h.ing_tipodoc = '\" . $ing_tipodoc . \"' \";\r\n }\r\n if ($bod_codigo != null) {\r\n $sql = $sql . \"AND h.bod_codigo = '\" . $bod_codigo . \"' \";\r\n }\r\n\r\n\r\n $result = $this->database->query($sql);\r\n\r\n $i = 0;\r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arringdet[$i]['ing_item'] = $datos['ing_item'];\r\n $this->arringdet[$i]['prov_id'] = $datos['prov_id'];\r\n $this->arringdet[$i]['ing_numerodoc'] = $datos['ing_numerodoc'];\r\n $this->arringdet[$i]['ing_tipodoc'] = $datos['ing_tipodoc'];\r\n $this->arringdet[$i]['prod_equiv_id'] = $datos['prod_equiv_id'];\r\n $this->arringdet[$i]['bod_codigo'] = $datos['bod_codigo'];\r\n $this->arringdet[$i]['prod_codigo'] = $datos['prod_codigo'];\r\n $this->arringdet[$i]['ing_bodega'] = $datos['ing_bodega'];\r\n $this->arringdet[$i]['ing_zeta'] = $datos['ing_zeta'];\r\n $this->arringdet[$i]['ing_cantidad1'] = $datos['ing_cantidad1'];\r\n $this->arringdet[$i]['ing_cantidad_bulto'] = $datos['ing_cantidad_bulto'];\r\n $this->arringdet[$i]['ing_unid_bulto'] = $datos['ing_unid_bulto'];\r\n $this->arringdet[$i]['ing_valor1'] = $datos['ing_valor1'];\r\n $this->arringdet[$i]['ing_valor2'] = $datos['ing_valor2'];\r\n $this->arringdet[$i]['ing_estado_ingreso'] = $datos['ing_estado_ingreso'];\r\n $this->arringdet[$i]['ing_peso'] = $datos['ing_peso'];\r\n $this->arringdet[$i]['ing_umed_peso'] = $datos['ing_umed_peso'];\r\n $this->arringdet[$i]['ing_valor_total'] = $datos['ing_valor_total'];\r\n\r\n $this->arringdet[$i]['ing_correlativo'] = $datos['ing_correlativo'];\r\n $this->arringdet[$i]['ing_fechadoc'] = $datos['ing_fechadoc'];\r\n $this->arringdet[$i]['ing_fechavisacion'] = $datos['ing_fechavisacion'];\r\n $this->arringdet[$i]['ing_numerovisacion'] = $datos['ing_numerovisacion'];\r\n $this->arringdet[$i]['ing_moneda'] = $datos['ing_moneda'];\r\n $this->arringdet[$i]['ing_tipodecambio'] = $datos['ing_tipodecambio'];\r\n $this->arringdet[$i]['ing_iva'] = $datos['ing_iva'];\r\n $this->arringdet[$i]['ing_ciftotal'] = $datos['ing_ciftotal'];\r\n $this->arringdet[$i]['ing_costototal'] = $datos['ing_costototal'];\r\n $this->arringdet[$i]['ing_viutotal'] = $datos['ing_viutotal'];\r\n $this->arringdet[$i]['ing_estado_pago'] = $datos['ing_estado_pago'];\r\n $this->arringdet[$i]['ing_estado_doc'] = $datos['ing_estado_doc'];\r\n $this->arringdet[$i]['ing_neto'] = $datos['ing_neto'];\r\n $this->arringdet[$i]['ing_total'] = $datos['ing_total'];\r\n $this->arringdet[$i]['ing_tipodocsve'] = $datos['ing_tipodocsve'];\r\n $this->arringdet[$i]['ing_bodega_rec'] = $datos['ing_bodega_rec'];\r\n }\r\n }",
"function cf_search_join( $join ) {\n global $wpdb;\n\n if ( is_search() ) { \n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n\n return $join;\n}",
"protected function joining_table()\n {\n return $this->connection()->table($this->joining);\n }",
"function clonTable1toTable2Inscritos($T_INSCRITOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"INSERT INTO inscritostmp SELECT * FROM \".$TINS.\" WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}",
"function cf_search_join( $join ) {\n global $wpdb;\n if ( is_search() ) {\n $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n }\n return $join;\n}",
"function liste_stagesBIS($args) {\n // ------------\n\n $query = '\n SELECT DISTINCT m.co_modu,\n mp.module_alert,\n mp.module_printed,\n mp.prioritaire,\n mp.organisation,\n m.lib AS libm,\n d.co_disp,\n id_disp,\n d.lib AS libd,\n co_camp,\n co_andi,\n co_anmo,\n (select MIN(date) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0) as dateD,\n (select MAX(date) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0) as dateF,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0 AND convoc_sent=0) as nb_nea,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND convoc_sent=1) as nb_s,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=1) as nb_ea,\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND session_alert=1) as nb_sa,\n (select count({gbb_file}.fid) from {gbb_file} JOIN {file_managed} ON {file_managed}.fid={gbb_file}.fid Where co_modu=mp.co_modu AND co_degre=mp.co_degre AND status=1) as nb_pj\n FROM {gbb_gmodu} as m\n LEFT JOIN {gbb_gmodu_plus} as mp ON mp.co_modu=m.co_modu\n AND mp.co_degre=m.co_degre\n JOIN {gbb_gdisp} as d ON m.co_disp=d.co_disp\n AND m.co_degre=d.co_degre \n JOIN {gbb_gdire} as j ON m.co_modu=j.co_modu\n AND m.co_degre=j.co_degre \n WHERE d.co_degre IN (:codegre)\n AND id_disp LIKE :year\n ';\n $variables = array();\n $variables[':year'] = arg(1) . '%';\n $variables[':codegre'] = arg(2);\n\n if ( arg(4)=='' ) {\n // On récupère le co_resp par défaut.dans le profil du user connecté\n global $user;\n $qu = db_select('field_data_field_id_resp', 'u')\n ->condition('u.entity_id', $user->uid, '=')\n ->fields('u', array('field_id_resp_value'));\n $input = $qu->execute()->fetchField();\n } else {\n // L'URL ne la donne pas, donc la variable $co_resp est la valeur par défaut\n $input = arg(4);\n };\n\n // Si $input est numérique alors c'est bien un co_resp\n // Si $input est une chaine, alors c'est un nomu, il faut récupérer les co_resp correspondants\n if( $input == 'TOUS' ) {\n //echo $input.\" is String\";\n } elseif( preg_match('/[^0-9]/', $input) ) {\n //echo $co_resp.\" is String\";\n //$tabResp = array(\"2011\", \"1690\");\n $matches = array();\n $tabResp = db_select('gbb_gresp', 'c')\n ->fields('c', array('co_resp'))\n ->condition('nomu', '' . db_like($input) . '', 'LIKE')\n ->distinct()\n ->execute()->fetchCol();\n $variables[':coresp'] = $tabResp;\n //print_r($tabResp);\n $query .=' AND j.co_resp IN (:coresp) ';\n } else {\n //echo $co_resp.\" is Int\";\n $tabResp = array( $input);\n $variables[':coresp'] = $tabResp;\n $query .=' AND j.co_resp IN (:coresp) ';\n };\n\n\n\n $voirEnCours = (isset($_GET['voir_encours']))? (($_GET['voir_encours']==1)? TRUE : FALSE) : FALSE;\n\n if ($voirEnCours) {\n // les administratifs\n // voient seulement les stages qui ont\n // - OU module_alert = 1\n // - OU ( nb session_alert = 1 ) > 0\n // - OU ( nb de convoc_sent = 1 ) < (nb en_attente = 0 )\n $query .= '\n AND (\n mp.module_alert = 1\n OR\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND session_alert=1) > 0\n OR\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND convoc_sent=1) <\n (select count(*) from {gbb_session} WHERE co_modu=m.co_modu AND co_degre=m.co_degre AND en_attente=0)\n )\n ';\n }\n\n if (arg(3)!=0) {\n $query .= 'AND j.co_tres = :cotres ';\n $variables[':cotres'] = arg(3);\n };\n if (arg(5)!='0' && arg(5)!='') {\n $query .= 'AND d.co_orie = :coorie ';\n $variables[':coorie'] = arg(5);\n };\n\n if ( !isset($_GET['voir_ferme']) || $_GET['voir_ferme']==0 ) {\n $query .= 'AND co_anmo = \\'\\'';\n }\n \n $result = db_query($query, $variables);\n\n $liste = array();\n $libd_precedent= '';\n $rows = array();\n\n $header = array(\n 'col0' => array('data' => \"dispo\"), \n 'col1' => array('data' => \"status\"), \n 'col2' => array('data' => \"Le \" .\n format_date(time(), 'custom', 'l j F Y à H:i') .\n \", \" .\n $result->rowCount() .\n \" stages.\" \n ),\n 'col3' => array('data' => \"..\"), \n );\n\n foreach ($result as $r) {\n $m_ouvert_ou_ferme = ($r->co_anmo == '')? '' : 'Ferme';\n $options_comodu = array('attributes' => array('class' => array($m_ouvert_ou_ferme),\n 'id' => 'cool-id',\n ),\n 'html' => FALSE,\n );\n\n $d_ouvert_ou_ferme = ($r->co_andi == '')? '' : 'Ferme';\n\n $paf_ou_fil = ($r->co_camp == 'BS')? 'fil' : 'paf';\n $libd_class = ($r->co_camp == 'BS')? 'fil' : 'paf';\n $libd_class = ($r->libd == $libd_precedent)? \"gris\" : $libd_class;\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/flag_red.png',\n 'alt' => 'session_alert',\n 'title' => t('Alerte sur session'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $session_alert = ($r->nb_sa >0)? theme('image', $variables) . '<span class=\"nb_sa\">' . $r->nb_sa . '</span>'. '<span class=\"invisible\">></span> ' : '';\n\n $play = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/control_play_blue.png',\n 'alt' => 'session_alert',\n 'title' => t('session en route'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $NOT_en_attente = ($r->nb_nea >0)? theme('image', $play) . '<span class=\"nb_sa\">' . $r->nb_nea . '</span>'. '<span class=\"invisible\">></span> ' : '';\n\n $pause = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/control_pause.png',\n 'alt' => 'en_attente',\n 'title' => t('En attente'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $en_attente = ($r->nb_ea >0)? theme('image', $pause) . '<span class=\"nb_sa\">' . $r->nb_ea . '</span>' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/convoc_printed.gif',\n 'alt' => 'module_printed',\n 'title' => t('Imprimé'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $module_printed = ($r->module_printed && $voirEnCours)? theme('image', $variables) . ' ' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/flag_red.png',\n 'alt' => 'module_alert',\n 'title' => t('Alerte entre conseillers'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $module_alert = ($r->module_alert)? theme('image', $variables). '<span class=\"invisible\">></span> ' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/prioritaire.png',\n 'alt' => 'prioritaire',\n 'title' => t('Prioritaire'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $prioritaire = ($r->prioritaire)? theme('image', $variables) . '<span class=\"invisible\">!</span> ' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/convoc_sent.png',\n 'alt' => 'convoc_sent',\n 'title' => t('Convocations envoyées'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $convoc_sent = ($r->nb_s >0)? theme('image', $variables) . '<span class=\"nb_sa\">' . $r->nb_s . '</span>' : '';\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/attachement.gif',\n 'alt' => 'convoc_sent',\n 'title' => t('Fichier(s) attaché(s)'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $attachement = ($r->nb_pj > 0)? theme('image', $variables) . '<span class=\"nb_pj\">' . $r->nb_pj . '</span>' : '';\n\n $comments = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/comments.png',\n 'alt' => 'Organisation et dates de session',\n 'title' => t('Organisation et dates de session'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $comment = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/comment.png',\n 'alt' => 'Dates de session',\n 'title' => t('Dates de session'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n $plus = ($r->organisation == '')? '' : ' ' . theme('image', $comments);\n\n $variables = array(\n 'path' => drupal_get_path('module', 'gaiabb') . '/images/timer_green.png',\n 'alt' => 'Timer',\n 'title' => t('Première date dans plus de 15 jours'),\n 'attributes' => array('class' => 'some-img', 'id' => 'my-img'));\n if (strtotime($r->dateD) < time()) { // le premier jour dépassé\n $variables['path']=drupal_get_path('module', 'gaiabb') . '/images/timer_red.png';\n $variables['title']=t('Première date dépassée');\n } elseif(strtotime($r->dateD) < time() + 1296000) { // le premier jour est dans moins de 15 jours.\n $variables['path']=drupal_get_path('module', 'gaiabb') . '/images/timer_orange.png';\n $variables['title']=t('Première date dans moins de 15 jours');\n };\n if (strtotime($r->dateF) < time()) { // le dernier jour jour dépassé donc formation finie\n $variables['path']=drupal_get_path('module', 'gaiabb') . '/images/timer_end.png';\n $variables['title']=t('Formation terminée');\n }\n $timer = theme('image', $variables);\n\n if (isset($r->dateD)) {\n if ($r->dateD==$r->dateF) {\n $dates = $timer . t(\" \" . strftime('%d/%m/%y', strtotime($r->dateD))) ; \n } else {\n $dates = $timer . t(\" \" . strftime('%d/%m/%y', strtotime($r->dateD)) . \"→\" . strftime('%d/%m/%y', strtotime($r->dateF)));\n };\n } else {\n $dates ='';\n };\n\n$formateurs ='';\n //if (user_access('unstable gaiabb')) {\n $qf = db_select('gbb_session', 's');\n $qf ->leftjoin('gbb_gresp_dafor', 'r', 'r.co_resp = s.co_resp AND r.co_degre=s.co_degre');\n $qf ->condition('s.co_degre', arg(2), '=')\n ->condition('s.co_modu', $r->co_modu, '=')\n ->fields('r', array('nomu', 'prenom'))\n ->fields('s', array('date', 'en_attente'));\n $fo = $qf->execute();\n $items = array();\n foreach ($fo as $f) {\n $items[] = (($f->en_attente)? theme('image', $pause) : '' ) . ' ' .\n $f->date . ' - ' . \n $f->prenom . ' ' . $f->nomu;\n };\n $formateurs = theme('item_list', array('items' => $items));\n//}\n\n/*$rows[] = array( \n 'col0' => array('data' => \n '<span class=\"invisible\">' . $paf_ou_fil . '*' . '</span> ' .\n '<span class=\"' .$paf_ou_fil . ' ' . $d_ouvert_ou_ferme . '\">[' . strtoupper($paf_ou_fil) . \"] \" . $r->id_disp . ' ' . t($r->libd) . '</span> '\n ),\n 'col1' => array('data' => \".\"\n ),\n 'col2' => array('data' => \".\"\n ),\n 'col3' => array('data' => \".\"\n ),\n 'col4' => array('data' => \".\"\n ),\n );\n*/\n $rows[] = array( \n 'col0' => array('data' => \n '<span class=\"invisible\">' . $paf_ou_fil . '*' . '</span> ' .\n '<span class=\"' .$paf_ou_fil . ' ' . $d_ouvert_ou_ferme . '\">[' . strtoupper($paf_ou_fil) . '' . $d_ouvert_ou_ferme . \"] \" . $r->id_disp . ' ' . t($r->libd) . '</span> '\n ),\n 'col1' => array('data' => \n $attachement .\n $module_printed .\n $convoc_sent .\n $session_alert .\n $NOT_en_attente .\n $en_attente .\n $module_alert .\n $prioritaire,\n 'class' => 'nowrap',\n ),\n 'col2' => array('data' =>\n l($r->co_modu, 'gest_module/' . arg(2) . '/' . $r->co_modu, $options_comodu) . ' ' .\n '<span class=\"' . $m_ouvert_ou_ferme . '\">' . $d_ouvert_ou_ferme . ' ' . t($r->libm) . $plus . '</span> ',\n ),\n 'col3' => array('data' => nl2br($r->organisation). $formateurs ,\n ),\n 'col4' => array('data' => $dates,\n ),\n );\n $libd_precedent = $r->libd;\n }\n $attributes = array('id' => 'table-id', 'class' => array('display'));\n return theme('table', array('rows' => $rows, 'attributes' => $attributes));\n}",
"function queryRicercaTuttiGliUtenti(){\r\n \r\n $sql = 'SELECT email_utente, nickname, utente_esperto, utente_seguito, utente_seguace, path_img_profilo, data_ora_richiesta, ' .\r\n 'richiesta_accettata, data_ora_risposta ' . \r\n 'FROM (utente NATURAL JOIN info_utente ) LEFT OUTER JOIN seguaci_seguiti ' . \r\n 'ON email_utente = utente_seguito AND utente_seguace =' . \r\n \"'\" . $_SESSION['email_utente'] . \"'\" ;\r\n \r\n return $sql;\r\n}",
"function select() {\n return \"\n contact_a.id as contact_id ,\n contact_a.contact_type as contact_type,\n contact_a.sort_name as sort_name,\n contact_a.job_title as job_title,\n contact_a.organization_name as current_employer\n \";\n }",
"public function colaboradores_obsoletos(){\n //where ((B.data_inserida-'$data') && (C.data_inserida-'$data') )>tempo_sem_atualizar\n return $this->db->query(\"select * from colaboradores A inner join competencias_colaboradores AS B on (A.id_colaborador=B.colaboradores_id_colaborador) join instituicao where status_colaborador=0 group by colaboradores_id_colaborador order by B.data_inserida \");\n }",
"function stesMarchiID($con) {\n $result = mysqli_query($con,\"SELECT mark_id, mark_nome FROM settori_esposizioni JOIN marchi ON marchi.mark_nome = settori_esposizioni.stes_mark\");\n while($row= mysqli_fetch_array($result)) {\n $mark_id = $row['mark_id'];\n $mark_nome = $row['mark_nome'];\n $sql=\"UPDATE settori_esposizioni SET stes_mark_id='$mark_id' WHERE stes_mark = '$mark_nome'\";\n mysqli_query($con,$sql);\n }\n}",
"public function selectEmpresas() {\r\n return $this->getDb()->query(\"SELECT E.ID_EMPRESA,E.NOMBRE,E.TELEFONO,E.DIRECCION,concat(U.NOMBRE,concat(' ',U.APELLIDO)) \\\"USUARIO ENCARGADO\\\" ,E.ESTADO FROM EMPRESA E LEFT JOIN USUARIO U ON(E.ID_PERSONA_ENCARGADA=U.IDENTIFICADOR)\");\r\n }",
"public function buildSelect()\n {\n $this->query->select(\"DISTINCT(p.id),p.*,\n u.first_name as owner_first_name,u.last_name as owner_last_name,\n c.id as company_id,c.name as company_name,IF(p.id=d2.primary_contact_id, 1, 0) AS is_primary_contact\");\n\n $this->query->from(\"#__people AS p\");\n $this->query->leftJoin(\"#__people_cf as cf ON cf.person_id = p.id\");\n $this->query->leftJoin(\"#__users AS u ON u.id = p.owner_id\");\n $this->query->leftJoin(\"#__companies AS c ON c.id = p.company_id\");\n $this->query->leftJoin(\"#__deals AS d ON d.id = cf.association_id AND cf.association_type = 'deal'\");\n $this->query->leftJoin(\"#__deals AS d2 ON d2.primary_contact_id = p.id\");\n\n }",
"function tampil_data()\n\t{\n\t\t# perintah join digunakan untuk menggabungkan 2 table, yaitu penduduk dan kematian, agar data yang tampil lebih detail, karena pada tabel kematian hanya terdapat sedikit kolom, sehingga dengan menambah kolom nik, maka data yang ada di tabel penduduk juga otomatis terdeteksi karena perintah join, dengan aturan, nik harus sama antara tabel kematian dan nik yang ada di penduduk.\n\t\treturn $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik\")->result();\n\t}",
"function query_peminjam(){\n\t\t\t$query = $this->db->query (\"SELECT * FROM peminjam\");\n\t\t\t$query = $query->result();\n\t\t\treturn $query;\n\t\t}"
] | [
"0.5885986",
"0.5661132",
"0.5364603",
"0.5356815",
"0.5264715",
"0.5243854",
"0.52430826",
"0.522154",
"0.51881987",
"0.5163535",
"0.51398206",
"0.51397425",
"0.51204646",
"0.51117957",
"0.50816417",
"0.50795937",
"0.5040926",
"0.5037547",
"0.50320095",
"0.5029383",
"0.50244105",
"0.50141805",
"0.5011755",
"0.5002401",
"0.4994475",
"0.49693277",
"0.4968387",
"0.49589887",
"0.49516478",
"0.49368215",
"0.49345624",
"0.49335003",
"0.49169332",
"0.4891252",
"0.48692223",
"0.4856979",
"0.48553059",
"0.48454377",
"0.48303717",
"0.4814719",
"0.4813484",
"0.47997743",
"0.47887433",
"0.47831696",
"0.47761798",
"0.47739828",
"0.4763399",
"0.47608846",
"0.47569442",
"0.47555602",
"0.47527796",
"0.4752768",
"0.47442105",
"0.47405496",
"0.47392493",
"0.4732709",
"0.473149",
"0.4719747",
"0.4719747",
"0.47188994",
"0.4712302",
"0.4702877",
"0.4700026",
"0.4693451",
"0.4683759",
"0.4682599",
"0.46808204",
"0.46685964",
"0.46638808",
"0.46618402",
"0.46550152",
"0.4650567",
"0.4643909",
"0.46411198",
"0.46353862",
"0.46332073",
"0.46314397",
"0.46251893",
"0.46224123",
"0.4621999",
"0.46212354",
"0.46186522",
"0.46172786",
"0.4616675",
"0.4611546",
"0.46062344",
"0.46001193",
"0.45917577",
"0.4587171",
"0.45852366",
"0.45832786",
"0.45789403",
"0.45764214",
"0.45708442",
"0.4566392",
"0.45613027",
"0.4560873",
"0.45603898",
"0.45587742",
"0.45582736"
] | 0.55641544 | 2 |
Display a listing of the resource. | public function index()
{
// $messages = Message::all();
$messages = Message::get();
return view('messages.index', compact('messages') );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
return view('messages.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$validated = $request->validate([
// 'name' => 'required',
// 'email' => 'required',
'message' => 'required',
]);
$message = new Message( $validated );
if ( auth()->check() )
{
// $user = new User();
// auth()->user()->messages()->save( $message );
$message->user_id = auth()->id();
}
$message->save();
return back();
} | {
"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(Message $message)
{
//
} | {
"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(Message $message)
{
//
} | {
"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, Message $message)
{
//
} | {
"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(Message $message)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'VL';
$leave_type->leave_description = 'Vacation Leave';
$leave_type->save();
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'SL';
$leave_type->leave_description = 'Sick Leave';
$leave_type->save();
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'ML';
$leave_type->leave_description = 'Maternity Leave';
$leave_type->save();
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'BL';
$leave_type->leave_description = 'Birthday Leave';
$leave_type->save();
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'PL';
$leave_type->leave_description = 'Paternity Leave';
$leave_type->save();
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'SIL';
$leave_type->leave_description = 'Service Incentive Leave';
$leave_type->save();
$leave_type = new \App\LeaveType();
$leave_type->leave_code = 'SPL';
$leave_type->leave_description = 'Single Parent Leave';
$leave_type->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
alternate between 2 books | public function __construct()
{
if ('odd' != self::$oddOrEven) {
$this->author = 'David Sklar and Adam Trachtenberg';
$this->title = 'PHP Cookbook';
self::$oddOrEven = 'odd';
}
$this->author = 'Rasmus Lerdorf and Kevin Tatroe';
$this->title = 'Programming PHP';
self::$oddOrEven = 'even';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateBookTag()\n {\n\t\tif (intval($this->type_flag) === ENTRY_TYPE_BOOK)\n\t\t{\n\t\t\t// non-book may have been changed to book\n\t\t\t$this->addBookTag();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// in case book was changed to non-book\n\t\t\t$this->removeBookTag();\n\t\t}\n\t}",
"public function get_book();",
"public function processBooks()\n\t{\n\t\tif ($this->site->lookupbooks !== '0') {\n\t\t\t$books = new Books($this->echooutput);\n\t\t\t$books->processBookReleases();\n\t\t}\n\t}",
"function _erpal_book_helper_books_links(&$data) {\n //book list context\n $query = array('destination' => $_GET['q']);\n erpal_make_action($data, t('Create a new book'), 'node/add/erpal-book', $query);\n _erpal_book_helper_book_global_menu_tabs($data, false, array('books')); \n}",
"public function getBook($isbn);",
"function outputBooks() {\n $db = connectDB();\n $books = new BooksGateway($db);\n $sql = $books->getSelectStatement();\n // Subcategory filter\n if (!empty($_GET['subcategory']) && empty($_GET['imprint'])) {\n $sql .= 'where SubcategoryName = \"'. $_GET['subcategory'] .'\"';\n }\n // Imprint filter\n elseif(empty($_GET['subcategory']) && !empty($_GET['imprint'])) {\n $sql .= 'where Imprint =\"' . $_GET['imprint']. '\"';\n }\n // Both filter\n elseif(!empty($_GET['subcategory']) && !empty($_GET['imprint'])) {\n $sql .= 'where SubcategoryName = \"'. $_GET['subcategory'] .'\"' . 'AND'.'Imprint =\"' . $_GET['imprint']. '\"';\n }\n // No filter\n else {\n // Print all books.\n }\n $sql .= ' group by Title order by Title ASC limit 0,20';\n $result = $books->getStatement($sql);\n //var_dump($result);\n foreach($result as $key => $value) {\n $img= '<img src=\"book-images/thumb/'.$result[$key]['ISBN10']. '.jpg\" alt=\"book\">';\n echo constructBookLink($result[$key]['ISBN10'], $img) .'<br/>';\n echo '<a href=\"single-book.php?ISBN10=' . $result[$key]['ISBN10'] . '\" class=\"';\n if (isset($_GET['ISBN10']) && $_GET['ISBN10'] == $result[$key]['ISBN10']) echo 'active';\n echo 'item\">';\n echo $result[$key]['Title'] . '</a><br/>'; \n echo '<p>';\n echo \"<span>Year: </span>\". $result[$key]['CopyrightYear'] . \"<br/>\";\n echo \"<span>Subcategory Name: </span>\". $result[$key]['SubcategoryName'] . \"<br/>\";\n echo \"<span>Imprint Name: </span>\". $result[$key]['Imprint']. \"<br/>\";\n echo '</P><br/>';\n }\n }",
"public function testMultiRecurImport()\n\t{\n\t\t$books = R::dispense( array(\n\t\t\tarray( '_type' => 'book', 'title' => 'book one' ),\n\t\t\tarray( '_type' => 'book', 'title' => 'book two' ),\n\t\t) );\n\t\tasrt( is_array( $books ), TRUE );\n\t\tasrt( count( $books ), 2 );\n\t\t$book = reset( $books );\n\t\tasrt( ( $book instanceof OODBBean ), TRUE );\n\t\tasrt( $book->title, 'book one' );\n\t\t$book = next( $books );\n\t\tasrt( ( $book instanceof OODBBean ), TRUE );\n\t\tasrt( $book->title, 'book two' );\n\t}",
"function booklinkp($author,$isbn,$title=\"\",$pubyear=\"\",$adddate=\"\",$float=\"left\",$type=\"t\",$size=\"s\",$top=\"0\",$bordersize=\"0\",$bordercolor=\"000000\")\n {\n $type=strtolower($type);\n if ($float==\"l\") $float=\"left\";\n if ($float==\"r\") $float=\"right\";\n if (($float==\"left\")) $marg=\"right\"; else $marg=\"left\";\n\t$title=stripcslashes($title);\n\t$title=strtolower($title);\n\t$title=nomorexs($title);\n\t$author=nomorexs($author);\n\t$title=ucwords($title);\t\n\t$temptitle =explode(\":\",$title);\n\t$author=stripcslashes($author);\n $titleplus= str_replace(' ','+',$temptitle[0]);\n\t$titleplus= str_replace('&+','',$titleplus);\n $authorplus= str_replace(' ','+',$author);\n\t$authorplus= str_replace('&+','',$authorplus);\n if ($type==\"t\") { $type=\"TI%5ETITLE\"; $keywordsplus= $titleplus; }\n elseif ($type==\"a\") { $type=\"AU%5EAUTHOR\"; $keywordsplus= $authorplus; }\n elseif ($type==\"i\") { $type=\"ISBN\"; $keywordsplus= $isbn;}\n\t\n\t\t\t\t$adyear= (int) substr($adddate,2,2);\n\t\t\t\t$admonth= (int) substr($adddate,4,2);\n\t\t\t\t$adday= (int) substr($adddate,6,2);\n\t\t\t\t$adddate = $admonth.\"/\".$adday.\"/\".$adyear;\n $datedata =\" © \".$pubyear.\" (Added: \".$adddate.\")\";\n // \"&pubyear=\".$pubyear.\n\techo \"<a href=\\\"http://cat.mfrl.org/uhtbin/cgisirsi.exe/0/CBURG/0/5?searchdata1=%22\".\n\t$keywordsplus.\"%22&srchfield1=\".$type.\"&searchoper1=AND&searchdata2=%22\"\n\t.$authorplus.\"%22&srchfield2=AU%5EAUTHOR\\\">\";\n\t$filename=\"images/isbn/\".$isbn.\"S.GIF\";\n\tif (file_exists($filename)) { echo \"<img src=\\\"/\".$filename.\"\\\"\";}\n\telse echo \"<img src=\\\"http://syndetics.com/index.aspx?isbn=\".$isbn.\"/\".$size.\"C.GIF\\\"\";\n\techo \" style=\\\"border:\".$bordersize.\"px solid #\".$bordercolor.\"; float:\".$float.\"; \".$yodaexception.\" margin-\".$marg.\":3px;\";\n\tif ($top!=\"0\") echo \" margin-top:\".$top.\"px;\";\n\tif ($title==\"\") {echo \"\\\" alt=\\\"\".$author.\"\\\" title=\\\"\".$author.\"\\\"></a>\";}\n\telse {echo \"\\\" alt=\\\"\".$title.\" by \".$author.$datedata.\"\\\" title=\\\"\".$title.\" by \".$author.$datedata.\"\\\"></a>\";}\n}",
"function bookcrossing_front_page() {\n $bids = db_select('bookcrossing_books', 'b')\n ->fields('b', array('bid'))\n ->condition('status', BOOKCROSSING_BOOK_STATUS_RESERVED, '<>')\n ->range(0, 3)\n ->orderRandom('bid')\n ->execute()\n ->fetchCol();\n $books = bookcrossing_load_multiple($bids);\n\n $output = '';\n foreach ($books as $book) {\n $view = node_view($book['node'], 'front_page');\n $build = bookcrossing_prepare_book_view($view, $book);\n $output .= render($build);\n }\n\n return $output . '<div style=\"clear: left\"></div>';\n}",
"public function getBook()\n\t{\n\t\treturn $this->getKeyValue('book'); \n\n\t}",
"function rentBook($isbn, $student, $con) \r\n\t{\r\n\t\tmysqli_query($con,\"\r\n\t\t\tUPDATE booksdb\r\n\t\t\tSET rented = rented - 1\r\n\t\t\tWHERE isbn13 like '%{$isbn}%;'\r\n\t\t\");\r\n\t\t// Add user and student id functionality here\r\n\t\t// Also required updation of the rent date\r\n\t}",
"public function addBookAndAuthor()\n {\n if (($params = $this->checkVarForAdding()) && $this->saveImage()) {\n if (USE_ONE_TABLE) {\n $sql = 'INSERT INTO `books_authors` (`book_name`, `author`, `year`, `num_pages`, `about_book`, `image`)\n VALUES (?, ?, ?, \"253\", ?, ?)';\n $this->findBySql($sql, $params);\n } else {\n $this->addAuthor($params['authors']);\n $this->addBook($params['book']);\n $this->addRelations($params['book'][0], $params['authors']);\n }\n }\n }",
"public function authorSeries($id, $books);",
"function bookcrossing_release_book($book) {\n /**\n * Book wasnt found in db.\n */\n if (!$book) {\n return array(\n '#markup' => t('There is no book with that BCID.'),\n );\n }\n\n /**\n * Book is already released.\n */\n if (!$book['status']) {\n return array(\n '#markup' => t('Cannot to release book because its already was released.'),\n );\n }\n\n global $user;\n /**\n * Can only release books user reading.\n */\n if ($book['user']->uid != $user->uid) {\n return array(\n '#markup' => t('You cannot release this book because u are not reading it now.'),\n );\n }\n\n $build = node_view($book['node'], 'found_book');\n $build = bookcrossing_prepare_book_view($build, $book, FALSE);\n\n /**\n * Form for adding comment and place.\n */\n $build['book_found'] = drupal_get_form('bookcrossing_book_comment', $book);\n\n /**\n * Status of the found book.\n */\n $build['book_found_status'] = array(\n '#markup' => bookcrossing_book_status($book),\n );\n\n $build['author_and_year'] = array(\n '#markup' => bookcrossing_author_and_year($book),\n );\n \n return $build;\n}",
"public function books()\n {\n return $this->morphedByMany('App\\Book', 'source_genre');\n }",
"private function printBooks($books) {\n foreach($books as $book) {\n echo 'id:'.$book->id.' title: '.$book->title.'<br>';\n }\n }",
"function newBookNumbers($aBooksLeft, $sBookNumberFile)\r\n{\r\n\t$newbookline = '';\r\n\tif (count($aBooksLeft) > 0) {\r\n\t\tforeach ($aBooksLeft as $itemnumber) {\r\n\t\t\t$newbookline .= $itemnumber . ',';\r\n\t\t}\r\n\t}\r\n\r\n\t$fh = fopen($sBookNumberFile, 'w');\r\n\tfwrite($fh, $newbookline);\r\n\tfclose($fh);\r\n\r\n\treturn 1;\r\n}",
"function bookcrossing_view_book($book = array()) {\n $build = node_view($book['node'], 'default');\n $build = bookcrossing_prepare_book_view($build, $book);\n drupal_set_title($book['node']->title);\n /**\n * Generate output for status of the book.\n */\n $build['book_status'] = array(\n '#markup' => bookcrossing_book_status($book),\n );\n\n /**\n * Generate links for book: release, view history, add to favourites.\n */\n $items = array();\n\n global $user;\n if ($user->uid == $book['user']->uid && $book['status']) {\n $items[] = l(t('Release'), 'release-book/' . $book['bid']);\n }\n\n $items[] = l(t('View history'), 'view-history/' . $book['bid']);\n\n $query = db_select('bookcrossing_favourites', 'f');\n $query->fields('f', array('uid'));\n $query->condition('f.bid', $book['bid'], '=');\n $query->condition('f.uid', $user->uid, '=');\n $already_added = $query->execute()->fetchField();\n\n if ($user->uid && !$already_added) {\n /**\n * @todo add facebook like action.\n */\n $items[] = l(t('Add to bookmarks'), 'add-to-bookmarks/' . $book['bid'], array('attributes' => array('onclick' => 'return like()')));\n//fboauth_action_display('like-book');\n//l(t('Add to favourites'), 'ajax/favourites/' . $book['bid'], array('absolute' => TRUE, 'attributes' => array('id' => 'add-to-favourites', 'class' => array('use-ajax'))));\n }\n\n $app_id = variable_get('fboauth_id', '');\n $init = \"window.fbAsyncInit = function() {\n FB.init({\n appId : $app_id,\n status : true,\n cookie : true,\n xfbml : true\n });\n };\n\n // Load the SDK Asynchronously\n (function(d){\n var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}\n js = d.createElement('script'); js.id = id; js.async = true;\n js.src = '//connect.facebook.net/ru_RU/all.js';\n d.getElementsByTagName('head')[0].appendChild(js);\n }(document));\";\n \n //$script = '<script>' . $init . '</script>';\n drupal_add_js($init, 'inline');\n\n $build['book_links'] = array(\n '#markup' => theme_item_list(array('title' => '', 'items' => $items, 'type' => 'ul', 'attributes' => array('class' => 'book-links'))),\n );\n\n bookcrossing_meta_og($book);\n\n //$_SESSION['book_to_like'] = $book['bid'];\n \n bookcrossing_add_fb_js($book['bid'], url('book/' . $book['bid'], array('absolute' => TRUE)));\n\n $build['facepile'] = array(\n '#markup' => '<fb:facepile href=\"' . url($_GET['q'], array('absolute' => TRUE)) . '\" action=\"bookcrossing_by:bookmark\" width=\"200\" size=\"large\" max_rows=\"3\"></fb:facepile>',\n );\n// '#markup' => '<script src=\"http://connect.facebook.net/ru_RU/all.js#appId=' . variable_get('fboauth_id', '') . '&xfbml=1\"></script><fb:facepile href=\"' . url($_GET['q'], array('absolute' => TRUE)) . '\" action=\"bookcrossing_by:bookmark\" width=\"300\" size=\"large\" max_rows=\"3\"></fb:facepile>',\n\n $data_href = url('book/' . $book['bid'], array('absolute' => TRUE));\n\n $build['fb_recommend_bar'] = array(\n '#markup' => '<div class=\"fb-recommendations-bar\" data-href=\"' . $data_href . '\" data-trigger=\"onvisible\" data-read-time=\"20\" data-action=\"like\" data-side=\"right\" data-num_recommendations=\"3\"></div>',\n );\n\n $build['fb_comments'] = array(\n '#markup' => '<div class=\"fb-comments\" data-href=\"' . $data_href . '\" data-num-posts=\"3\" data-width=\"635\"></div>',\n );\n\n/*\n<div class=\"fb-facepile\" data-href=\"' . url($_GET['q'], array('absolute' => TRUE)) . '\" data-action=\"bookcrossing_by:bookmark\" data-size=\"large\" data-max-rows=\"1\" data-width=\"300\"></div>\n*/\n return $build;\n}",
"public function getBooks($id) {\n }",
"public function getBooks()\n {\n $sql = 'SELECT bookshop_books.id,\n bookshop_books.description,\n bookshop_books.booksName,\n bookshop_books.pubyear,\n bookshop_discounts.id AS discountsId,\n bookshop_discounts.discountsName,\n bookshop_discounts.percent,\n bookshop_books.price,\n bookshop_authors.id AS idAuthors,\n bookshop_authors.authorsName,\n bookshop_genres.id AS idGenres,\n bookshop_genres.genresName\n FROM bookshop_books_to_authors\n INNER JOIN bookshop_books\n ON bookshop_books_to_authors.id_book = bookshop_books.id\n INNER JOIN bookshop_books_to_genres\n ON bookshop_books_to_genres.id_book = bookshop_books.id\n INNER JOIN bookshop_authors\n ON bookshop_books_to_authors.id_author = bookshop_authors.id\n INNER JOIN bookshop_genres\n ON bookshop_books_to_genres.id_genre = bookshop_genres.id\n INNER JOIN bookshop_discounts\n ON bookshop_books.id_discount = bookshop_discounts.id';\n \n $result = $this->db->execute($sql);\n\n if (!$result)\n return $this->error();\n\n return $this->formingBooks($result);\n }",
"public function book($param1 = \"\", $param2 = \"\") {\n\t\t$page_data['folder_name'] = 'book';\n\t\t$page_data['page_title'] = 'books';\n\t\t$this->load->view('backend/index', $page_data);\n\t}",
"function _erpal_book_helper_node_book_links(&$data, $node, $is_node_view=false) {\n //single book context\n if ($is_node_view) {\n $query = array();\n erpal_make_action($data, t('Edit this book'), 'node/'.$node->nid.'/edit', $query);\n\n _erpal_book_helper_book_and_page_actions($data, $node, $is_node_view);\n }\n \n}",
"public function book($param1 = \"\", $param2 = \"\") {\n\t\t// adding book\n\t\tif ($param1 == 'create') {\n\t\t\t$response = $this->crud_model->create_book();\n\t\t\techo $response;\n\t\t}\n\n\t\t// update book\n\t\tif ($param1 == 'update') {\n\t\t\t$response = $this->crud_model->update_book($param2);\n\t\t\techo $response;\n\t\t}\n\n\t\t// deleting book\n\t\tif ($param1 == 'delete') {\n\t\t\t$response = $this->crud_model->delete_book($param2);\n\t\t\techo $response;\n\t\t}\n\t\t// showing the list of book\n\t\tif ($param1 == 'list') {\n\t\t\t$this->load->view('backend/admin/book/list');\n\t\t}\n\n\t\t// showing the index file\n\t\tif(empty($param1)){\n\t\t\t$page_data['folder_name'] = 'book';\n\t\t\t$page_data['page_title'] = 'books';\n\t\t\t$this->load->view('backend/index', $page_data);\n\t\t}\n\t}",
"public function getBookList() \n {\n return array( \n \"Balagurusamy\" => new Book(\"Balagurusamy\", \"Balagurusamy\", \"C programming\"), \n \"CMM in Practice\" => new Book(\"CMM in Practice\", \"Pankaj Jalote\", \"\"), \n \"PHP for Dummies\" => new Book(\"PHP for Dummies\", \"Some Smart Guy\", \"\") \n ); \n }",
"public function run() {\n $b1 = Book::create([\n \t'title'\t=>\t'Lean on Startups',\n \t'author' => 'Prof. Jk Willems',\n \t'link'\t=> 'http://amazon.eu/books/jkw/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 1\n ]);\n $b2 = Book::create([\n \t'author'\t=>\t'Dr. Sulieman Bengal',\n \t'title' => 'Modern Islam',\n \t'link'\t=> 'http://amazon.ksa/books/prof_s_bengal/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 4\n ]);\n $b3 = Book::create([\n \t'author'\t=>\t'Prof. Ali Sheikh',\n \t'title' => 'Feminism in Islam',\n \t'link'\t=> 'http://amazon.ksa/books/Ali_s/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 5\n ]);\n $b4 = Book::create([\n \t'author'\t=>\t'Dietel & Dietel',\n \t'title' => 'How to C#',\n \t'link'\t=> 'http://amazon.com/books/d&d/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 6\n ]);\n $b5 = Book::create([\n \t'author'\t=>\t'Prof. Howard Antonio',\n \t'title' => 'How to overcome Depression',\n \t'link'\t=> 'http://amazon.uk/books/p_howard_antionio/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 2\n ]);\n $b6 = Book::create([\n \t'author'\t=>\t'Prof. Howard Antonio',\n \t'title' => 'How to overcome Anxiety',\n \t'link'\t=> 'http://amazon.uk/books/p_howard_antionio/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 3\n ]);\n $b6 = Book::create([\n \t'author'\t=>\t'Dr. Jack Daniel',\n \t'title' => 'New Start',\n \t'link'\t=> 'http://amazon.us/books/dr_jack_D/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 7\n ]);\n $b7 = Book::create([\n \t'author'\t=>\t'Prof. Marko D.',\n \t'title' => 'Easy English',\n \t'link'\t=> 'http://amazon.uk/books/mard_d/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 8\n ]);\n }",
"public function latest_books()\n {\n //thiet lap rieng\n $this->paginate = array(\n 'fields' => array('id', 'title', 'slug', 'image', 'sale_price'),\n 'order' => array('created' => 'desc'),\n 'limit' => 8,\n 'contain'=> array(\n 'Writer' => array('name', 'slug')\n ),\n 'conditions' => array('published'=>1),\n 'paramType'=> 'querystring', //thay đổi đường dẫn xuất hiện\n );\n $books = $this->paginate(); //mac dinh la 20 quyen sach va k co thiet lap dieu kien muon thiet lap dieu kien thi dung bien public paginate\n \n $this->set('books', $books);\n $this->set('title_for_layout', 'Sach moi Chiken');\n }",
"function addBook($userid,$bookid,$num=1){\n \t\n \t\n \t$res=$this->fetchAll(\"userid=$userid AND bookid=$bookid\")->toArray();\n \t\n \t\n\n//======means the client has bought this kind of products before\n\t \tif (count($res)>0) { \t\t\t\t\n\t \t\t$data=array(\n\t \t\t\t'nums'=>$res[0]['nums']+1\n\t \t\t);\n\t \t\t$where=\"userid=$userid AND bookid=$bookid\";\n\t \t\t$this->update($data, $where);\n\t \t\treturn true;\n\t \t}else{\n//========means the client buy this kind of products first time\n\t\t \t$date=time();\n\t\t \t$data=array(\n\t\t \t\t\t'userid'=>$userid,\n\t\t \t\t\t'bookid'=>$bookid,\n\t\t \t\t\t'nums'=>$num, \n\t\t \t\t\t'date'=>$date\n\t\t \t);\n\t\t \t\n\t\t \tif ($this->insert($data)>0) {\n\t\t \t\t\n\t\t \t\treturn true;\n\t\t \t}else{\n\t\t \t\treturn false;\n\t\t \t}\n\t \t}\n \t\n }",
"function bookcrossing_found_book_page($bcid = '') {\n if (empty($bcid)) {\n return '';\n }\n\n $book = bookcrossing_load_by_bcid($bcid);\n \n /**\n * There is no that book in db.\n */\n if (!$book) {\n return array(\n '#markup' => t('There is no book with that BCID.'),\n );\n }\n\n /**\n * Someone already found this book.\n */\n if ($book['status']) {\n return array(\n '#markup' => t('Someone is already reading this book.'),\n );\n }\n drupal_set_title(t('You have found the book') . ' ' . $book['node']->title);\n $build = node_view($book['node'], 'found_book');\n $build = bookcrossing_prepare_book_view($build, $book, FALSE);\n $build['book_found'] = drupal_get_form('bookcrossing_book_comment', $book);\n\n /**\n * Generate output for found book status.\n */\n $status_string = $book['status'] ? t('Found') : t('Travelling');\n $items = array(\n '<div class=\"status-label\">' . t('Book status') . ':</div>' . $status_string,\n );\n\n if ($book['status']) {\n $items[] = '<div class=\"status-label\">' . t('Reader') . ':</div>' . l($book['user']->name, 'user/' . $book['user']->uid);\n }\n else {\n $items[] = '<div class=\"status-label\">' . t('Released') . ':</div>' . l($book['user']->name, 'user/' . $book['user']->uid) . ', ' . format_date($book['time_left']);\n }\n\n $build['book_found_status'] = array(\n '#markup' => theme('item_list', array('title' => '', 'items' => $items, 'type' => 'ul', 'attributes' => array('class' => 'status-info'))),\n );\n \n $build['author_and_year'] = array(\n '#markup' => bookcrossing_author_and_year($book),\n );\n\n return $build;\n}",
"private function getRecommendedBooks($book, $book_id)\n {\n $genre_id = $book->getGenre()->getId();\n $author_id = $book->getAuthor()->getId(); \n $entityManager = $this->getDoctrine()->getManager();\n $conn = $entityManager->getConnection();\n $sql = 'SELECT id FROM book \n WHERE id != :id AND genre_id = :genre_id\n ORDER BY RAND() LIMIT ' . $this->recommended_books_count;\n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'genre_id' => $genre_id, \n ]); \n $ids_genre = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_genre_count = count($ids_genre);\n \n if ($ids_genre_count < $this->recommended_books_count) {\n //get other books of this author\n $ids_genre_str = implode(',', $ids_genre); \n if ($ids_genre_count > 0) {\n $not_in_genre = ' AND id NOT IN ('.$ids_genre_str.') ';\n } else {\n $not_in_genre = '';\n }\n $limit = $this->recommended_books_count - $ids_genre_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre.' \n AND author_id = :author_id\n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'author_id' => $author_id, \n ]); \n $ids_author = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_author_count = count($ids_author); \n $ids_genre_author_count = $ids_genre_count + $ids_author_count;\n \n if ($ids_genre_author_count < $this->recommended_books_count) {\n //get other books\n $ids_genre_author = array_merge($ids_genre, $ids_author);\n $ids_genre_author_str = implode(',', $ids_genre_author);\n if ($ids_genre_author_count > 0) {\n $not_in_genre_author = ' AND id NOT IN ('.$ids_genre_author_str.') ';\n } else {\n $not_in_genre_author = '';\n } \n $limit = $this->recommended_books_count - $ids_genre_author_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre_author.' \n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute(['id' => $book_id]); \n $ids_others = $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n }\n } \n \n //get books\n $rep = $this->getDoctrine()->getRepository(Book::class);\n $books_genre = !empty($ids_genre) ? $rep->findById($ids_genre) : [];\n $books_author = !empty($ids_author) ? $rep->findById($ids_author) : [];\n $books_others = !empty($ids_others) ? $rep->findById($ids_others) : [];\n \n return [\n 'books_genre' => $books_genre,\n 'books_author' => $books_author,\n 'books_others' => $books_others,\n ];\n }",
"function getAuthorBooks($conn,$first_name, $last_name) {\n $author_books = \"SELECT title FROM audio_book INNER JOIN writes ON audio_book.ISBN = writes.ISBN AND writes.author_id IN (\n SELECT author_id FROM author WHERE first_name = '$first_name' AND last_name = '$last_name')\";\n $result = mysqli_query($conn, $author_books);\n if(mysqli_num_rows($result) > 0) {\n return $result;\n } else {\n echo 'Nothing author books<br>';\n exit;\n }\n }",
"public function getBorrowedbooks()\n {\n return $this->hasMany(Borrowedbooks::className(), ['bookId' => 'bookId']);\n }",
"public function getBooks()\n\t{\n\t\treturn $this->books;\n\t}",
"public function getBook($title) \n {\n // in a real life scenario this will be done through a db select command \n $allBooks = $this->getBookList(); \n return $allBooks[$title]; \n }",
"public function e_book()\n\t{\n\t\tif (preg_match('/^New eBooks.+[ _-]{0,3}(\"|#34;)(.+?.+)\\.(par|vol|rar|nfo).*?(\"|#34;)/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\tif (preg_match('/^\\(Nora Roberts\\)\"(.+?)\\.(epub|mobi|html|pdf|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Doctor Who - Target Books [128/175] - \"DW125_ Terror of the Vervoids - Pip Baker.mobi\" yEnc\n\t\tif (preg_match('/^Doctor Who - Target Books \\[\\d+\\/(\\d+\\]) - \"DW[0-9]{0,3}[-_\\s]{0,3}(.+?)\\.(txt|pdf|mobi|epub|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(American Curves - Summer 2012) [01/10] - \"AMECURSUM12.par2\" yEnc\n\t\tif (preg_match('/^\\(([a-zA-Z0-9 -]+)\\) \\[\\d+\\/(\\d+\\]) - \".+?' . $this->e1,\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\t//(NordicAlbino) [01/10] - \"SWHQ_NA_675qe0033102suSmzSE.sfv\" yEnc\n\t\t//365 Sex Positions A New Way Every Day for a Steamy Erotic Year [eBook] - (1/5) \"365.Sex.Positions.A.New.Way.Every.Day.for.a.Steamy.Erotic.Year.eBook.nfo\" - yenc yEnc\n\t\tif (preg_match('/(.+)[-_\\s]{0,3}[\\(\\[]\\d+\\/\\d+[\\)\\]][-_\\s]{0,3}\"(.+?)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//[1/8] - \"Robin Lane Fox - Travelling heroes.epub\" yEnc\n\t\t//(1/1) \"Unintended Consequences - John Ross.nzb\" - 8.67 kB - yEnc\n\t\tif (preg_match('/^[\\(\\[]\\d+\\/\\d+[\\)\\]][-_\\s]{0,3}\"(.+?)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\")([-_\\s]{0,3}\\d+[.,]\\d+ [kKmMgG][bB])?[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[ Mega Dating and Sex Advice Ebooks - Tips and Tricks for Men PDF ] - \"Vatsyayana - The Kama Sutra.pdf.rar\" - (54/58) yEnc\n\t\tif (preg_match('/^[\\(\\[] .+? [\\)\\][-_\\s]{0,3}\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")[-_\\s]{0,3}[\\(\\[]\\d+\\/(\\d+[\\)\\]])[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //WWII in Photos - \"WWII in Photos_05_Conflict Spreads Around the Globe - The Atlantic.epub\" yEnc\n\t\tif (preg_match('/^(WWII in Photos)[-_\\s]{0,3}\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Various ebooks on History pdf format \"Chelsea House Publishing Discovering U.S. History Vol. 8, World War I and the Roaring Twenties - 1914-1928 (2010).pdf\" [1 of 1] yEnc\n\t\tif (preg_match('/^.+?\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")[-_\\s]{0,3}\\[\\d+ of (\\d+\\])[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //A few things - [4 of 13] \"Man From U.N.C.L.E. 08 - The Monster Wheel Affair - David McDaniel.epub\" yEnc\n\t\tif (preg_match('/.+[\\(\\[]\\d+ of \\d+[\\)\\]] \"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //DDR Kochbuch 1968-wir kochen gut [1/1] - \"DDR Kochbuch 1968-wir kochen gut.pdf\" toby042002\n\t\tif (preg_match('/.+[\\(\\[]\\d+\\/\\d+[\\)\\]] - \"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\") toby\\d+$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Pottermore UK retail - \"Harry Potter and the Goblet of Fire - J.K. Rowling.epub\" (05/14) - 907.57 kB - yEnc\n\t\tif (preg_match('/^.+?[-_\\s]{0,3}\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\") [\\(\\[]\\d+\\/\\d+[\\)\\]] ([-_\\s]{0,3}\\d+[.,]\\d+ [kKmMgG][bB])?[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[001/125] (NL Epub Wierook Set 49) - \"Abulhawa, Susan - Litteken van David_Ochtend in Jenin.epub\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] .+? - \"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/1) \"Radiological Imaging of the Kidney - E. Quaia (Springer, 2011) WW.pdf\" - 162,82 MB - (Radiological Imaging of the Kidney - E. Quaia (Springer, 2011) WW) yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/7) \"0865779767.epub\" - 88,93 MB - \"Anatomic Basis of Neurologic Diagnosis - epub\" yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \".+(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")([-_\\s]{0,3}\\d+[.,]\\d+ [kKmMgG][bB])?[-_\\s]{0,3}\"(.+?)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[4];\n\t\t}\n\t\t//Re: REQ: Jay Lake's Mainspring series/trilogy (see titles inside) - \"Lake, Jay - Clockwork Earth 03 - Pinion [epub].rar\" 405.6 kBytes yEnc\n\t\t//Attn: Brownian - \"del Rey, Maria - Paradise Bay (FBS).rar\" yEnc\n\t\t//New Scan \"Herbert, James - Sepulchre (html).rar\" yEnc\n\t\tif (preg_match('/^(Attn:|Re: REQ:|New Scan).+?[-_\\s]{0,3}\"(.+)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")[-_\\s]{0,3}(\\d+[.,]\\d+ [kKmMgG][bB](ytes)?)? yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//\"Gabaldon, Diana - Outlander [5] The Fiery Cross.epub\" yEnc\n\t\t//Kiny Friedman \"Friedman, Kinky - Prisoner of Vandam Street_ A Novel, The.epub\" yEnc\n\t\tif (preg_match('/.*\"(.+?)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Patterson flood - Mobi - 15/45 \"James Patterson - AC 13 - Double Cross.mobi\"\n\t\tif (preg_match('/(.+?)[-_\\s]{0,3}\\d+\\/(\\d+[-_\\s]{0,3}\".+?)\\.(txt|pdf|mobi|epub|azw)\"( \\(\\d+\\/\\d+\\))?( )?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //04/63 Brave New World Revisited - Aldous Huxley.mobi yEnc\n\t\tif (preg_match('/\\d+\\/\\d+[-_\\s]{0,3}(.+)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //- Campbell, F.E. - Susan - HIT 125.rar BDSM Themed Adult Erotica - M/F F/F - Rtf & Pdf\n\t\tif (preg_match('/^- (.+?)\\.(par|vol|rar|nfo)[-_\\s]{0,3}(.+)/', $this->subject, $match)) {\n\t\t\treturn $match[1];\n\t\t} //\"D. F. Jones - 03 - Colossus and The Crab.epub\" (1/3)\n\t\tif (preg_match('/^\"(.+?)\\.(txt|pdf|mobi|epub|azw)\" \\(\\d+\\/(\\d+\\))/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //\"D. F. Jones - 01 - Colossus.epub\" (note the space on the end)\n\t\tif (preg_match('/^\"(.+?)\\.(txt|pdf|mobi|epub|azw|lit|rar|nfo|par)\" $/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[01/19] - \"13_X_Panzer_Tracts_EBook.nfo \" yEnc\n\t\tif (preg_match('/^\\[\\d*+\\/(\\d+\\]) - \"(.+?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev\"|\\.vol.+?\"|\\.[A-Za-z0-9]{2,4} \"|\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//[09/14] Sven Hassel - Legion of the Damned 09, Reign of Hell.mobi sven hassel as requested (1/7) yEnc\n\t\t//[1/1] Alex Berenson - John Wells 05, The Secret Soldier.mobi (space at end)\n\t\tif (preg_match('/^\\[\\d+\\/(\\d+\\]) (.+?)\\.(txt|pdf|mobi|epub|azw|lit|rar|nfo|par).+?(yEnc)?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//[1/1] - \"Die Kunst der Fotografie Lehrbuch und Bildband f r ambitionierte Fotografen.rar\"\n\t\t//[1/1] - \"Demonic_ How the Liberal Mob Is Endanger - Coulter, Ann.mobi\" (note space at end)\n\t\t//[1/1] - \"Paris in Love_ A Memoir - Eloisa James.mobi\" 1861K\n\t\tif (preg_match('/^\\[\\d+\\/(\\d+\\]) - \"(.+?)\\.(txt|pdf|mobi|epub|azw|lit|rar|nfo|par)\"( \\d+K)?( )?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //002/240 Swordships.of.Scorpio.(Dray.Prescot).-.Alan.Burt.Akers.epub\n\t\tif (preg_match('/^\\d+\\/(\\d+)[-_\\s]{0,3}(.+?)\\.(txt|pdf|mobi|epub|azw|lit|rar|nfo|par)$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Akers Alan Burt - Dray Prescot Saga 14 - Krozair von Kregen.rar yEnc\n\t\tif (preg_match('/^([a-zA-Z0-9. ].+?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev\"|\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\"|) yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"public function getEx1() {\n # Use the QueryBuilder to get all the books\n $books = \\DB::table('books')->get();\n $this->printBooks($books);\n }",
"public static function updateCopyPlus($idBook) {\n $nbCopy = Book::getCopy($idBook);\n $nbCopies = $nbCopy - 1;\n self::execute(\"UPDATE book SET nbCopies=:nbCopies where id=:id\", array(\"id\" => $idBook, \"nbCopies\" => $nbCopies));\n }",
"public function getId_book()\n {\n return $this->id_book;\n }",
"public function getBook()\n {\n return $this->_book;\n }",
"public function getAllBooks(){\n $query = \"SELECT * FROM Book;\";\n return $this->getBookDetail($query);\n }",
"public function getEx2() {\n // Use the QueryBuilder to insert a new row into the books table\n // i.e. create a new book\n \\DB::table('books')->insert([\n 'created_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Carbon\\Carbon::now()->toDateTimeString(),\n 'title' => 'The Great Gatsby',\n 'author' => 'F. Scott Fitzgerald',\n 'published' => 1925,\n 'cover' => 'http://img2.imagesbn.com/p/9780743273565_p0_v4_s114x166.JPG',\n 'purchase_link' => 'http://www.barnesandnoble.com/w/the-great-gatsby-francis-scott-fitzgerald/1116668135?ean=9780743273565',\n ]);\n return 'Added book.';\n }",
"public static function update_book($book) {\n\t\t$id = $book->id;\n\t\t$data_book = [\n\t\t\t'other_name'\t=> $book->other_name,\n\t\t\t'release_at'\t=> $book->release_at,\n\t\t\t'description'\t=> $book->description,\n\t\t\t'status'\t\t=> $book->status,\n\t\t\t'id_author'\t\t=> $book->id_author,\n\t\t\t'id_artist'\t\t=> $book->id_artist,\n\t\t\t'id_uploader'\t=> $book->id_uploader\n\t\t];\n\t\t//update book\n\t\tBooksCModel::update_book($id, $data_book);\n\n\t\t//update book category\n\t\tBooksCategoryCModel::delete_book_category_by_book_id($id);\n\t\t$categories = [];\n\t\tforeach ($book->categories as $key => $category) {\n\t\t\t$categories[$key] = [\n\t\t\t\t'id_book'\t\t=> $id,\n\t\t\t\t'id_category'\t=> $category\n\t\t\t];\n\t\t\tBooksCategoryCModel::insert_book_category($categories[$key]);\n\t\t}\n\n\t\t//update book character\n\t\tBooksCharacterCModel::delete_book_character_by_book_id($id);\n\t\t$characters = [];\n\t\tforeach ($book->characters as $key => $character) {\n\t\t\t$characters[$key] = [\n\t\t\t\t'id_book'\t\t=> $id,\n\t\t\t\t'id_character'\t=> $character\n\t\t\t];\n\t\t\tBooksCharacterCModel::insert_book_character($characters[$key]);\n\t\t}\n\t}",
"public function titleDetailsOpds($book);",
"public function getBooks()\n {\n $page = isset($_GET['page']) ? $_GET['page'] : 1;\n $this->limit = isset($_GET['limit']) ? $_GET['limit'] : $this->limit;\n $offset = $this->limit * ($page - 1);\n\n\n if (USE_ONE_TABLE) {\n $this->table = 'books_authors';\n $sql = \"SELECT * FROM $this->table WHERE `deleted` is NULL LIMIT :limit OFFSET :offset\";\n } else {\n $this->table = 'relations';\n $sql = \"SELECT books.id, book_name, GROUP_CONCAT(name_author SEPARATOR ', ') as 'author' , year, num_pages, about_book, deleted, views, clicks, image\n FROM books \n JOIN relations ON book_id = books.id\n JOIN authors ON authors.id = author_id\n WHERE deleted is NULL \n GROUP BY id\n LIMIT :limit OFFSET :offset\";\n }\n\n $params = [\n [\":limit\", $this->limit, \\PDO::PARAM_INT],\n [\":offset\", $offset, \\PDO::PARAM_INT]\n ];\n return $this->bindAndQuery($sql, $params);\n }",
"public static function firstPageBooks() {\n //but later on (when we have more books in the database), this method wants some\n //subset of books (like every books that start with \"s\", or most favourite books or books selected by admin or...)\n\n $books = Book::all();\n// self::sort_books($books);\n View::make('general/firstpage.html', array('books' => $books));\n }",
"public function getAllBooks(){\n return $this->libros;\n }",
"public function getBookList()\n\t{\n\t\treturn array(\n\t\t\t\"1\" => new Book(\"Être et Temps\", \"9782070707393\", 1, 1, 1),\n\t\t\t\"2\" => new Book(\"Finnegans Wake\", \"9782070402250\", 2, 2, 2),\n\t\t\t\"3\" => new Book(\"Critique de la raison pure\", \"9782070325757\", 3, 3, 3)\n\t\t);\n\t}",
"public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }",
"public function assembleBook()\n {\n $this->app->edition('id', $this->app['publishing.id']);\n\n // variables needed to hold the list of images and fonts of the book\n $bookImages = array();\n $bookFonts = array();\n\n // prepare the temp directory used to build the book\n $bookTempDir = $this->app['app.dir.cache']\n .'/'.$this->app['publishing.book.slug']\n .'-'.$this->app['publishing.edition'];\n\n $this->app->get('filesystem')->mkdir(array(\n $bookTempDir,\n $bookTempDir.'/book',\n $bookTempDir.'/book/META-INF',\n $bookTempDir.'/book/OEBPS',\n $bookTempDir.'/book/OEBPS/css',\n $bookTempDir.'/book/OEBPS/images',\n $bookTempDir.'/book/OEBPS/fonts',\n ));\n\n // generate easybook CSS file\n if ($this->app->edition('include_styles')) {\n $this->app->renderThemeTemplate(\n 'style.css.twig',\n array('resources_dir' => '..'),\n $bookTempDir.'/book/OEBPS/css/easybook.css'\n );\n\n // copy book fonts and prepare font data for ebook manifest\n $this->app->get('filesystem')->copy(\n $this->app['app.dir.resources'].'/Fonts/Inconsolata/Inconsolata.ttf',\n $bookTempDir.'/book/OEBPS/fonts/Inconsolata.ttf'\n );\n $bookFonts[] = array(\n 'id' => 'font-1',\n 'filePath' => 'fonts/Inconsolata.ttf',\n 'mediaType' => 'application/octet-stream'\n );\n }\n\n // generate custom CSS file\n $customCss = $this->app->getCustomTemplate('style.css');\n if (file_exists($customCss)) {\n $this->app->get('filesystem')->copy(\n $customCss,\n $bookTempDir.'/book/OEBPS/css/styles.css',\n true\n );\n }\n\n // each book element will generate an HTML page\n // use automatic slugs (chapter-1, chapter-2, ...) instead of\n // semantic slugs (lorem-ipsum, dolor-sit-amet, ...)\n $this->app->set('publishing.slugs', array());\n $items = array();\n foreach ($this->app['publishing.items'] as $item) {\n $pageName = array_key_exists('number', $item['config'])\n ? $item['config']['element'].' '.$item['config']['number']\n : $item['config']['element'];\n\n $slug = $this->app->get('slugger')->slugify(trim($pageName));\n\n $item['slug'] = $slug;\n // TODO: document this new item property\n $item['fileName'] = $slug.'.html';\n $items[] = $item;\n }\n // update `publishing items` with the new slug value\n $this->app->set('publishing.items', $items);\n\n // generate one HTML page for every book item\n $items = array();\n foreach ($this->app['publishing.items'] as $item) {\n $this->app->renderThemeTemplate('chunk.twig', array(\n 'item' => $item,\n 'has_custom_css' => file_exists($customCss),\n ),\n $bookTempDir.'/book/OEBPS/'.$item['fileName']\n );\n }\n\n // copy book images and prepare image data for ebook manifest\n if (file_exists($imagesDir = $this->app['publishing.dir.contents'].'/images')) {\n $images = $this->app->get('finder')->files()->in($imagesDir);\n\n $i = 1;\n foreach ($images as $image) {\n $this->app->get('filesystem')->copy(\n $image->getPathName(),\n $bookTempDir.'/book/OEBPS/images/'.$image->getFileName()\n );\n\n $bookImages[] = array(\n 'id' => 'figure-'.$i++,\n 'filePath' => 'images/'.$image->getFileName(),\n 'mediaType' => 'image/'.pathinfo($image->getFilename(), PATHINFO_EXTENSION)\n );\n }\n }\n\n // look for cover images\n $cover = null;\n if (null != $image = $this->app->getCustomCoverImage()) {\n list($width, $height, $type) = getimagesize($image);\n $cover = array(\n 'height' => $height,\n 'width' => $width,\n 'filePath' => 'images/'.basename($image),\n 'mediaType' => image_type_to_mime_type($type)\n );\n\n // copy the cover image\n $this->app->get('filesystem')->copy(\n $image,\n $bookTempDir.'/book/OEBPS/images/'.basename($image)\n );\n }\n\n // generate book cover\n $this->app->renderThemeTemplate('cover.twig', array(\n 'cover' => $cover\n ),\n $bookTempDir.'/book/OEBPS/titlepage.html'\n );\n\n // generate OPF file\n $this->app->renderThemeTemplate('content.opf.twig', array(\n 'cover' => $cover,\n 'has_custom_css' => file_exists($customCss),\n 'fonts' => $bookFonts,\n 'images' => $bookImages\n ),\n $bookTempDir.'/book/OEBPS/content.opf'\n );\n\n // generate NCX file\n $this->app->renderThemeTemplate('toc.ncx.twig', array(),\n $bookTempDir.'/book/OEBPS/toc.ncx'\n );\n\n // generate container.xml and mimetype files\n $this->app->renderThemeTemplate('container.xml.twig', array(),\n $bookTempDir.'/book/META-INF/container.xml'\n );\n $this->app->renderThemeTemplate('mimetype.twig', array(),\n $bookTempDir.'/book/mimetype'\n );\n\n // compress book contents as ZIP file and rename to .epub\n // TODO: the name of the book file (book.epub) must be configurable\n Toolkit::zip($bookTempDir.'/book', $bookTempDir.'/book.zip');\n $this->app->get('filesystem')->copy(\n $bookTempDir.'/book.zip',\n $this->app['publishing.dir.output'].'/book.epub',\n true\n );\n\n // remove temp directory used to build the book\n $this->app->get('filesystem')->remove($bookTempDir);\n }",
"function book($param1 = '', $param2 = '', $param3 = '')\n {\n if ($this->session->userdata('teacher_login') != 1)\n redirect('login', 'refresh');\n \n $page_data['books'] = $this->db->get('book')->result_array();\n $page_data['page_name'] = 'book';\n $page_data['page_title'] = get_phrase('manage_library_books');\n $this->load->view('backend/index', $page_data);\n \n }",
"public function books()\n {\n return $this->morphedByMany('App\\Book', 'taggable');\n }",
"function displaybooks($sel1, $sel2, $store)\n{\n $conn = mysqli_connect(constant(\"DBSERVER\"),constant(\"DBUSER\"),constant(\"DBPASSWORD\"));\n $db_selected = mysqli_select_db($conn,MYDB);\n if (!$db_selected)\n {\n exit('Error open ' .MYDB.' => '.mysqli_error($conn));\t\t\n }\n $typ1 = $sel1;\n $typ2 = $sel2;\n if ($sel2 == 'none')\n { \n\t\tif (substr($sel1,0,5) == 'type.')\n\t\t{\t\n\t\t\t$typ1 = substr($sel1,5,strlen($sel1) - 5);\n\t\t\t$sql=\"SELECT * FROM \".MYTABLE.\" where type='\".$typ1.\"';\";\n\t\t}\n\t\telse if (substr($sel1,0,5) == 'lang.')\n\t\t{\n\t\t\t$typ1 = substr($sel1,5,strlen($sel1) - 5);\n\t\t\t$sql=\"SELECT * FROM \".MYTABLE.\" where langa='\".$typ1.\"';\";\n\t\t}\n\t\telse $sql=\"SELECT * FROM \".MYTABLE.\";\"; \n\t}\n\telse if ($sel1 == 'date') $sql=\"SELECT * FROM \".MYTABLE.\";\";\n\telse\n\t{\n\t\t$typ1 = substr($sel1,5,strlen($sel1) - 5);\n\t\t$typ2 = substr($sel2,5,strlen($sel2) - 5);\n\t\tif (substr($sel1,0,5) == 'type.')\t\n\t\t\t$sql=\"SELECT * FROM \".MYTABLE.\" where type='\".$typ1.\"' and langa='\".$typ2.\"';\";\n\t\telse\n\t\t $sql=\"SELECT * FROM \".MYTABLE.\" where langa='\".$typ1.\"' and type='\".$typ2.\"';\";\t\t\n\t}\n\t//echo \"sql=\".$sql.\"<br>\"; \n $rs=mysqli_query($conn,$sql);\n if (!$rs) \n {\n exit(\"Error in \".MYTABLE.\" => \".mysqli_error($conn));\n }\n $array_to_sort = array();\n $array_to_fetch = array();\n while ($row=mysqli_fetch_array($rs))\n {\n if (fit($row,$sel1,$sel2))\n array_push($array_to_sort,$row);\n else\n\t\t\tarray_push($array_to_fetch,$row);\n }\n //echo \"count=\".count($array_to_sort).\" sel1=\".$sel1.\"<br>\";\n // sort alphabetically by name \n if ($sel1 == 'title')\n usort($array_to_sort, 'compare_title');\n else if ($sel1 == 'author')\n usort($array_to_sort, 'compare_author');\n else \n\t\tusort($array_to_sort, 'compare_date');\n\tif (count($array_to_sort) == 0)\n\t\t$array_to_sort = $array_to_fetch;\n\tif ($sel2 == 'down') \n\t\t$array_to_sort = array_reverse($array_to_sort);\t\n $J = array();\n if ($store == 1)\n {\n // format file name\n $f = \"./my\".MYTABLE;\n if (($sel1 != $GLOBALS['MYLANGFIELDS'][1]) && ($sel1 != $GLOBALS['MYLANGFIELDS'][0]))\n {\n if (($sel1 != 'title') && ($sel1 != 'author')) \n {\n $f .= \"_\".$sel1;\n if ($sel2 != 'none')\n $f .= \"_\".$sel2;\n }\n else\n {\n $f .= \"_\".$sel1;\n }\n }\n $f .= \".csv\"; // sheina\n if (file_exists($f))\n {\n chmod($f,0666); \n unlink($f);\n }\n $stra = \"\";\n\t\t$stra .= strtoupper($GLOBALS['MYFIELDS'][0]).\",\".strtoupper($GLOBALS['MYFIELDS'][1]).\"\\n\"; \n //$file = fopen($f, \"w\");\n /*\n fwrite($file, pack(\"CCC\",0xef,0xbb,0xbf)); // for UTF-8 support\n fwrite($file, str_pad(\"|\",78,\"=\").\"|\\n\"); // top header\n $col1 = \"|\".str_pad(strtoupper($GLOBALS['MYFIELDS'][0]),38,\" \",STR_PAD_BOTH);\n $col2 = \"|\".str_pad(strtoupper($GLOBALS['MYFIELDS'][1]),38,\" \",STR_PAD_BOTH);\n $line = $col1.$col2.\"|\\n\";\n fwrite($file, $line); \n fwrite($file, str_pad(\"|\",78,\"=\").\"|\\n\"); // bottom header\n */\n }\n //else\n // $file = null;\n // for each record - check if it corresponds to the filter criteria\n // and store it into an associative array\n // if needed, write a record to the file\n for ($i=0; $i < count($array_to_sort); $i++)\n {\n $b = $array_to_sort[$i];\n $a = array('rowid'=>$b['id'],$GLOBALS['MYFIELDS'][1]=>$b[$GLOBALS['MYFIELDS'][1]],\n $GLOBALS['MYLANGFIELDS'][1]=>$b[$GLOBALS['MYLANGFIELDS'][1]],\n $GLOBALS['MYFIELDS'][0]=>$b[$GLOBALS['MYFIELDS'][0]],\n $GLOBALS['MYLANGFIELDS'][0]=>$b[$GLOBALS['MYLANGFIELDS'][0]],\n $GLOBALS['MYNOLANGFIELDS'][0]=>$b[$GLOBALS['MYNOLANGFIELDS'][0]],\n 'date'=>$b['date']);\n array_push($J,$a);\n if ($store == 1)\n //if ($file)\n \n {\n\t\t\t$stra .= $b[$GLOBALS['MYFIELDS'][0]].\",\".$b[$GLOBALS['MYFIELDS'][1]].\"\\n\";\n\t\t\t/*\n if ($b[$GLOBALS['MYLANGFIELDS'][0]] == 'he')\n {\n\t\t\t\t\n\t\t\t\t$stra = \"|\".str_pad_unicode($b[$GLOBALS['MYFIELDS'][0]],37,\n $b[$GLOBALS['MYFIELDS'][1]],37, \n STR_PAD_LEFT).\" |\\n\"; \n\t\t\t}\n else\n {\n $stra = \"| \".str_pad_unicode($b[$GLOBALS['MYFIELDS'][0]],37,\n $b[$GLOBALS['MYFIELDS'][1]],37, \n STR_PAD_RIGHT).\"|\\n\"; \n\t\t\t}\n\t\t\tfwrite($file,$stra);\n fwrite($file, str_pad(\"|\",78,\"-\").\"|\\n\");\n */ \n }\n }\n // send as response the JSON string of the array of records\n echo json_encode($J);\n if ($store == 1)\n //if ($file)\n { \n\t\t//echo $stra;\n\t\tfile_put_contents($f, $stra);\n //fclose($file);\n\t} \n}",
"public function getBookIndex($book_name)\n\t{\n\t\t$sql = sprintf(\"\n\t\t\tSELECT b.book\n\t\t\tFROM books b INNER JOIN languages l ON (b.language_id=l.id)\n\t\t\tWHERE l.name='KJV' AND b.short_name='%s'\",\n\t\t\tmysqli_real_escape_string($this->db, $book_name));\n\t\t$result = mysqli_query($this->db, $sql);\n\t\t$row = mysqli_fetch_assoc($result);\n\t\treturn $row['book'];\n\t}",
"public function book($id){\n try{\n $id = Crypt::decryptString($id);\n } catch (DecryptException $e) {\n return 'UPD-E0002';\n }\n \n $book = Book::find($id);\n $authors = Author::all()->where('status', NULL);\n return view('bahai.forms.update.book', compact('book', 'authors'));\n }",
"public function addBook($what = NULL, $how = 'type', $num = 1)\n {\n $whereSQL = \" WHERE \" . $how . \" = '\" . $what . \"'\";\n if ($num == 1) {\n $sql = 'SELECT * FROM wd_books' . $whereSQL . ' LIMIT 1;';\n } else {\n $sql = 'SELECT * FROM wd_books' . $whereSQL . ' ORDER BY RAND() LIMIT ' . $num . ';';\n }\n $query = $this->CI->db->query($sql);\n $out = '';\n if ($query->num_rows() < 1) {\n return $out;\n }\n foreach ($query->result() as $row)\n {\n $title = $row->title;\n $author = $row->author;\n $id = $row->id;\n $banner = $row->banner;\n $out .= '<div class=\"row well rounded-2x shadow-effect-1\"><div class=\"col-lg-12 col-md-12\">' . \"\\n\";\n $out .= '<div class=\"pull-left margin-right-5\">' . \"\\n\";\n $out .= '<a href=\"http://www.fishpond.com.au/product_info.php?ref=2802&id=';\n $out .= $id;\n $out .= '&affiliate_banner_id=1\" target=\"_blank\"><img class=\"pull-left margin-right-5 box-shadow shadow-effect-1 img-thumbnail rounded-2x\" src=\"http://www.fishpond.com.au/affiliate_show_banner.php?ref=2802&affiliate_pbanner_id=';\n $out .= $banner;\n $out .= '\" alt=\"';\n $out .= $title;\n $out .= '\" title=\"';\n $out .= $title;\n $out .= '\" /></a>' . \"\\n\";\n $out .= '</div>' . \"\\n\";\n $out .= '<p><strong>';\n $out .= $title;\n $out .= '</strong></p>' . \"\\n\";\n $out .= '<p>by ' . $author . '</p>' . \"\\n\";\n $out .= '<p>Buy the book <a href=\"http://www.fishpond.com.au/product_info.php?ref=2802&id=';\n $out .= $id;\n $out .= '&affiliate_banner_id=1\" target=\"_blank\">';\n $out .= $title;\n $out .= '</a> on Fishpond.</p>' . \"\\n\";\n $out .= '</div>' . \"\\n</div>\\n\";\n }\n return $out;\n }",
"public function book () \n { \n $book = Book::all();\n return view('books.show',compact('book'));\n }",
"function AddSingleBook()\n {\n $id_libro = $_POST[\"id_libro\"];\n $cart = new Carrello;\n $cart->InsertNewCart($id_libro);\n $book = new Libri;\n $libro = $book->GetBook($id_libro);\n return $libro[\"titolo\"].\"$$$\".$libro[\"autore\"].\"$$$\".$libro[\"prezzo\"].\"$$$\".$libro[\"path_copertina\"];\n }",
"public function ebook()\n\t{\n\t\tif (preg_match('/^New eBooks.+[ _-]{0,3}(\"|#34;)([\\w., &\\'()-]{8,}?\\b)\\.(par|vol|rar|nfo).*?(\"|#34;)/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //Rowwendees post voor u op www.nzbworld.me - [0/6] - \"Animaniacs - Lights, Camera, Action!.nzb\" yEnc (1/1)\n\t\tif (preg_match('/www.nzbworld.me - \\[\\d+\\/\\d+\\] - \"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . ' yEnc/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Re: Tune In: The Beatles: All These Years (Mark Lewisohn) - Lewisohn, Mark - Tune In- the Beatles- All These Years, Volume 01 - [epub].rar yEnc\n\t\t//Re: REQ: Robert Edsel The Monuments Men - Edsel, Robert M - The Monuments Men- Allied Heroes, Nazi Thieves, and the Greatest Treasure Hunt in History (Retail) [epub].rar yEnc\n\t\tif (preg_match('/^Re:(Req:)? [\\w:()\\?\\' -]+ - ([\\w ,.()\\[\\]-]{8,}?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\tif (preg_match('/^\\(Nora Roberts\\)\"([\\w., &\\'()-]{8,}?\\b)\\.(epub|mobi|html|pdf|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(Zelazny works) [36/39] - \"Roger Zelazny - The Furies.mobi\" yEnc\n\t\tif (preg_match('/\\((.+works)\\) \\[\\d+\\/(\\d+\\]) - ([\\w., &\\'()-]{8,}?\\b)\\.(mobi|pdf|epub|html|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[3];\n\t\t} //(Joan D Vinge sampler) [17/17] - \"Joan D Vinge - World's End.txt\" yEnc\n\t\tif (preg_match('/^\\([a-zA-Z ]+ sampler\\) \\[\\d+(\\/\\d+\\]) - \"([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//New - Retail - Juvenile Fiction - \"Magic Tree House #47_ Abe Lincoln at Last! - Mary Pope Osborne & Sal Murdocca.epub\" yEnc\n\t\t//New - Retail - \"Linda Howard - Cover of Night.epub\" yEnc\n\t\t//New - Retail - \"Kylie Logan_Button Box Mystery 01 - Button Holed.epub\" yEnc\n\t\tif (preg_match('/^New - Retail -( Juvenile Fiction -)? \"([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //(No. 1 Ladies Detective Agency) [04/13] - \"Alexander McCall Smith - No 1-12 - The Saturday Big Tent Wedding Party.mobi\" yEnc\n\t\tif (preg_match('/^\\(No\\. 1 Ladies Detective Agency\\) \\[\\d+(\\/\\d+\\]) - \"([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//[25/33] Philip Jose Farmer - Toward the Beloved City [ss].mobi\n\t\t//[2/4] Graham Masterton - Descendant.mobi\n\t\tif (preg_match('/^\\[\\d+\\/(\\d+\\]) ([\\w., &\\'()-]{8,}?\\b)\\.(txt|pdf|mobi|epub|azw)/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//(NordicAlbino) [01/10] - \"SWHQ_NA_675qe0033102suSmzSE.sfv\" yEnc\n\t\t//365 Sex Positions A New Way Every Day for a Steamy Erotic Year [eBook] - (1/5) \"365.Sex.Positions.A.New.Way.Every.Day.for.a.Steamy.Erotic.Year.eBook.nfo\" - yenc yEnc\n\t\tif (preg_match('/(.+)[-_\\s]{0,3}[\\(\\[]\\d+\\/\\d+[\\)\\]][-_\\s]{0,3}\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)' .\n\t\t\t\t\t $this->e0 . '([-_\\s]{0,3}yEnc){1,2}$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //[001/125] (NL Epub Wierook Set 49) - \"Abulhawa, Susan - Litteken van David_Ochtend in Jenin.epub\" yEnc\n\t\tif (preg_match('/^\\[\\d+\\/\\d+\\] .+? - \"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\") yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/1) \"Radiological Imaging of the Kidney - E. Quaia (Springer, 2011) WW.pdf\" - 162,82 MB - (Radiological Imaging of the Kidney - E. Quaia (Springer, 2011) WW) yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //(1/7) \"0865779767.epub\" - 88,93 MB - \"Anatomic Basis of Neurologic Diagnosis - epub\" yEnc\n\t\tif (preg_match('/^\\(\\d+\\/\\d+\\) \".+(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")([-_\\s]{0,3}\\d+[.,]\\d+ [kKmMgG][bB])?[-_\\s]{0,3}\"([\\w., &\\'()-]{8,}?\\b)\" yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[4];\n\t\t}\n\t\t//Re: REQ: Jay Lake's Mainspring series/trilogy (see titles inside) - \"Lake, Jay - Clockwork Earth 03 - Pinion [epub].rar\" 405.6 kBytes yEnc\n\t\t//Attn: Brownian - \"del Rey, Maria - Paradise Bay (FBS).rar\" yEnc\n\t\t//New Scan \"Herbert, James - Sepulchre (html).rar\" yEnc\n\t\tif (preg_match('/^(Attn:|Re: REQ:|New Scan).+?[-_\\s]{0,3}\"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+ \\(\\d+\\/\\d+\\) \"|\\.[A-Za-z0-9]{2,4}\")[-_\\s]{0,3}(\\d+[.,]\\d+ [kKmMgG][bB](ytes)?)? yEnc$/i',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t}\n\t\t//\"Gabaldon, Diana - Outlander [5] The Fiery Cross.epub\" yEnc\n\t\t//Kiny Friedman \"Friedman, Kinky - Prisoner of Vandam Street_ A Novel, The.epub\" yEnc\n\t\tif (preg_match('/.*\"([\\w., &\\'()-]{8,}?\\b)(\\.part\\d*|\\.rar)?(\\.vol.+?\"|\\.[A-Za-z0-9]{2,4}\").+?yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Patterson flood - Mobi - 15/45 \"James Patterson - AC 13 - Double Cross.mobi\"\n\t\tif (preg_match('/(.+?)[-_ ]{0,4}\\d+\\/\\d+[-_\\s]{0,3}([\\w. &\\'()\\[\\]-]{8,}?\\b.?)\\.(txt|pdf|mobi|epub|azw)\"( \\(\\d+\\/\\d+\\))?( )?$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[2];\n\t\t} //--- Michael Dobbs - House of Cards.mobi yEnc\n\t\tif (preg_match('/^--- ([\\w., &\\'()-]{8,}?\\b)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //'Steel's Edge - Ilona Andrews.epub' yEnc\n\t\tif (preg_match('/^\\'([\\w. &\\'()\\[\\]-]{8,}?\\b.?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})\\'[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //[1 of 1] - Howard Gordon - Gideon's War & Hard Target.epub yEnc\n\t\tif (preg_match('/^\\[\\d+ of \\d+\\][-_\\s]{0,3}([\\w. &\\'()\\[\\]-]{8,}?\\b.?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //1 Playboy-Ausgabe vom Jnner 1953 [RARITT].rar yEnc\n\t\tif (preg_match('/^([\\w. &\\'\\[\\]-]{8,}?\\b.?)([-_](proof|sample|thumbs?))*(\\.part\\d*(\\.rar)?|\\.rar|\\.7z)?(\\d{1,3}\\.rev|\\.vol.+?|\\.[A-Za-z0-9]{2,4})[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //Re: Req: Please, does anyone have Scott Berg's Wilson biography? MTIA... - A. Scott Berg - Wilson.epub yEnc\n\t\tif (preg_match('/^.+ - ([^.]{8,})\\.[A-Za-z0-9]{2,4}[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //REQ: \"Keep it Pithy\" by Bill O'Reilly \"Keep It Pithy - Bill O'Reilly.epub\"yEnc\n\t\tif (preg_match('/.*\"([\\w\\säöüÄÖÜß+¤¶!.,&_()\\[\\]\\'\\`{}#-]{8,}?\\b.?)\\.[A-Za-z0-9]{2,4}\"[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t} //For Your Eyes Only - Ian Fleming.epub - answering my own request yEnc\n\t\tif (preg_match('/^([^.]{8,})\\.[A-Za-z0-9]{2,4}.+[-_\\s]{0,3}yEnc$/',\n\t\t\t\t\t $this->subject,\n\t\t\t\t\t $match)\n\t\t) {\n\t\t\treturn $match[1];\n\t\t}\n\t\treturn array(\n\t\t\t\"cleansubject\" => $this->releaseCleanerHelper($this->subject), \"properlynamed\" => false\n\t\t);\n\t}",
"public function books()\n {\n return $this->hasMany('App\\Book');\n }",
"function url_book(int $bid): string\n{\n $book = getOption('page_book', 'book');\n return url_build($book, \"bid=$bid\");\n}",
"public function run()\n {\n $book = [\n [\n 'book_name' => 'Wikipedia',\n 'description' => 'Sint commodo veniam ad cillum occaecat aute consectetur Lorem. Occaecat adipisicing est ad do tempor ipsum. Eu eiusmod proident sit amet consectetur irure sunt consequat. Dolor anim nisi consequat nulla veniam magna duis ex aliquip veniam.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '2',\n ],\n [\n 'book_name' => 'Qui commodo',\n 'description' => 'Et occaecat in ut pariatur elit qui. Enim do consectetur velit sunt minim velit eu est. Laboris cillum eiusmod ex aliquip. Voluptate in reprehenderit est ea duis duis magna.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '1',\n ],\n [\n 'book_name' => 'Et occaecat in',\n 'description' => 'Excepteur dolore labore reprehenderit ex quis reprehenderit nulla deserunt ullamco ea exercitation aliqua aute. Fugiat esse pariatur fugiat exercitation incididunt adipisicing ex excepteur id aute labore ad fugiat nulla. Incididunt nulla nostrud in labore in pariatur irure ipsum ipsum exercitation.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '3',\n ],\n [\n 'book_name' => 'Excepteur dolore',\n 'description' => 'Adipisicing officia reprehenderit consequat labore excepteur culpa laborum occaecat. Adipisicing anim deserunt reprehenderit exercitation in deserunt. Lorem ad aliquip exercitation aliquip esse adipisicing ullamco in ullamco deserunt ipsum anim. Cillum esse fugiat proident elit aliquip. Magna reprehenderit aliquip laborum cillum in veniam in nostrud dolore irure proident veniam nulla est.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '4',\n ],\n [\n 'book_name' => 'Adipisicing officia',\n 'description' => 'Anim occaecat ad est nulla laboris laborum esse irure id ullamco adipisicing fugiat laborum nisi. Amet minim sit commodo proident adipisicing exercitation in elit laboris. Ex elit aliquip magna adipisicing veniam officia sit proident duis non. Eiusmod minim aute do ea sit veniam excepteur adipisicing quis exercitation commodo in laborum nulla. Commodo anim commodo et aliquip reprehenderit laboris aute ut cupidatat magna. Culpa veniam aliqua tempor adipisicing anim aliqua magna ipsum qui magna dolore elit dolor. Id exercitation quis esse laborum anim dolore ipsum reprehenderit do.',\n 'img' => '.\\public\\wiki.jpg',\n 'author_id' => '5',\n ],\n ];\n\n foreach ($book as $data) {\n \\App\\Models\\Book::create($data);\n }\n }",
"function book($param1 = '', $param2 = '', $param3 = '') {\r\n if ($this->session->userdata('accountant_login') != 1)\r\n redirect('login', 'refresh');\r\n if ($param1 == 'create') {\r\n $data['name'] = $this->input->post('name');\r\n $data['description'] = $this->input->post('description');\r\n $data['price'] = $this->input->post('price');\r\n $data['author'] = $this->input->post('author');\r\n $data['class_id'] = $this->input->post('class_id');\r\n $data['status'] = $this->input->post('status');\r\n $this->db->insert('book', $data);\r\n redirect(base_url() . 'index.php?admin/book', 'refresh');\r\n }\r\n if ($param1 == 'do_update') {\r\n $data['name'] = $this->input->post('name');\r\n $data['description'] = $this->input->post('description');\r\n $data['price'] = $this->input->post('price');\r\n $data['author'] = $this->input->post('author');\r\n $data['class_id'] = $this->input->post('class_id');\r\n $data['status'] = $this->input->post('status');\r\n\r\n $this->db->where('book_id', $param2);\r\n $this->db->update('book', $data);\r\n redirect(base_url() . 'index.php?admin/book', 'refresh');\r\n } else if ($param1 == 'edit') {\r\n $page_data['edit_data'] = $this->db->get_where('book', array(\r\n 'book_id' => $param2\r\n ))->result_array();\r\n }\r\n if ($param1 == 'delete') {\r\n $this->db->where('book_id', $param2);\r\n $this->db->delete('book');\r\n redirect(base_url() . 'index.php?admin/book', 'refresh');\r\n }\r\n $page_data['books'] = $this->db->get('book')->result_array();\r\n $page_data['page_name'] = 'book';\r\n $page_data['page_title'] = get_phrase('manage_library_books');\r\n $this->load->view('index', $page_data);\r\n }",
"function getBook($name, $locale = null);",
"function setISBN($book_isbn){\t\n\t\t$result = file_get_contents('http://openlibrary.org/api/books?bibkeys=ISBN:'.$book_isbn.'&format=json&jscmd=data');\n\t\t$this->ol = json_decode($result, TRUE);\t\t\t\n\t\t$this->isbn = $book_isbn;\n\t\t\n\t}",
"public function getBookId()\n {\n return $this->bookId;\n }",
"public function getBooks()\n {\n return $this->hasMany(Book::className(), ['author_id' => 'id']);\n }",
"public static function get_all_books() {\n\t\t$books = BooksQModel::get_all_books();\n\n\t\tforeach ($books as $book) {\n\t\t\t//shorted description\n\t\t\tif (strlen($book->description) >= 122)\n\t\t\t\t$book->description = mb_substr($book->description, 0, 120).'...';\n\t\t\t//get uploader\n\t\t\t$uploader = UsersQModel::get_user_by_id($book->id_uploader);\n\t\t\tif ($uploader != null)\n\t\t\t\t$book->uploader = $uploader->name;\n\t\t\telse\n\t\t\t\t$book->uploader = 'Đang cập nhật';\n\t\t}\n\n\t\treturn $books;\n\t}",
"function tbc_completed_books_all()\n{\n $category_id = NULL;\n $output = \"\";\n $output = \"<h4>Category</h4>\";\n $output .= \"<hr style='background-color: #abb2b8;' /><div style='width:100%; float:left;'><h4>\";\n $output .= _textbook_companion_list_of_new_category($category_id);\n $output .= \"</h4></div>\";\n $result_count = db_query(\"SELECT pe.book FROM {textbook_companion_preference} pe LEFT JOIN textbook_companion_proposal po ON pe.proposal_id = po.id WHERE po.proposal_status =3 AND pe.approval_status =1\");\n $row_count = $result_count->rowCount();\n $output .= \"<p style='clear: both;'>Total number of completed books : \" . $row_count . \" </p><br><span style='color:red;'>The list below is not the books as named but only are the solved example for R</span>\";\n $output .= \"<hr style='background-color: #abb2b8;' />\";\n $result_category = db_query(\"SELECT * FROM {list_of_category} WHERE category_id !=0\");\n $row_category_count = $result_category->rowCount();\n $output .= \"<ol style='list-style-type: upper-roman;'><h4>\";\n for ($i = 1; $i <= $row_category_count; $i++)\n {\n $output .= \"<div id=$i>\" . _textbook_companion_list_of_new_category_display($i) . \"</div><br>\";\n } //$i = 1; $i <= $row_category_count; $i++\n $output .= \"</h4></ol>\";\n return $output;\n}",
"public function select_book($data){\n $query=$this->db->query('UPDATE `swap_reqs` SET `received_book`=\"'.$data['b_UID'].'\", `swap_status`=\"To be approved\" WHERE swap_UID = \"'.$data['swap_UID'].'\" ');\n }",
"function switchTwoItems($iItemIndex1, $iItemIndex2) {\r\n\t\t\t$oTmp = $this->getItem($iItemIndex1);\r\n\t\t\t\r\n\t\t\t// set index 1 = item 2 setItem\r\n\t\t\t$this->setItem($iItemIndex1, $this->getItem($iItemIndex2));\t\r\n\t\t\t\r\n\t\t\t// set index 2 = tmp setItem\r\n\t\t\t$this->setItem($iItemIndex2, $oTmp);\t\t\t\r\n\t}",
"function getAllBooks( ) {\n global $db;\n $stmt = mysqli_prepare(\n $db,\n 'SELECT\n books.bid,\n books.title,\n books.description,\n bookauthors.name,\n genres.name,\n books.coverimage\n FROM\n books CROSS\n JOIN bookgenres ON bookgenres.bid = books.bid CROSS\n JOIN genres ON genres.id = bookgenres.genreid CROSS\n JOIN bookauthors ON bookauthors.bid = books.bid CROSS\n JOIN bcopies ON bcopies.bid = books.bid\n WHERE\n bcopies.deleted = 0 AND\n bcopies.given = 0\n ORDER BY\n books.title ASC\n ');\n mysqli_stmt_execute( $stmt );\n mysqli_stmt_store_result( $stmt );\n mysqli_stmt_bind_result( $stmt,$id, $title, $description, $author, $genre, $image );\n while ( mysqli_stmt_fetch( $stmt ) ) {\n $book[ 'title' ] = $title;\n $book[ 'img' ] = $image;\n $book[ 'description' ] = $description;\n $book[ 'authors' ][ $author ] = true;\n $book[ 'genres' ][ $genre ] = true;\n $book[ 'bid' ] = $id;\n $books[ $id ] = $book;\n }\n return $books;\n }",
"public function boutonaddchapter() {\n\t\t$bookManager = $this->booksManager;\n\t\t$books = $bookManager->getBooks();\n\t\tif ( isset( $_POST['bookSelect'] ) ) {\n\t\t\t$bookSelect = $bookManager->getBook( $_POST['bookSelect'] );\n\t\t\t$bookId = $bookManager->getBook( $_POST['bookSelect'] )->getId();\n\t\t\t$selectedbook = $bookSelect->getTitle();\n\t\t} else {\n\t\t\t$selectedbook = \"Choisissez votre livre\";\n\t\t}\n\t\t$success = ( isset( $_SESSION['success'] ) ? $_SESSION['success'] : null );\n\t\t$error = ( isset( $_SESSION['error'] ) ? $_SESSION['error'] : null );\n\t\t$bookId = ( isset( $bookId ) ? $bookId : null );\n\t\t$bookSelect = ( isset( $_POST['bookSelect'] ) ? $_POST['bookSelect'] : null );\n\t\t$myView = new View( 'boutonaddchapter' );\n\t\t$myView->renderView( array(\n\t\t\t'books' => $books,\n\t\t\t'bookId' => $bookId,\n\t\t\t'selectedbook' => $selectedbook,\n\t\t\t'success' => $success,\n\t\t\t'error' => $error,\n\t\t\t'bookSelect' => $bookSelect\n\t\t) );\n\t}",
"public function assembleBook()\n {\n $book = $this->app->render('book.twig', array(\n 'items' => $this->app['publishing.items']\n ));\n $temp = tempnam(sys_get_temp_dir(), 'easybook_');\n fputs(fopen($temp, 'w+'), $book);\n\n // use PrinceXML to transform the HTML book into a PDF book\n $prince = $this->app->get('prince');\n $prince->setBaseURL($this->app['publishing.dir.contents'].'/images');\n\n // Prepare and add stylesheets before PDF conversion\n if ($this->app->edition('include_styles')) {\n $defaultStyles = tempnam(sys_get_temp_dir(), 'easybook_style_');\n $this->app->render('@theme/style.css.twig', array(\n 'resources_dir' => $this->app['app.dir.resources'].'/'\n ),\n $defaultStyles\n );\n\n $prince->addStyleSheet($defaultStyles);\n }\n\n // TODO: custom book styles could also be defined with Twig\n $customCss = $this->app->getCustomTemplate('style.css');\n if (file_exists($customCss)) {\n $prince->addStyleSheet($customCss);\n }\n\n // TODO: the name of the book file (book.pdf) must be configurable\n $errorMessages = array();\n $prince->convert_file_to_file($temp, $this->app['publishing.dir.output'].'/book.pdf', $errorMessages);\n\n // show PDF conversion errors\n if (count($errorMessages) > 0) {\n foreach ($errorMessages as $message) {\n echo $message[0].': '.$message[2].' ('.$message[1].')'.\"\\n\";\n }\n }\n }",
"function _erpal_book_helper_node_book_page_links(&$data, $node, $is_node_view=false) {\n //single book page context\n if ($is_node_view) {\n $query = array();\n erpal_make_action($data, t('Edit this book page'), 'node/'.$node->nid.'/edit', $query);\n \n _erpal_book_helper_book_and_page_actions($data, $node, $is_node_view);\n \n }\n}",
"public function books()\n {\n\t \t return $this->belongsToMany(Book::class);\n }",
"protected function _doAddressbooks()\n {\n global $prefs;\n\n $abooks = $prefs->getValue('addressbooks');\n if (is_array(json_decode($abooks))) {\n return;\n }\n\n $abooks = explode(\"\\n\", $abooks);\n if (is_array($abooks) && !empty($abooks[0])) {\n $new_prefs = array();\n foreach ($abooks as $abook) {\n $new_prefs[] = $this->_updateShareName($abook);\n }\n\n $prefs->setValue('addressbooks', json_encode($new_prefs));\n }\n }",
"public function bookid($bkId)\n {\n $Book = Book::all()->where('id', $bkId);\n $related = Book::all();\n $Categories = Category::all();\n $rates = BookRating::all();\n $comments = Comment::all();\n $commRate = CommentRating::all();\n $favourite = Favourite::all();\n return view('bookid', ['books' => $Book,'Cates' => $Categories, 'rates' => $rates,'related' => $related, 'comment' => $comments, 'comRate' => $commRate, 'fav' => $favourite]);\n }",
"function echoDocumentLink2 ($file,$id1,$id2)\r{\r\t// name and the event ids that need to be highlighted.\r\t// *** Very similar to echoDocumentLink, need to merge them\r\t\r\techo \"<a href=displayArticle.php?file=$file&highlight=$id1,$id2 target=_NEW>\";\r\techo \"<img src=inline004.gif border=0></a>\\n\";\r}",
"public function run()\n {\n $book = new Book();\n $book->title = 'To kill a mockingbird';\n $book->synopsis = 'To Kill a Mockingbird is Harper Lee’s 1961 Pulitzer Prize-winning novel about a child’s view of race and justice in the Depression-era South. The book sells one million copies per year, and Scout remains one of the most beloved characters in American fiction.';\n $book->author = 'Harper Lee';\n $book->genre = 'Southern Gothic';\n $book->logo_path = '../assets/img/theme/mockingbird.jpg';\n $book->no_of_issues = 8;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Robinson Crusoe';\n $book->synopsis = 'Robinson Crusoe was published in 1719 during the Enlightenment period of the 18th century. In the novel Crusoe sheds light on different aspects of Christianity and his beliefs. The book can be considered a spiritual autobiography as Crusoe\\'s views on religion drastically change from the start of his story and then the end.';\n $book->author = 'Daniel Defoe';\n $book->genre = 'Robinsonadec';\n $book->logo_path = '../assets/img/theme/crusoe.jpg';\n $book->no_of_issues = 5;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Crime and punishment';\n $book->synopsis = 'Crime and Punishment was first published in the literary journal The Russian Messenger in twelve monthly installments during 1866. It was later published in a single volume. It is the second of Dostoevsky\\'s full-length novels following his return from ten years of exile in Siberia. Crime and Punishment is considered the first great novel of his \"mature\" period of writing. The novel is often cited as one of the supreme achievements in literature';\n $book->author = 'Fyodor Dostoevsky';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/punishment.jpg';\n $book->no_of_issues = 12;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'The Trial';\n $book->synopsis = 'The Trial tells the story of Josef K., a man arrested and prosecuted by a remote, inaccessible authority, with the nature of his crime revealed neither to him nor to the reader.';\n $book->author = 'Franz Kafka';\n $book->genre = 'Philosophical';\n $book->logo_path = '../assets/img/theme/trial.jpg';\n $book->no_of_issues = 4;\n\n $book->save();\n\n $book = new Book();\n $book->title = 'Anna Karenina';\n $book->synopsis = 'A complex novel in eight parts, with more than a dozen major characters, it is spread over more than 800 pages (depending on the translation and publisher), typically contained in two volumes. It deals with themes of betrayal, faith, family, marriage, Imperial Russian society, desire, and rural vs. city life. The plot centers on an extramarital affair between Anna and dashing cavalry officer Count Alexei Kirillovich Vronsky that scandalizes the social circles of Saint Petersburg and forces the young lovers to flee to Italy in a search for happiness. After they return to Russia, their lives further unravel.';\n $book->author = 'Leo Tolstoy';\n $book->genre = 'Realist novel';\n $book->logo_path = '../assets/img/theme/karenina.jpg';\n $book->no_of_issues = 15;\n\n $book->save();\n }",
"function booklink($term,$type,$custom=\"\"){\n$texturl=\"http://cat.mfrl.org/uhtbin/cgisirsi.exe/0/CBURG/0/5?searchdata1=%22\";\n$esc_term=str_replace(\" \", \"+\", $term);\n$esc_term= str_replace('&+','',$esc_term);\n$texturl.=$esc_term.\"%22&srchfield1=\";\nif($type==\"t\") $texturl.=\"TI%5ETITLE\";\nif($type==\"texact\") $texturl.=\"TI%5ETITLE&match_on=EXACT\";\nif($type==\"a\") $texturl.=\"AU%5EAUTHOR\";\nif($type==\"i\") $texturl.=\"ISBN\";\nif($type==\"s\") $texturl.=\"GENERAL%5ESUBJECT\";\nif($custom==\"\")$custom=$term;\nif(($type==\"t\")||($type==\"texact\")) $custom=\"<i>\".$custom.\"</i>\";\necho \"<a href=\\\"\".$texturl.\"\\\">\".$custom.\"</a>\";\n\n}",
"public function addBook($title, $author,$publisher,$saletype,$published_date,$edition,\n $subjectarea,$condition,$askingprice, $description,$bUserId,$category,$uploadtime,$keyword,$image)\n {\n \n $title = mysql_real_escape_string($title);\n $author = mysql_real_escape_string ($author);\n $publisher = mysql_real_escape_string($publisher);\n $saletype = mysql_real_escape_string($saletype);\n $published_date =mysql_real_escape_string($published_date);\n $edition = mysql_real_escape_string($edition);\n $subjectarea = mysql_real_escape_string($subjectarea);\n $condition = mysql_real_escape_string($condition);\n $askingprice = mysql_real_escape_string($askingprice);\n $description = mysql_real_escape_string ($description); \n $bUserId = mysql_real_escape_string($bUserId);//mysql_real_escape_string($bUserId);\n $category = mysql_real_escape_string($category);\n $uploadtime = date('Y-m-d H:i:s');\n $keyword = mysql_real_escape_string($keyword);\n $image = mysql_real_escape_string($image);\n \n $api= new Api;\n $api->additem($bUserId, $category, $uploadtime, $keyword, $image, $saletype);\n \n $sql3 = \"SELECT itemid \n FROM item\n WHERE uploadtime = '$uploadtime'\";\n $itemid2 = mysql_fetch_row(mysql_query($sql3));\n $itemid2 = $itemid2[0];\n $sql2 = \"INSERT INTO book \n VALUES ('$itemid2','$title','$author','$publisher',\n '$published_date','$edition',\n '$subjectarea','$condition',\n '$saletype','$askingprice',\n '$description')\";\n $result = mysql_query($sql2);\n return $result;\n }",
"public function getLast2Opinions($book){\n $sql = \"SELECT o.title, o.txt, o.note, o.pubDate, a.username, o.author FROM opinion o\n INNER JOIN account a ON o.author=a.id\n INNER JOIN book b ON o.book=b.id\n ORDER BY o.pubDate LIMIT 2;\";\n $res = mysqli_query($this->link, $sql);\n $opinions = mysqli_fetch_all($res);\n return $opinions;\n }",
"public function run()\n {\n $book_1 = new Books();\n $book_1->name = 'Harry Potter e a Camara Secreta';\n $book_1->page_count = 500;\n $book_1->image_src = 'uploads/images/books/capa1.jpg';\n $book_1->publishing_company_id = 1;\n $book_1->save();\n $book_1->authors()->attach(Authors::where(\"author_name\", \"JK Rowling\")->first());\n\n $book_2 = new Books();\n $book_2->name = 'Harry Potter e o Prisioneiro de Azkaban';\n $book_2->page_count = 500;\n $book_2->image_src = 'uploads/images/books/capa2.jpg';\n $book_2->publishing_company_id = 1;\n $book_2->save();\n $book_2->authors()->attach(Authors::where(\"author_name\", \"JK Rowling\")->first());\n\n $book_3 = new Books();\n $book_3->name = 'A fabula do livro azul';\n $book_3->page_count = 500;\n $book_3->image_src = 'uploads/images/books/capa3.jpg';\n $book_3->publishing_company_id = 2;\n $book_3->save();\n $book_3->authors()->attach(Authors::where(\"author_name\", \"Machado de Assis\")->first());\n \n\n }",
"public function getBookid($book_id){\n $db = new DbConnect();\n $con =$db->connect();\n $books_id = mysqli_real_escape_string($con,$book_id);\n $result = mysqli_query($con,\"SELECT * from book inner join genre ON book.genre_id = genre.genre_id where book.book_id = '$books_id'\");\n $books = mysqli_fetch_array($result,MYSQLI_ASSOC);\n return $books;\n\n }",
"public function titleDetailsFilteredOpds($books);",
"public function addBook()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$ISBN = $_POST['ISBN'];\n\t\t\t$title = $_POST['title'];\n\t\t\t$author = $_POST['author'];\n\t\t\t$press = $_POST['press'];\n\t\t\t$category = $_POST['category'];\n\t\t\t$pub_date = $_POST['pub_date'];\n\t\t\t$price = $_POST['price'];\n\t\t\t$floor = $_POST['floor'];\n\t\t\t$bookshelf = $_POST['bookshelf'];\n\t\t\t$area_code = $_POST['area_code'];\n\t\t\t$number = $_POST['number'];\n\t\t\t$book = D('Book_species');\n\t\t\t$sql1 = \"select count(*) as a from lib_book_unique\";\n\t\t\t$return23 = $book->query($sql1);\n\t\t\t$num = $return23[0]['a'];\n\t\t\t$newbookid = array();\n\t\t\tfor ($k = 1; $k <= $number; $k++) {\n\t\t\t\t$numnew = $k + $num;\n\t\t\t\t$temp_num = 100000;\n\t\t\t\t$new_num = $numnew + $temp_num;\n\t\t\t\tarray_push($newbookid, substr($new_num, 1, 5));\n\t\t\t}\n\t\t\t$sql2333 = \"select * from lib_book_species where isbn = '{$ISBN}';\";\n\t\t\t$return2333 = $book->query($sql2333);\n\t\t\t$sql = \"insert into lib_book_species(isbn,title,author,press,\n\t\t\t\t\tcategory,pub_date,price,floor,bookshelf,area_code) \n\t\t\t\t\tvalues('{$ISBN}','{$title}','{$author}',\n\t\t\t\t\t'{$press}','{$category}','{$pub_date}',\n\t\t\t\t\t'{$price}','{$floor}','{$bookshelf}','{$area_code}');\";\n\t\t\tif(!$return2333){\n\t\t\t\t$return = $book->execute($sql);\n\t\t\t}\n\t\t\t$return = true;\n\t\t\t$sql1 = \"insert into lib_book_unique(isbn) values('{$ISBN}');\";\n\t\t\tfor ($i = 0; $i < $number; $i++) {\n\t\t\t\t$return1 = $book->execute($sql1);\n\t\t\t\t$return = $return && $return1;\n\t\t\t}\n\n\t\t\tif ($return) {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'success',\n\t\t\t\t\t'msg' => 'Add successfully!',\n\t\t\t\t\t'newbookid' => json_encode($newbookid)\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t} else {\n\t\t\t\t$json = json_encode(array(\n\t\t\t\t\t'code' => 'fail',\n\t\t\t\t\t'msg' => 'SQL Error!'\n\t\t\t\t));\n\t\t\t\techo $json;\n\t\t\t}\n\t\t} else {\n\t\t\t$json = json_encode(array(\n\t\t\t\t'code' => 'fail',\n\t\t\t\t'msg' => 'Please Login!'\n\t\t\t));\n\t\t\techo $json;\n\t\t}\n\t}",
"function testAddBook()\n {\n\n //Arrange\n $title = \"Harry Houdinis Magic\";\n $id = null;\n $test_book = new Book($title, $id);\n $test_book->save();\n\n $title2 = \"Harry and Maggies Adventures\";\n $test_book2 = new Book($title2, $id);\n $test_book2->save();\n\n $name = \"Harry Houdini\";\n $id = null;\n $test_author = new Author($name, $id);\n $test_author->save();\n\n $name2 = \"Maggie Pie\";\n $test_author2 = new Author($name2, $id);\n $test_author2->save();\n\n //Act\n $test_author->addBook($test_book);\n $test_author->addBook($test_book2);\n $test_author2->addBook($test_book2);\n\n //Assert\n $this->assertEquals($test_author->getBooks(), [$test_book, $test_book2]);\n $this->assertEquals($test_author2->getBooks(), [$test_book2]);\n }",
"function book_together() {\r\n $data['page_meta'] = get_page_meta(ADVERTISING_BOOK_TOGETHER_PAGE, null);\r\n \r\n $data = get_page_navigation($data, $data['is_mobile'], ADVERTISING_BOOK_TOGETHER_PAGE);\r\n \r\n $data['main_view'] = load_view('advertising/book_together', $data, $data['is_mobile']);\r\n \r\n return $data;\r\n }",
"public function edit()\n {\n $user_id = Auth::user()->id;\n $data = INPUT::all();\n $rules = $this->rules();\n $messages = $this->messages();\n $validator = Validator::make($data, $rules, $messages);\n if (!$validator->fails()) {\n $book = Book::find($data['id']);\n $book->title = $data['title'];\n $book->subtitle = $data['subtitle'];\n $book->publishedDate = $data['publishedDate'];\n $book->description = $data['description'];\n $book->pages = $data['pages'];\n $book->isbn10 = $data['isbn10'];\n $book->isbn13 = $data['isbn13'];\n $book->price_day = $data['price_day'];\n $book->price_bail = $data['price_bail'];\n $book->price_sale = $data['price_sale'];\n $book->language = $data['language'];\n\n if ($data['publisher'] != $book->id_publisher) {\n if ($data['publisher'] != '0') {\n $book->id_publisher = $data['publisher'];\n } else {\n $publisher = new Publisher;\n $publisher->publisher = $data['newpublisher'];\n $publisher->save();\n $book->id_publisher = $publisher->id;\n }\n }\n\n if (isset($data['cover'])) {\n $book->cover = file_get_contents($data['cover']);\n }\n\n $book_id = $book->id;\n Book_Collection::where('book_id', $book_id)->delete();\n Author_Book::where('book_id', $book_id)->delete();\n\n $book_collection = new Book_Collection;\n $book_collection->book_id = $book_id;\n $book_collection->collection_id = $data['collection'];\n\n $authors = explode(',', $data['authors']);\n foreach ($authors as $author) {\n $tmp = Author::where('name', 'like', $author)->limit(1)->get();\n if (count($tmp) > 0) {\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $tmp[0]->id;\n $author_book->save();\n } else {\n $newAuthor = new Author;\n $newAuthor->name = $author;\n $newAuthor->save();\n $author_id = $newAuthor->id;\n $author_book = new Author_Book;\n $author_book->book_id = $book_id;\n $author_book->author_id = $author_id;\n $author_book->save();\n }\n }\n $book->save();\n return redirect('book/edit/' . $book_id . '');\n }\n return back()->withInput($data)->withErrors($validator);\n }",
"private function addRelations($book_name, $authors_names)\n {\n $book_id = $this->findBySql(\"SELECT max(id) as 'id' FROM books WHERE book_name = $book_name\")[0]['id'];\n $sqlGetAuthId = \"SELECT id FROM authors where name_author = ?\";\n $sqlAddRelation = \"INSERT INTO relations(book_id, author_id) VALUES (?, ?)\";\n foreach ($authors_names as $author) {\n $author_id = $this->findBySql($sqlGetAuthId, [$author])[0]['id'];\n $this->findBySql($sqlAddRelation, [$book_id, $author_id]);\n }\n }",
"public function run()\n {\n DB::table('books')->insert(\n [\n // Suzanne Collins\n [\n 'author_id' => 1,\n 'title' => \"Gregor the Overlander\",\n 'isbn' => \"9780439678131\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 1,\n 'title' => \"Gregor and the Prophecy of Bane\",\n 'isbn' => \"9780439650762\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 1,\n 'title' => \"Gregor and the Curse of the Warmbloods\",\n 'isbn' => \"9780439656245\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 1,\n 'title' => \"Gregor and the Marks of Secret\",\n 'isbn' => \"9780439791465\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 1,\n 'title' => \"Gregor and the Code of Claw\",\n 'isbn' => \"9780439791441\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 1,\n 'title' => \"The Hunger Games\",\n 'isbn' => \"9780439023528\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 1,\n 'title' => \"Catching Fire\",\n 'isbn' => \"9780545227247\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 1,\n 'title' => \"Mockingjay\",\n 'isbn' => \"9780439023511\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n\n // Anne McCaffrey\n [\n 'author_id' => 2,\n 'title' => \"Dragonflight\",\n 'isbn' => \"9780345335463\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 2,\n 'title' => \"Dragonquest\",\n 'isbn' => \"9780345022455\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 2,\n 'title' => \"The White Dragon\",\n 'isbn' => \"9780345275677\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 2,\n 'title' => \"Dragonsong\",\n 'isbn' => \"9780689305078\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 2,\n 'title' => \"Dragonsinger\",\n 'isbn' => \"9780689305702\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 2,\n 'title' => \"Dragondrums\",\n 'isbn' => \"9780689306853\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n\n // Peter F. Hamilton\n [\n 'author_id' => 3,\n 'title' => \"Mindstar Rising\",\n 'isbn' => \"9780330537742\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"A Quantum Murder\",\n 'isbn' => \"9780330537759\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Nano Flower\",\n 'isbn' => \"9780330537810\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Reality Dysfunction\",\n 'isbn' => \"9781447208570\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Neutronium Alchemist\",\n 'isbn' => \"9781447208587\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Naked God\",\n 'isbn' => \"9781447208594\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"Misspent Youth\",\n 'isbn' => \"9781447224082\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"Pandora's Star\",\n 'isbn' => \"9781447279662\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"Judas Unchained\",\n 'isbn' => \"9781447279679\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Dreaming Void\",\n 'isbn' => \"9781447208563\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Temporal Void\",\n 'isbn' => \"9780330507882\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Evolutionary Void\",\n 'isbn' => \"9780330443173\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 3,\n 'title' => \"The Abyss Beyond Dreams\",\n 'isbn' => \"9780230769465\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n\n // J. K. Rowling\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Philosopher's Stone\",\n 'isbn' => \"0747532699\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Chamber of Secrets\",\n 'isbn' => \"0747538492\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Prisoner of Azkaban\",\n 'isbn' => \"0747542155\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Goblet of Fire\",\n 'isbn' => \"074754624X\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Order of the Phoenix\",\n 'isbn' => \"0747551006\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Half-Blood Prince\",\n 'isbn' => \"0747581088\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 4,\n 'title' => \"Harry Potter and the Deathly Hallows\",\n 'isbn' => \"0545010225\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n\n // Ursula Le Guin\n [\n 'author_id' => 5,\n 'title' => \"A Wizard of Earthsea\",\n 'isbn' => \"0395276535\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Tombs of Atuan\",\n 'isbn' => \"187470323X\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Farthest Shore\",\n 'isbn' => \"0689300549\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"Tehanu\",\n 'isbn' => \"0689315953\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"Tales from Earthsea\",\n 'isbn' => \"0151005613\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Other Wind\",\n 'isbn' => \"0151006849\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Dispossessed\",\n 'isbn' => \"0060125632\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Word for World Is Forest\",\n 'isbn' => \"0399117164\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"Rocannon's World\",\n 'isbn' => \"0824014243\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"Planet of Exile\",\n 'isbn' => \"0575025956\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"City of Illusions\",\n 'isbn' => \"0575007583\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Left Hand of Darkness\",\n 'isbn' => \"0441478123\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Telling\",\n 'isbn' => \"0151005672\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Lathe of Heaven\",\n 'isbn' => \"0684125293\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"The Wind's Twelve Quarters\",\n 'isbn' => \"0060125624\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 5,\n 'title' => \"Orsinian Tales\",\n 'isbn' => \"0060125616\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n\n // Terry Pratchett\n [\n 'author_id' => 6,\n 'title' => \"The Colour of Magic\",\n 'isbn' => \"086140324X\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Light Fantastic\",\n 'isbn' => \"0861402030\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Equal Rites\",\n 'isbn' => \"0575039507\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Mort\",\n 'isbn' => \"0575041714\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Sourcery\",\n 'isbn' => \"0575042176\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Wyrd Sisters\",\n 'isbn' => \"0575043636\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Pyramids\",\n 'isbn' => \"0575044632\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Guards! Guards!\",\n 'isbn' => \"0575046066\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Eric\",\n 'isbn' => \"0575051914\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Moving Pictures\",\n 'isbn' => \"0575047631\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Reaper Man\",\n 'isbn' => \"0575049790\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Witches Abroad\",\n 'isbn' => \"0575049804\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Small Gods\",\n 'isbn' => \"0060177500\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Lords and Ladies\",\n 'isbn' => \"0575052236\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Men At Arms\",\n 'isbn' => \"0575055030\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Soul Music\",\n 'isbn' => \"0575055049\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Interesting Times\",\n 'isbn' => \"0575058005\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Maskerade\",\n 'isbn' => \"0575058080\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Feet of Clay\",\n 'isbn' => \"0575059001\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Hogfather\",\n 'isbn' => \"057506403X\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Jingo\",\n 'isbn' => \"0575065400\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Last Continent\",\n 'isbn' => \"0385409893\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Carpe Jugulum\",\n 'isbn' => \"0385409923\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Fifth Elephant\",\n 'isbn' => \"0385409958\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Truth\",\n 'isbn' => \"0385601026\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Thief of Time\",\n 'isbn' => \"0060199563\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Last Hero\",\n 'isbn' => \"057506885X\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Amazing Murice and his Educated Rodents\",\n 'isbn' => \"0385601239\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Night Watch\",\n 'isbn' => \"0385602642\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Wee Free Men\",\n 'isbn' => \"0385605331\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Monstrous Regiment\",\n 'isbn' => \"0385603401\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"A Hat Full of Sky\",\n 'isbn' => \"0385607369\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Going Postal\",\n 'isbn' => \"0385603428\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Thud!\",\n 'isbn' => \"0385608675\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Wintersmith\",\n 'isbn' => \"0385609841\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Making Money\",\n 'isbn' => \"0385611013\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Unseen Academicals\",\n 'isbn' => \"0385609345\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"I Shall Wear Midnight\",\n 'isbn' => \"0385611072\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Snuff\",\n 'isbn' => \"9780385619264\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"Raising Steam\",\n 'isbn' => \"9780857522276\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n [\n 'author_id' => 6,\n 'title' => \"The Shepherd's Crown\",\n 'isbn' => \"9780857534811\",\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ],\n ]\n );\n }",
"public function queryBookByIsbn(string $isbn, array $overrideAttributes=array())\n\t\t{\n\t\t\t$endpointUrl = 'https://openlibrary.org/api/books';\n\t\t\t\n\t\t\t// Generate URL-encoded query string\n\t\t\t// See https://openlibrary.org/dev/docs/api/books\n\t\t\t$attributes = array(\n\t\t\t\t'format' => 'json',\n\t\t\t\t'jscmd' => 'data',\n\t\t\t\t'bibkeys' => 'ISBN:'.$isbn\n\t\t\t\t);\n\t\t\t\n\t\t\t// Merge with user defined attributes\n\t\t\t$attributes = array_merge($attributes, $overrideAttributes);\n\t\t\t\n\t\t\t$queryString = http_build_query($attributes);\n\t\t\t\n\t\t\t// Fetch data\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$data = $this->cache->loadURLFromWebOrCache('openlibrary', $endpointUrl.'?'.$queryString, null, $isbn.'.json', Thrush_Cache::LIFE_IMMORTAL);\n\t\t\t\t$data = json_decode($data, true);\n\t\t\t\t\n\t\t\t\tif(array_key_exists('ISBN:'.$isbn, $data))\n\t\t\t\t\treturn new Thrush_API_OpenLibrary_Book($data['ISBN:'.$isbn]);\n\t\t\t\t\n\t\t\t\treturn new Thrush_API_OpenLibrary_Book();\n\t\t\t}\n\t\t\tcatch(Thrush_Cache_NoDataToLoadException $e)\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}",
"public function test_book_2() {\n\t\t$client = new Client(array('http_errors' => false));\n\t\t$jar = new \\GuzzleHttp\\Cookie\\CookieJar;\n\n\t\t$data = array(\n\t\t\t'username' => 'francescop',\n\t\t\t'password' => '123456789',\n\t\t);\n\t\t$response = $client->request('POST', API_PATH . '/api/login', array('form_params' => $data, 'cookies' => $jar));\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\n\t\t$response = $client->request('POST', API_PATH . '/api/users/1/book', array('form_params' => array('lectureId' => 1), 'cookies' => $jar));\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$data = json_decode($response->getBody(true), true);\n\n\t\t$this->assertArrayHasKey('success', $data);\n\t\t$this->assertTrue($data['success']);\n\n\t\t$response = $client->request('POST', API_PATH . '/api/users/1/book', array('form_params' => array('lectureId' => 1), 'cookies' => $jar));\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$data = json_decode($response->getBody(true), true);\n\n\t\t$this->assertArrayHasKey('success', $data);\n\t\t$this->assertFalse($data['success']);\n\t}",
"public function add_book()\n\t{\n\t\t$data = array();\n\t\t$authors = $this->add_book_model->getAuthors();\n\t\t$genres = $this->add_book_model->getGenres();\n\t\t$types = $this->add_book_model->getTypes();\n\t\t$data['authorsList'] = $authors;\n\t\t$data['genresList'] = $genres;\n\t\t$data['typesList'] = $types;\n\t\t$this->load->view('add_book', $data);\n\t}",
"public function indexalpha_author()\n {\n\t$books = Book::where('id','>','0')->orderBy('name', 'asc')->get();\n\t$books=$books->sortBy(function ($book) {\n\t return ($author = $book->first_author()) ? $author->surname : null;\n\t });\n\n\t$booksalpha=array();\n\tforeach ($books as $book) {\n\t\t$author=$book->first_author();\n\t\t$firstletter=\"\";\n\t\tif ($author!=null) $firstletter=mb_substr(trim($author->surname),0,1);\n\t\t$firstletter.=\"...\";\n\t\tif (!isset($booksalpha[$firstletter])) $booksalpha[$firstletter]=array();\n\t\t$booksalpha[$firstletter][]=$book;\n\t}\n\treturn view('library.books.booksalpha')->with('booksalpha', $booksalpha);\n }",
"public function testGetAllBooks()\n {\n //Given we have books in the database\n $book = factory('App\\Book')->create();\n $bookTwo = factory('App\\Book')->create();\n // When the user visits the index page\n $response = $this->get('/api/books');\n //They should see the books Titles and authors\n $response\n ->assertStatus(200) \n ->assertSee($book->title)\n ->assertSee($book->author)\n ->assertSee($bookTwo->title)\n ->assertSee($bookTwo->author);\n \n }",
"public function booklist()\n {\n $book = Post::where('key', 'book')->get();\n return view('backends.booklist')->with('book', $book);\n }",
"public function editbook($id = null) {\n\t\t\n\t\t$array[0]= $id;\n\t\t$bookcategoryTable = TableRegistry::get('book_categories');\n\n\t\t$book_categories = $bookcategoryTable->find(\"all\")->select(['id', 'name', 'code'])->toArray();\n\n\n $this->set(\"book_categories\", $book_categories);\n\t\t\n\t \n\t\t$booksTable = TableRegistry::get('books');\n\t\t$books = $booksTable->find(\"all\")\n\t\t\t\t\t\t\t->where(['id'=>$id])\n\t\t\t\t\t\t\t->select(['id', \n\t\t\t\t\t\t\t\t\t 'name',\n\t\t\t\t\t\t\t\t\t 'category_id',\n\t\t\t\t\t\t\t\t\t 'description',\n\t\t\t\t\t\t\t\t\t 'author',\n\t\t\t\t\t\t\t\t\t 'price',\n\t\t\t\t\t\t\t\t\t 'publish_date',\n\t\t\t\t\t\t\t\t\t 'isbn_code',\n\t\t\t\t\t\t\t\t\t 'book_code',\n\t\t\t\t\t\t\t\t\t 'quantity',\n\t\t\t\t\t\t\t\t\t 'available_quantity',\n\t\t\t\t\t\t\t\t\t 'publication'])\n\t\t\t\t\t\t\t->first();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$this->set(\"books\", $books);\n\t\t\t\n\t\tif($this->request->is('post')){\n\t\t\t\n\t\t\t$booksedit = $booksTable->get($id); \n\t\t\t\n\t\t\t$booksedit->name = $this->request->data['name'];\n\t\t\t$booksedit->category_id = $this->request->data['category_id'];\n\t\t\t$booksedit->available_quantity = ($this->request->data['quantity'] - $books['quantity'] + $books['available_quantity']);\n\t\t\t$booksedit->quantity = $this->request->data['quantity'];\n\t\t\t$booksedit->author = $this->request->data['author'];\n\t\t\t$booksedit->price = $this->request->data['price'];\n\t\t\t// $booksedit->publish_date = date(\"Y-m-d\",strtotime($this->request->data['publish_date']));\n\t\t\t$booksedit->isbn_code = $this->request->data['isbn_code'];\n\t\t\t$booksedit->book_code = $this->request->data['book_code'];\n\t\t\t$booksedit->publication = $this->request->data['publication'];\n\t\t\t$booksedit->description = $this->request->data['description'];\n\t\t\t\t\n\t\t\t\tif($booksedit->available_quantity < 0) {\n\t\t\t\t $message= 'error';\n\t\t\t\t $status= 400;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telseif($booksTable->save($booksedit)) { \n\t\t\t\t\n\t\t\t\t\t$this->redirect(array(\"action\" => \"index\"));\n\t\t\t\t\t$message = 'Book Edited Succesfully';\n\t\t\t\t\t$status = 200;\n\t\t\t\t}\n\t\n\t\t}\n\t}",
"public static function create_book($new_book) {\n\t\t$book = [\n\t\t\t'name'\t\t\t=> $new_book->name,\n\t\t\t'image'\t\t\t=> str_slug($new_book->name,'-'),\n\t\t\t'slug'\t\t\t=> str_slug($new_book->name,'_'),\n\t\t\t'other_name'\t=> $new_book->other_name,\n\t\t\t'release_at'\t=> $new_book->release_at,\n\t\t\t'id_author'\t\t=> $new_book->id_author,\n\t\t\t'id_artist'\t\t=> $new_book->id_artist,\n\t\t\t'id_uploader'\t=> $new_book->id_uploader,\n\t\t\t'description'\t=> $new_book->description,\n\t\t\t'keyword'\t\t=> $new_book->keyword,\n\t\t\t'status'\t\t=> $new_book->status\n\t\t];\n\t\t$id_book = BooksCModel::insert_book($book);\n\n\t\t//create book category\n\t\t$categories = [];\n\t\tforeach ($new_book->categories as $key => $category) {\n\t\t\t$categories[$key] = [\n\t\t\t\t'id_book'\t\t=> $id_book,\n\t\t\t\t'id_category'\t=> $category\n\t\t\t];\n\t\t\tBooksCategoryCModel::insert_book_category($categories[$key]);\n\t\t}\n\n\t\t//create book character\n\t\t$characters = [];\n\t\tforeach ($new_book->characters as $key => $character) {\n\t\t\t$characters[$key] = [\n\t\t\t\t'id_book'\t\t=> $id_book,\n\t\t\t\t'id_character'\t=> $character\n\t\t\t];\n\t\t\tBooksCharacterCModel::insert_book_character($characters[$key]);\n\t\t}\n\t}",
"public function editBook()\n\t{\n\t\t$data = array();\n\t\t$ISBN = $this->input->post('bookISBN');\n\t\t$data['authorsList'] = $this->add_book_model->getAuthors();\n\t\t$data['genresList'] = $this->add_book_model->getGenres();\n\t\t$data['typesList'] = $this->add_book_model->getTypes();\n\t\t$data['bookAuthor'] = $this->edit_book_model->getBookAuthors($ISBN);\n\t\t$data['bookGenres'] = $this->edit_book_model->getBookGenres($ISBN);\n\t\t$data['bookTypes'] = $this->edit_book_model->getBookTypes($ISBN);\n\t\t$data['bookEn'] = $this->edit_book_model->getBookEn($ISBN);\n\t\t$sql = \"select * from books where isbn = '$ISBN'\";\n\t $data['book'] = $this->db->query($sql)->result()[0];\n\t\t$this->load->view('edit_book', $data);\n\t}",
"public function addbook()\n {\n $genres = Genre::get();\n return view('books.addbook', [\n 'genres' => $genres,\n ]);\n }",
"public function addBook($author, $title, $pages, $code)\r\n {\r\n $newFragment = $this->dom->createDocumentFragment();\r\n $newFragment->appendXML(\"<book><author>$author</author><title>$title</title><pages>$pages</pages><code>$code</code></book>\");\r\n\r\n $books = $this->dom->getElementsByTagName('books');\r\n $books[0]->appendChild($newFragment);\r\n }"
] | [
"0.6012918",
"0.5858289",
"0.5700511",
"0.5555178",
"0.55465615",
"0.5521223",
"0.5447774",
"0.54476434",
"0.53988624",
"0.5355919",
"0.5329269",
"0.5308581",
"0.5279037",
"0.5214918",
"0.5195621",
"0.5185803",
"0.51627153",
"0.5153283",
"0.5142592",
"0.5140316",
"0.5138095",
"0.5119947",
"0.5072289",
"0.50631404",
"0.50489044",
"0.50440145",
"0.5035691",
"0.50130934",
"0.4993308",
"0.49828276",
"0.49781913",
"0.49736384",
"0.4970644",
"0.49578208",
"0.49527308",
"0.49518692",
"0.49496233",
"0.4942942",
"0.49427423",
"0.4940892",
"0.4938462",
"0.49294454",
"0.49259162",
"0.4916846",
"0.49159378",
"0.49097005",
"0.49065518",
"0.4903011",
"0.49012518",
"0.49004808",
"0.489607",
"0.48849156",
"0.4882154",
"0.48624414",
"0.48623118",
"0.48594564",
"0.48593518",
"0.48503757",
"0.4840739",
"0.4828361",
"0.48262262",
"0.48251045",
"0.4824213",
"0.48212394",
"0.48127103",
"0.48120153",
"0.48101896",
"0.47983354",
"0.47944626",
"0.47759506",
"0.4774605",
"0.47736618",
"0.47718462",
"0.47717676",
"0.47685865",
"0.47632378",
"0.47517556",
"0.47508675",
"0.4747537",
"0.47465158",
"0.4746378",
"0.47449186",
"0.47437996",
"0.47421628",
"0.4741472",
"0.47410965",
"0.47409746",
"0.47391704",
"0.4735003",
"0.47334614",
"0.47260502",
"0.47249085",
"0.47175953",
"0.47159874",
"0.4715524",
"0.47130197",
"0.47094992",
"0.47073457",
"0.4694441",
"0.46851245",
"0.46833578"
] | 0.0 | -1 |
alternate randomly between 2 books | public function __construct()
{
mt_srand((int)microtime() * 10000000);
$randNum = mt_rand(0, 1);
if (1 < $randNum) {
$this->author = 'Christian Wenz';
$this->title = 'PHP Phrasebook';
}
$this->author = 'George Schlossnagle';
$this->title = 'Advanced PHP Programming';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function orderRandom();",
"private function getRecommendedBooks($book, $book_id)\n {\n $genre_id = $book->getGenre()->getId();\n $author_id = $book->getAuthor()->getId(); \n $entityManager = $this->getDoctrine()->getManager();\n $conn = $entityManager->getConnection();\n $sql = 'SELECT id FROM book \n WHERE id != :id AND genre_id = :genre_id\n ORDER BY RAND() LIMIT ' . $this->recommended_books_count;\n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'genre_id' => $genre_id, \n ]); \n $ids_genre = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_genre_count = count($ids_genre);\n \n if ($ids_genre_count < $this->recommended_books_count) {\n //get other books of this author\n $ids_genre_str = implode(',', $ids_genre); \n if ($ids_genre_count > 0) {\n $not_in_genre = ' AND id NOT IN ('.$ids_genre_str.') ';\n } else {\n $not_in_genre = '';\n }\n $limit = $this->recommended_books_count - $ids_genre_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre.' \n AND author_id = :author_id\n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute([\n 'id' => $book_id, \n 'author_id' => $author_id, \n ]); \n $ids_author = $stmt->fetchAll(\\PDO::FETCH_COLUMN); \n $ids_author_count = count($ids_author); \n $ids_genre_author_count = $ids_genre_count + $ids_author_count;\n \n if ($ids_genre_author_count < $this->recommended_books_count) {\n //get other books\n $ids_genre_author = array_merge($ids_genre, $ids_author);\n $ids_genre_author_str = implode(',', $ids_genre_author);\n if ($ids_genre_author_count > 0) {\n $not_in_genre_author = ' AND id NOT IN ('.$ids_genre_author_str.') ';\n } else {\n $not_in_genre_author = '';\n } \n $limit = $this->recommended_books_count - $ids_genre_author_count;\n $sql = 'SELECT id FROM book\n WHERE id !=:id '.$not_in_genre_author.' \n ORDER BY RAND() LIMIT ' . $limit; \n $stmt = $conn->prepare($sql);\n $stmt->execute(['id' => $book_id]); \n $ids_others = $stmt->fetchAll(\\PDO::FETCH_COLUMN);\n }\n } \n \n //get books\n $rep = $this->getDoctrine()->getRepository(Book::class);\n $books_genre = !empty($ids_genre) ? $rep->findById($ids_genre) : [];\n $books_author = !empty($ids_author) ? $rep->findById($ids_author) : [];\n $books_others = !empty($ids_others) ? $rep->findById($ids_others) : [];\n \n return [\n 'books_genre' => $books_genre,\n 'books_author' => $books_author,\n 'books_others' => $books_others,\n ];\n }",
"public function shuffle();",
"public function run()\n {\n $authors = App\\Author::all();\n $subcategories = App\\Category::all();\n\n\n $tags = App\\Tag::all();\n factory(App\\Book::class, 100)\n ->create()\n ->each(function($b) use ($tags, $subcategories, $authors) {\n if(rand(0,1)===0){\n $b->authors()->sync($authors[rand(0,count($authors)-1)]);\n }\n else{\n $b->authors()->sync($authors[rand(0,count($authors)-1)]);\n $b->authors()->sync($authors[rand(0,count($authors)-1)]);\n }\n\n\n if(rand(0,1)===0){\n $b->categories()->sync($subcategories[rand(0,count($subcategories)-1)]);\n }\n else{\n $b->categories()->sync($subcategories[rand(0,count($subcategories)-1)]);\n $b->categories()->sync($subcategories[rand(0,count($subcategories)-1)]);\n }\n\n if(rand(0,1)===0){\n $b->tags()->sync($tags[rand(0,count($tags)-1)]);\n }\n else{\n $b->tags()->sync($tags[rand(0,count($tags)-1)]);\n $b->tags()->sync($tags[rand(0,count($tags)-1)]);\n }\n\n\n\n\n\n });\n \n }",
"public function run()\n {\n for($i = 1; $i <= 10; $i++ ){\n $num = 0;\n $temp = $num;\n for($y = 1; $y <= 3; $y++ ){\n $num = rand(1,10);\n if($num != $temp){\n $book = Book::find($num);\n Wish::create([\n 'user_id' => $i,\n 'book_id' => $num,\n 'book_name' => $book->name\n ]);\n $temp = $num;\n }else {\n $num = rand(1,10);\n $y--;\n }\n }\n \n }\n }",
"public function run() {\n $faker = Faker\\Factory::create();\n\n $books = App\\Models\\Book::all();\n\n $authors = factory(App\\Models\\Author::class)->times($faker->numberBetween(1,15))->create();\n\n foreach($books as $book) {\n $book->authors()->attach($faker->randomElements($authors->lists('id')->toArray(),$faker->numberBetween(1,$authors->count())));\n }\n }",
"public function random();",
"function set_random_pair() {\n echo 'sizeof($this->words): ' . sizeof($this->words);\n $this->pre_dump($this->words, \"words\");\n // pick a random number to use for extracting the array element from the array of words\n $random_offset = rand(0, sizeof($this->words) - 1);\n $this->pre_dump($random_offset, \"random_offset\");\n //\n // use the random number to extract the pair\n $this->random_pair = array_slice($this->words, $random_offset, 1);\n $this->pre_dump($this->get_random_pair(), \"random_pair\");\n // remove the randommly picked pair of words out of the array\n// $this->pre_dump($words, \"words\");\n //unset($this->words[key($this->get_random_pair())]);\n// $this->pre_dump($words, \"words\");\n }",
"public function randomItem();",
"public function findRandom();",
"function rand_option($min,$max,$amount){\r\n\r\n $num = range($min,$max);\r\n shuffle($num);\r\n return array_slice($num,0,$amount);\r\n\r\n}",
"public function run()\n {\n $books = Book::all()->all();\n $count = sizeof($books)+1;\n shuffle($books);\n factory(App\\Picture::class,$count)->create()->each(function ($picture, $books) {\n $key = is_array($books) ? array_rand($books, 1):null;\n $book = is_array($books) ? $books[$key]:$books;\n $picture->book()->associate($book);\n $picture->save();\n unset($books[$key]);\n });\n\n }",
"function generateByTrendingNow()\n{\n\t$recipe = array();\n\t$cookbook = array();\n\t$recipeSelector = new Recipe;\n\t$cookbookSelector = new Cookbook;\n\t$candidates = array();\n\t\n\t$candidates = $cookbookSelector->frequentRecipeIDs();\n\t\n\t$cookbook = selectRandomCandidate($candidates);\n\t\n\t$recipe = $recipeSelector->selectByRecipeID($cookbook[0]);\n\t\n\treturn $recipe;\n}",
"function barajar($bolsa){\n $barajado = [];\n $count = count($bolsa);\n for($i = 0; $i < $count; $i ++){\n $rand = array_rand($bolsa);\n array_push($barajado, $bolsa[$rand]);\n array_splice($bolsa, $rand,1);\n }\n return $barajado;\n}",
"function rand_blade(){\n\t\t$list = array ('blade', 'broadsword', 'claymore', 'dao', 'gladius', 'katana', 'longsword', 'odachi', 'rapier', 'sabre', 'shortsword', 'sword', 'wakazashi');\n\t\t$i = count($list);\n\t\treturn $list[mt_rand(0,$i-1)];\n\t}",
"function crossover($induk1,$induk2){\n\t\t$pc=0.99;\n\t\t$anak1=$induk1;\n\t\t$anak2=$induk2;\n\t\t$jumlah_gen = count($anak1);\n\t\tfor ($i=0; $i < $jumlah_gen; $i++) { \n\t\t\t$random = rand(0,10)/10;\n\t\t\tif ($random<=$pc) {\n\t\t\t\t$tmp = $anak1[$i];\n\t\t\t\t$anak1[$i] = $anak2[$i];\n\t\t\t\t$anak2[$i] = $tmp;\n\t\t\t}\n\t\t}\n\n\t\t$hasil[0] = $anak1;\n\t\t$hasil[1] = $anak2;\n\n\t\treturn $hasil;\n\t}",
"function sample($generator, $times, $seed = 10) {\n mt_srand($seed);\n return Eris\\Sample::of($generator, 'mt_rand')->repeat($times)->collected();\n}",
"public function shuffle()\n {\n\n }",
"function generateByNew()\n{\n\t$recipe = array();\n\t$recipeSelector = new Recipe;\n\t$newOdds = array(10, 11, 12, 13, 14, 15, 16, 17, 18, 19); /* odds of randomly selecting newest recipes IDs (oldest to newest)*/ \n\t$newOddsTotal = 145;\n\t$sum = 0;\n\t$chosenID = 0;\n\t\n\t$newestID = $recipeSelector->selectNextID() - 1;\n\t\n\t$eleventhNewest = $newestID - 10;\n\t\n\t//choose random number within odds range \n\t$randomNum = rand(1, 145);\n\t\n\t$upperBound = count($newOdds);\n\t\n\tfor ($i = 0; $i < $upperBound; $i++)\n\t{\n\t\t$sum = $sum + $newOdds[$i];\n\t\t\n\t\tif ($randomNum <= $sum)\n\t\t{\n\t\t\t$chosenID = $eleventhNewest + $i;\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n\t\t\n\t$recipe = $recipeSelector->selectByRecipeID($chosenID);\n\t\n\tif (count($recipe) == 0)\n\t{\n\t\t$recipe = null;\n\t}\n\t\n\treturn $recipe;\n}",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for($i=0;$i<500;$i++){\n $book = new Book();\n $book->title=$faker->sentence($nbWords = $faker->numberBetween($min = 1, $max = 6), $variableNbWords = true) ;\n $book->isbn=$faker->isbn13;\n $book->publ_date=$faker->date($format = 'Y-m-d', $max = 'now');\n $book->publ_house=$faker->word;\n $book->description=$faker->realText($faker->numberBetween(300,500));\n $book->save();\n $book->authors()->attach($faker->numberBetween($min = 1, $max = 50));\n $book->categories()->attach($faker->numberBetween($min = 1, $max = 11));\n // $book->store()->attach($faker->numberBetween($min = 1, $max = 50));\n }\n }",
"public function run()\n {\n $faker = Faker\\Factory::create();\n $faker->addProvider(new \\Faker\\Provider\\Base($faker));\n\n for($i = 0; $i < 50; $i++){\n $book_category = App\\BookCategory::create([\n 'book_id' => $faker->numberBetween($min = 1, $max = 25),\n 'category_id' => $faker->numberBetween($min = 1, $max = 25)\n ]);\n }\n }",
"function roll($sides) {\n return mt_rand(1,$sides);\n}",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n for($i = 1; $i <= 300; $i++){\n \t$publisher = Publisher::find(rand(1,100));\n \t$publisher->books()->create([\n \t\t'name' => $faker->name,\n \t\t'price' => $faker->randomFloat(2, 100, 1000),\n \t\t'isbn' => $faker->isbn13,\n 'is_active' => rand(0,1),\n \t\t'image' => 'images/books/default.jpg',\n \t]);\n echo(' .');\n }\n echo \"Books Seeded Successfully.\\n\";\n }",
"function p3_ex2() {\n $rand = mt_rand(1, 100); // mt_rand is very better\n for ($i = 0; $i <= 20; $i++) {\n if ($i % 5 == 0 && $i != 0)\n $return .= 'resultat : '.($i * $rand).'<br />';\n else\n $return .= 'resultat : '.($i * $rand).', ';\n }\n\n return $return;\n}",
"public function run()\n {\n \n $faker = \\Faker\\Factory::create();\n $genero = ['horror', 'drama', 'ficcion', 'investigacion','aventura'];\n \n for ($i = 0; $i < 5; $i++) {\n Book::create([\n 'title' => $faker->name,\n 'sinopsis' => $faker->email,\n 'genre' => $genero[$i],\n 'author' => $faker->name,\n \n ]);\n }\n\n\n }",
"function generateByUnderClock()\n{\n\t$recipe = array();\n\t$recipeSelector = new Recipe;\n\t\n\t$candidates = $recipeSelector->selectByTimeLimit(20);\n\t\n\tif (count($candidates) != 0)\n\t{\n\t\t$recipe = selectRandomCandidate($candidates);\n\t}\n\t\n\telse \n\t{\n\t\t$recipe = null;\n\t}\n\t\n\treturn $recipe;\n}",
"private function shuffle()\n {\n if ($this->first) {\n $this->first = array_slice($this->words, 0, 8);\n $this->words = array_slice($this->words, 8);\n\n shuffle($this->words);\n\n $this->words = $this->first + $this->words;\n\n $this->first = false;\n } else {\n shuffle($this->words);\n }\n }",
"public function run()\n {\n foreach (Basket::with('recipes')->additional()->get() as $basket) {\n if (count($basket->recipes)) {\n for ($i = 0; $i < rand(1, 2); $i++) {\n $basket->recipes()->create([\n 'recipe_id' => $basket->recipes->random()->id,\n ]);\n }\n }\n }\n }",
"public function _random() {\n\t\tif( $this->type == 'image' ) {\n\t\t\t$files = PSUFiles::getImageArray($this->base_dir.$this->dir, 0, $this->depth);\n\t\t} else {\n\t\t\t$files = PSUFiles::getImageArray($this->base_dir.$this->dir, 0, $this->depth, array('txt', 'html'));\n\t\t}//end if\n\n\t\t$this->set( PSUFiles::chooseRandomElement($files) );\n\t}",
"public function thingsShuffle()\n {\n\n $this->thing->db->setUser($this->from);\n $thingreport = $this->thing->db->userSearch(''); // Designed to accept null as $this->uuid.\n\n $things = $thingreport['thing'];\n\n $this->total_things = count($things);\n\n //$start_time = time();\n\n //shuffle($things);\n $things = array_reverse($things);\n return $things;\n }",
"public function it_can_be_shuffled()\n {\n $this->shuffle();\n }",
"public function addBook($what = NULL, $how = 'type', $num = 1)\n {\n $whereSQL = \" WHERE \" . $how . \" = '\" . $what . \"'\";\n if ($num == 1) {\n $sql = 'SELECT * FROM wd_books' . $whereSQL . ' LIMIT 1;';\n } else {\n $sql = 'SELECT * FROM wd_books' . $whereSQL . ' ORDER BY RAND() LIMIT ' . $num . ';';\n }\n $query = $this->CI->db->query($sql);\n $out = '';\n if ($query->num_rows() < 1) {\n return $out;\n }\n foreach ($query->result() as $row)\n {\n $title = $row->title;\n $author = $row->author;\n $id = $row->id;\n $banner = $row->banner;\n $out .= '<div class=\"row well rounded-2x shadow-effect-1\"><div class=\"col-lg-12 col-md-12\">' . \"\\n\";\n $out .= '<div class=\"pull-left margin-right-5\">' . \"\\n\";\n $out .= '<a href=\"http://www.fishpond.com.au/product_info.php?ref=2802&id=';\n $out .= $id;\n $out .= '&affiliate_banner_id=1\" target=\"_blank\"><img class=\"pull-left margin-right-5 box-shadow shadow-effect-1 img-thumbnail rounded-2x\" src=\"http://www.fishpond.com.au/affiliate_show_banner.php?ref=2802&affiliate_pbanner_id=';\n $out .= $banner;\n $out .= '\" alt=\"';\n $out .= $title;\n $out .= '\" title=\"';\n $out .= $title;\n $out .= '\" /></a>' . \"\\n\";\n $out .= '</div>' . \"\\n\";\n $out .= '<p><strong>';\n $out .= $title;\n $out .= '</strong></p>' . \"\\n\";\n $out .= '<p>by ' . $author . '</p>' . \"\\n\";\n $out .= '<p>Buy the book <a href=\"http://www.fishpond.com.au/product_info.php?ref=2802&id=';\n $out .= $id;\n $out .= '&affiliate_banner_id=1\" target=\"_blank\">';\n $out .= $title;\n $out .= '</a> on Fishpond.</p>' . \"\\n\";\n $out .= '</div>' . \"\\n</div>\\n\";\n }\n return $out;\n }",
"public function run(Faker $faker)\n {\n // Author:\n $authorNameList = [\n 'Gino',\n 'Pino',\n 'Gianni',\n 'Pietro',\n 'Gianpaolo',\n 'Vercingitore'\n ];\n $arrayIdAuthor = [];\n \n foreach ($authorNameList as $author) {\n // Creazione dell'oggetto:\n $authorObject = new author();\n // $randNameKey = array_rand($authorNameList, 1);\n // $randName = $authorNameList[$randNameKey];\n $authorObject->name = $author;\n // $randSurnameKey = array_rand($authorSurnameList, 1);\n // $randSurname = $authorSurnameList[$randSurnameKey];\n $authorObject->surname = $faker->word();\n $authorObject->email = $faker->email();\n $authorObject->birth_year = $faker->year();\n\n $authorObject->save();\n $arrayIdAuthor[] = $authorObject->id; \n \n }\n // Per la tabella many to many:\n $tagsList = [\n 'Sport',\n 'Cinema',\n 'Giochi',\n 'News',\n 'Esteri',\n 'Politica',\n 'Vip',\n 'Social'\n ];\n\n $tagsIdList = []; // 1, 2, 3, 4, 5, 6, 7, 8\n foreach($tagsList as $tag) {\n // Oggetto tag\n $tagObject = new tag();\n $tagObject->name = $tag; \n $tagObject->save();\n $tagsIdList[] = $authorObject->id;\n }\n\n\n\n for($i = 0; $i < 15; $i++) {\n // Creazione dell'oggetto:\n // Oggetto article:\n $articleObject = new article();\n $articleObject->title = $faker->words(5, true);\n\n $randIdKey = array_rand($arrayIdAuthor, 1);\n $randId = $arrayIdAuthor[$randIdKey];\n $articleObject->author_id = $randId; \n \n $articleObject->descrizione = $faker->paragraph(2);\n $articleObject->testo = $faker->text(600);\n $articleObject->cover = $faker->imageUrl(1000, 400, 'article', true);\n \n $articleObject->created_at = null;\n $articleObject->updated_at = null;\n\n // Qui ora va l'id del many to many: \n $tagKey = array_rand($tagsIdList, 1);\n $tagIdRand = $tagsIdList[$tagKey];\n $articleObject->save();\n\n $articleObject->tag()->attach($tagIdRand);\n }\n\n \n\n\n }",
"function rng($min, $max, $times)\n{\n $numbers = range($min, $max);\n // Shuffles the generated numbers to make them randomized\n shuffle($numbers);\n // Remove elements from the array to make it as long as $times\n $result[] = array_slice($numbers, 0, $times);\n // Show the random numbers generated\n var_dump($result);\n}",
"function w_rand($weights)\n {\n $r = mt_rand(1,1000);\n $offset = 0;\n foreach ($weights as $k => $w)\n {\n $offset += $w*10;\n if ($r <= $offset)\n return $k;\n }\n }",
"function compete($a,$b){\n $p = intval(100 * getWinProb($a['elo']-$b['elo']));\n $expected = ($a['elo']>=$b['elo']) ? $a['name'] : $b['name'];\n $percent = ($a['elo']>=$b['elo']) ? $p.'%' : (100-$p).'%';\n $n = mt_rand(1,100);\n $winner = ($n<=$p) ? $a['name'] : $b['name'];\n \n //echo sprintf(\"Now Playing: %s (%s) vs. %s (%s) \\n\", $a['name'], $a['elo'], $b['name'], $b['elo']);\n //echo sprintf(\"Expected winner: %s (%s)\\n\", $expected, $percent);\n //echo sprintf(\"Actual winner: %s\\n\\n\", $winner);\n return ($n<=$p) ? $a : $b;\n}",
"function randomSleep($first, $second) {\r\n\t\t$rand = rand($first, $second);\r\n\t\tsleep($rand);\r\n\r\n\t\treturn $rand;\r\n\t}",
"public function random()\r\n\t{\r\n\t\treturn $this->_items[array_rand($this->_items)];\r\n\t}",
"function pick_random($array){\n return $array[array_rand($array)];\n}",
"function createRand()\n{\n\t$up = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t$down = \"abcdefghijklmnopqrstuvwxyz\";\n\t$num = \"1234567890\";\n\t$upRand = str_shuffle($up) . str_shuffle($up);\n\t$downRand = str_shuffle($down) . str_shuffle($down);\n\t$numRand = str_shuffle($num) . str_shuffle($num);\n\t$randStr1 = str_shuffle($upRand.$downRand.$numRand);\n\t$randStr2 = str_shuffle($upRand.$downRand.$numRand);\n\t$randStrFull = str_shuffle($randStr1.$randStr2);\n\t$randStrFinal = str_shuffle(substr($randStrFull,0,8));\n\treturn $randStrFinal;\n}",
"public function shuffle()\n {\n // FAIT (voir les fonctions sur les tableaux)\n shuffle($this->cards); //mélanger les élément\n }",
"final public static function uniqueRandom(){\n $start=0;\n $end=3;\n $cn=2;\n for($i=$start;$i<=$end;++$i){\n $arr[$i]=$i;\n }\n $c=$cn;\n for($i=0;$i<$cn;++$i){\n $rval= rand($start, $end);\n $rval=$rval%$end+1;\n $arr1[$i]=$arr[$rval];\n $arr[$rval]=$arr[$c];\n $c--;\n }\n return $arr1;\n }",
"function randomx($mode = 0, $leng = '3~5', $rndkey = -1)\n{\n // $seeds = $mode == 0 ? range('a', 'z') : range(0, 9);\n $range_a = range('a', 'z');\n $range_b = range('A', 'Z');\n $range_c = range(0, 9);\n switch ($mode) {\n case 0:\n $seeds = $range_a;\n break;\n case 1:\n $seeds = $range_c;\n break;\n case 2:\n $seeds = array_merge($range_a, $range_c);\n break;\n case 3:\n $seeds = array_merge($range_a, $range_b);\n break;\n case 4:\n $seeds = $range_b;\n break;\n case 5:\n $seeds = array_merge($range_a, $range_b, $range_c);\n break;\n }\n // if ($rndkey != -1) {\n // mt_srand($rndkey);\n // }\n $parselen = explode('~', $leng);\n if (count($parselen) == 1) {\n $leng = (int) $leng;\n } else {\n $leng = mt_rand((int) $parselen[0], (int) $parselen[1]);\n }\n $x = '';\n // if ($mode != 1) {\n // // ext char out of $charlist\n // global $charlist;\n // foreach ($seeds as $s_k => $s_v) {\n // if (strpos($charlist, $s_v) !== false) {\n // unset($seeds[$s_k]);\n // }\n // }\n // $seeds = array_values($seeds);\n // }\n shuffle($seeds);\n // $seedlen = count($seeds) - 1;\n // for ($k = $seedlen; $k > 0; $k--){\n // $j = mt_rand(0, $k);\n // $tmpseed = $seeds[$k];\n // $seeds[$k] = $seeds[$j];\n // $seeds[$j] = $tmpseed;\n // }\n // print_r($seeds);die;\n // for ($i=0; $i < $leng; $i++) {\n // // if ($rndkey != -1) {\n // // mt_srand($rndkey+$i);\n // // }\n // // $x .= $seeds[mt_rand(0, $seedlen)];\n // if (!isset($seeds[$i])) {\n // break;\n // }\n // $x .= $seeds[$i];\n // }\n $x = substr(implode('', $seeds), 0, $leng);\n // mt_srand();\n // if (in_array($mode, array(2, 5))) {\n // $x = substr($x, 0, strlen($x) - 1) . $range_a[array_rand($range_a)];\n // }\n return $x;\n}",
"function genrateRandomWords ($length, $words, $sep, $word_case) {\n\n $randomString = '';\n for ($i=0;$i < $length; $i++){\n //$randomString .= 'A';\n $randItem = array_rand($words);\n $word = $words[$randItem];\n\n switch ($word_case) {\n case \"upperCase\":\n $word = strtoupper($word);\n break;\n case \"lowerCase\":\n $word = strtolower($word);\n break;\n case \"camelCase\":\n $word = ucwords($word);\n break;\n default:\n $word = $word;\n }\n\n if ( $i == ($length -1) ) {\n $randomString .= $word;\n } else {\n $randomString .= $word.$sep;\n }\n }\n return $randomString;\n}",
"public function run()\n {\n Model::unguard();\n $categoryId = DB::table('categories')->pluck('id')->toArray();\n $donatorId = DB::table('donators')->pluck('id')->toArray();\n $faker = Faker::create();\n for ($i = 0; $i <= 15; $i++) {\n factory(App\\Model\\Book::class, 1)->create([\n 'category_id' => $faker->randomElement($categoryId),\n 'donator_id' => $faker->randomElement($donatorId)\n ]);\n }\n Model::reguard();\n }",
"public function run()\n {\n for($i = 1; $i <= 10; $i++){\n Publisher::factory()->hasBooks(mt_rand(1,15))->create();\n }\n\n\n // $publisher = new Publisher();\n // $publisher->name = \"O Reilly Media\";\n // $publisher->address = \"Sebastopol, CA, USA\";\n // $publisher->save();\n //\n // $publisher = new Publisher();\n // $publisher->name = \"Wrox Press\";\n // $publisher->address = \"Birmingham, UK\";\n // $publisher->save();\n //\n // $publisher = new Publisher();\n // $publisher->name = \"New Riders\";\n // $publisher->address = \"Berkeley, CA, USA\";\n // $publisher->save();\n //\n // $publisher = new Publisher();\n // $publisher->name = \"John Wiley\";\n // $publisher->address = \"Chichester, UK\";\n // $publisher->save();\n }",
"function rewards(){\r\n $rand = rand(1, 5);\r\n return \"rewards\" . $rand;\r\n}",
"public function run()\n {\n $faker = Faker::create();\n DB::table('books')->truncate();\n $count = 1;\n $images = [\n 'https://www.thebookdesigner.com/wp-content/uploads/2018/09/last-good-300.png',\n ];\n\n \tforeach(range(1,30) as $index) {\n\t DB::table('books')->insert([\n 'user_id' => $faker->numberBetween(1,10),\n 'category_id' => $faker->numberBetween(1,5),\n 'city_id' => $faker->numberBetween(1,79),\n 'author' => $faker->name,\n 'name' => 'Book '.$index,\n 'description' => $faker->text(150),\n 'condition' => $this->conditions[$faker->numberBetween(0,4)],\n 'year' => $faker->year(),\n 'exchange_preferences' => $faker->text(150),\n 'exchange_status' => $faker->numberBetween(0,2),\n 'view' => $faker->numberBetween(0,1500),\n\t 'created_at' => Carbon::now(),\n\t 'updated_at' => Carbon::now(),\n ]);\n\n // DB::table('images')->insert([\n // 'user_id' => $count,\n\t // 'created_at' => Carbon::now(),\n\t // 'updated_at' => Carbon::now(),\n // ])\n\n // $i++;\n }\n }",
"public static function get_books_random_sidebar($number) {\n\t\t$result = BooksQModel::get_books_random($number);\n\t\tforeach ($result as $key => $book) {\n\t\t\tif (strlen($book->name) >= 22)\n\t\t\t\t$book->name = substr($book->name, 0, 20).'...';\n\t\t\t$book->description = substr($book->description, 0, 45).'...';\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function run()\n\t\t{\n\t\t\tUser::factory(10)->create();\n\t\t\tGenre::factory(20)->create();\n\t\t\tBook::factory(15)->create();\n\t\t\t$genres = Genre::all();\n\t\t\tBook::all()->each(function ($book) use ($genres) {\n\t\t\t\t$book->genres()->attach(\n\t\t\t\t\t$genres->random(rand(1, 3))->pluck(\"id\")->toArray()\n\t\t\t\t);\n\t\t\t});\n\t\t}",
"public function run()\n {\n $faker = Faker::create('id_ID');\n\n for ($i=1; $i <= Book::count(); $i++) {\n PrintedBookStock::create(\n array(\n 'amount' => $faker->numberBetween(1, 100),\n 'book_id' => $i,\n )\n );\n }\n }",
"public function random()\n {\n return $this->items[array_rand($this->items)];\n }",
"function _nbabanner_get_banners($randomise = false)\n{\n $banners = nbacontent_get_vocabulary('nbabanner', true);\n \n $filteredBanners = array_filter($banners, function($ele) {\n return $ele->nbabanner_link_live['und'][0]['value'] == 1;\n });\n \n if ($randomise === true) {\n shuffle($filteredBanners);\n }\n \n return $filteredBanners;\n}",
"function rand_color(){\n\t\t$list = array ('azure', 'amber','black', 'blue', 'cobalt', 'copper', 'bronze', 'tan', 'crimson', 'dark', 'brown', 'desert', 'emerald', 'foliage', 'gold', 'green', 'indigo', 'ivory', 'navy', 'olive', 'onyx', 'orange', 'pink', 'platinum', 'red', 'rose', 'ruby', 'sapphire', 'slate', 'silver', 'smoke', 'turquoise', 'violet', 'yellow');\n\t\t$i = count($list);\n\t\treturn $list[mt_rand(0,$i-1)];\n\t}",
"function generateByTopHit()\n{\n\t$recipe = array();\n\t$review = array();\n\t$reviewSelector = new Review;\n\t$recipeSelector = new Recipe;\n\t$candidates = array();\n\t$randomNum = 0;\n\t\n\t$candidates = $reviewSelector->selectAverageRatings();\n\t\n\t$candidates = randomRatingCategory($candidates);\n\t\n\tif (count($candidates) != 0)\n\t{\n\t\t$review = selectRandomCandidate($candidates);\n\t\t\n\t\t$recipe = $recipeSelector->selectByRecipeID($review);\n\t\t\n\t\tif (count($recipe) == 0)\n\t\t{\n\t\t\t$recipe = null;\n\t\t}\n\t}\n\t\n\telse \n\t{\n\t\t$recipe = null;\n\t}\n\t\n\treturn $recipe;\n}",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n $authors = \\App\\Models\\Author::all()->count();\n $bookData = array();\n for ($i = 1; $i <= 10000 ;$i++)\n {\n $bookData[] = array(\n 'name' => $faker->name,\n 'author_id' => $faker->numberBetween(1, $authors),\n );\n }\n Book::insert($bookData);\n }",
"public function run()\n {\n $faker = Faker::create();\n $prods = Produto::all();\n $cates = Categoria::all()->pluck('id')->toArray();\n\n\n\n foreach($prods as $p){\n $elements = rand(2, 6);\n for($i=0; $i<$elements; $i++ ){\n do{\n $cate_id = $faker->randomElement($cates);\n }\n while(\n ProdutoCategoria::where('categoria_id',$p->id)\n ->where('produto_id',$cate_id)->exists()\n );\n ProdutoCategoria::create([\n 'produto_id' => $p->id,\n 'categoria_id'=> $cate_id,\n\n ]);\n\n }\n }\n }",
"function random2($min = null, $max = null) {\n static $seeded;\n\n if (!isset($seeded)) {\n mt_srand((double)microtime()*1000000);\n $seeded = true;\n }\n\n if (isset($min) && isset($max)) {\n if ($min >= $max) {\n return $min;\n } else {\n return mt_rand($min, $max);\n }\n } else {\n return mt_rand();\n }\n }",
"public function sample()\n {\n $this->authorize('indexPublic', Product::class);\n\n $organizationIds = FundProvider::query()->whereIn(\n 'fund_id', Implementation::activeFunds()->pluck('id')\n )->where('state', 'approved')->pluck('organization_id');\n\n $products = Product::query()->select([\n 'id', 'organization_id'\n ])->whereIn(\n 'organization_id', $organizationIds\n )->where('sold_out', false)->where(\n 'expire_at', '>', date('Y-m-d')\n )->has('medias')->get();\n\n $groupedProducts = $products->groupBy('organization_id');\n\n $resultProducts = collect($groupedProducts->random(\n min(6, $groupedProducts->count())\n )->map(function($products) {\n return collect($products)->random();\n }));\n\n if ($resultProducts->count() < 6) {\n $remainingProducts = $groupedProducts->flatten()->diff($resultProducts);\n $resultProducts = $resultProducts->merge(\n $remainingProducts->random(min(6 - $resultProducts->count(), $remainingProducts->count()))\n );\n }\n\n return ProductResource::collection(Product::query()->whereIn(\n 'id', $resultProducts->pluck('id')\n )->get()->load(ProductResource::$load));\n }",
"protected function randomIndex() {\n return mt_rand(1, 10);\n }",
"public function getProduct(){\r\n return rand(0,1);\r\n }",
"abstract public function shuffle(string $location);",
"function get_recommendations($prefs, $p1){\r\n\t//if he is very similar, then get the books from those that he has not read\r\n\r\n\t//saving the array in a different array\r\n\t$prefsOriginal = $prefs;\r\n\r\n\t//unsetting the person from the array - for whom we are getting the recommendation\r\n\tunset($prefs[$p1]);\r\n\r\n\t//array to save the person and the distance\r\n\t$personDistance = array();\r\n\r\n\t//calculating the similarity of this person with other users\r\n\tforeach($prefs as $k => $v){\r\n\t\t$dist = sim_distance($prefsOriginal, $p1, $k);\r\n\t\t$personDistance[$k] = $dist;\r\n\t}\r\n\r\n\t//sorting the array based on the distance - nearest first\r\n\tarsort($personDistance);\r\n\r\n\t//printing the top recommenders\r\n\t//print_r($personDistance);\r\n\r\n\t//getting the books from the distance people - taking top 3\r\n\t$i = 0;\r\n\t$recommendedBooks = array();\r\n\t$topBooks = array();\r\n\tforeach($personDistance as $k => $v){\r\n\t\t//get the top books for this person\r\n\t\t$topBooks = top_matches($prefs, $k, $v);\r\n\t\tif(sizeof($topBooks) >= 1){\r\n\t\t\t$recommendedBooks[] = $topBooks;\r\n\t\t\t$i += 1;\r\n\t\t}\r\n\t\tif($i > RECOM_NUM) break; //condition to take the recommendations only from the top matches\r\n\t}\r\n\t//printing the combine array\r\n\t//print_r($recommendedBooks);\r\n\r\n\t//echo ('<br><br>');\r\n\r\n\t$recBooks = array();\r\n\r\n\t//merging the arrays based on the RECOM_NUM\r\n\tforeach($recommendedBooks as $rks){\r\n\t\tforeach ($rks as $key => $value) {\r\n\t\t\t//check if the key already exists\r\n\t\t\tif(array_key_exists($key, $recBooks)){\r\n\t\t\t\t//see whether the value that we are going to insert is higher\r\n\t\t\t\tif($recBooks[$key] < $value){\r\n\t\t\t\t\t$recBooks[$key] = $value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$value = $recBooks[$key];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$recBooks[$key] = $value;\t\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n\r\n\r\n\t//getting the name of the books\r\n\t//$recBooks = array_keys($recBooks);\r\n\t//print_r($recBooks);\r\n\r\n\t//subtracting the items that the user has already seen\r\n\tforeach($prefsOriginal[$p1] as $k => $v){\r\n\t\t// echo('kitaab hai = '.$k);\r\n\t\t// echo ('<br>');\r\n\t\tif (in_array($k, $recBooks)){\r\n\t\t\t$key = array_search($k, $recBooks);\r\n\t\t\t//print $key;\r\n\t\t\tunset($recBooks[$key]);\r\n\t\t}\r\n\t}\r\n\r\n\t//getting the order of the books in which to display based on the rating match\r\n\t//sorting the array based on the key\r\n\tarsort($recBooks);\r\n\r\n\t//printing after removing the read books\r\n\t//echo ('<br><br>');\r\n\r\n\treturn $recBooks;\r\n\r\n}",
"public function run(faker $faker)\n {\n for ($i=0; $i < 10 ; $i++) {\n $fish = new Random();\n $fish->name = $faker->name();\n $fish->price = $faker->randomFloat(2,100,500);\n $fish->description = $faker->paragraph(2);\n $fish->save();\n }\n\n }",
"function tep_random_select($query) {\n $random_product = '';\n $random_query = tep_db_query($query);\n $num_rows = tep_db_num_rows($random_query);\n if ($num_rows > 0) {\n $random_row = tep_rand(0, ($num_rows - 1));\n tep_db_data_seek($random_query, $random_row);\n $random_product = tep_db_fetch_array($random_query);\n }\n\n return $random_product;\n }",
"private function randomArtName()\n {\n $art = $this->availableArt();\n\n return $art[array_rand($art)];\n }",
"protected function _getRandomAuthor()\n {\n $sth = $this->_dbObj->prepare('SELECT author FROM ' . $this->_quotesTable)->execute();\n $authors = $sth->fetchAllAssoc();\n\n $randomKey = array_rand($authors);\n\n return $authors[$randomKey]['author'];\n }",
"public function run()\n {\n parent::run();\n\n $books = Book::all();\n foreach ($books as $book) {\n $book->update([\n 'quantity' => mt_rand(1, 20),\n ]);\n }\n }",
"function bunch(){\r\n $rand = rand(1, 6);\r\n return \"bunch\" . $rand;\r\n}",
"function rand() {\n\n $next = $this->find('first', array('order'=>'position DESC'));\n\n $rand = rand(1, $next['Ringsite']['position']);\n\n $next = $this->find('first', array('conditions'=>array('position'=>$rand)));\n\n return $next;\n }",
"public function roll(): void\n {\n $this->lastRoll = rand(1, $this->numSides);\n }",
"public function run()\n {\n $categories = \\LaccBook\\Models\\Category::all();\n\n factory( Book::class, 50 )->create()->each(function ( $book ) use ( $categories ) {\n $categoriesRamdom = $categories->random( 4 );\n\n $book->categories()->sync( $categoriesRamdom->pluck( 'id' )->all() );\n\n });\n }",
"function mutasi($induk){\n\t\t$pm = 0.11;\n\t\t$jumlah_gen = count($induk);\n\t\tfor ($i=0; $i < $jumlah_gen; $i++) { \n\t\t\t$random = rand(0,10)/10;\n\t\t\tif($random <= $pm){\n\t\t\t\t$induk[$i] = rand(0,10);\n\t\t\t}\n\t\t}\n\t\treturn $induk;\n\t}",
"private function getRandom( $data ) {\n\t\t$total = 0;\n\t\t$distribution = [];\n\t\tforeach ( $data as $name => $weight ) {\n\t\t\t$total += $weight;\n\t\t\t$distribution[ $name ] = $total;\n\t\t}\n\t\t$rand = mt_rand( 0, $total - 1 );\n\t\tforeach ( $distribution as $name => $weight ) {\n\t\t\tif ( $rand < $weight ) {\n\t\t\t\treturn $name;\n\t\t\t}\n\t\t}\n\t}",
"function challangeRandom() {\r\n // random number between 10 and 99\r\n $random = rand(10,99);\r\n $say = \"<Say voice='gcloud.en-GB-Standard-F' loop='2'>Please type the following number, $random, then press pound.</Say>\";\r\n return [$random, $say];\r\n}",
"protected function _getRandAuthorsExceptCorrect($count = 1)\n {\n if (!empty($this->_correctAuthor)) {\n $sth = $this->_dbObj->prepare('SELECT author FROM ' . $this->_quotesTable . ' WHERE author NOT LIKE (?)', array($this->_correctAuthor))->execute();\n $authors = $sth->fetchAllAssoc();\n\n $randAuthors = array();\n if (is_array($authors) && !empty($authors) && $count > 0) {\n do {\n $randomKey = array_rand($authors);\n\n if (!in_array($authors[$randomKey]['author'], $randAuthors)) {\n $randAuthors[] = $authors[$randomKey]['author'];\n }\n } while (count($randAuthors) < $count);\n }\n\n return $randAuthors;\n }\n }",
"public function run(Faker\\Generator $faker)\n {\n $wgro = App\\Market::whereSlug('wgro')->first();\n $lrh = App\\Market::whereSlug('lrh')->first();\n $elizowka = App\\Market::whereSlug('elizowka')->first();\n $agrohurt = App\\Market::whereSlug('agrohurt')->first();\n\n for($x = 0; $x <= 150; $x++) {\n $this->products[$faker->unique()->word] = [\n 'type' => $this->type[array_rand($this->type)],\n 'origin' => $this->origin[array_rand($this->origin)],\n \"package\" => $this->package[array_rand($this->package)],\n ];\n }\n\n foreach ($this->products as $name => $attrs) {\n\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_min\" => rand(1,20),\n \"price_max\" => rand(20,75),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($wgro->id),\n ]);\n }\n }\n\n foreach ($this->products as $name => $attrs) {\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_max\" => rand(15,50),\n \"price_min\" => rand(1,14),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($lrh->id),\n ]);\n }\n }\n\n foreach ($this->products as $name => $attrs) {\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_max\" => rand(15,50),\n \"price_min\" => rand(1,14),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($elizowka->id),\n ]);\n }\n }\n\n foreach ($this->products as $name => $attrs) {\n for ($x = 10; $x <= 30; $x++) {\n DB::table('offers')->insert([\n \"product\" => $name,\n \"type\" => $attrs['type'],\n \"origin\" => $attrs['origin'],\n \"package\" => $attrs['package'],\n \"price_max\" => rand(15,50),\n \"price_min\" => rand(1,14),\n \"date\" => new MongoDB\\BSON\\UTCDateTime(new DateTime('2018-01-'.$x)),\n \"market_id\" => new ObjectID($agrohurt->id),\n ]);\n }\n }\n }",
"public function genius(){\n $aNames = array('name-1', 'name-2', 'name-3');\n\n // Pick random index number from array aNames\n $iKey = array_rand($aNames);\n\n // Return the name using the random index\n return $aNames[$iKey];\n\n }",
"public function shuffle() {\n\t$this->checkElementsInDom();\n\n\t// Save reference to parent node, while the link exists.\n\t$parentNode = $this->_elArray[0]->parentNode;\n\n\t// Remove them all from the DOM.\n\tforeach ($this->_elArray as $el) {\n\t\t$el->remove();\n\t}\n\n\tshuffle($this->_elArray);\n\t// Add them back into the DOM, in their shuffled order.\n\tforeach ($this->_elArray as $el) {\n\t\t$parentNode->append($el);\n\t}\n}",
"function randomGen($min, $max, $quantity) {\n $numbers = range($min, $max);\n shuffle($numbers);\n return array_slice($numbers, 0, $quantity);\n }",
"function random(array $values)\n{\n return Iter\\random($values);\n}",
"public function run(Faker $faker)\n {\n for ($i=0; $i < 2; $i++) {\n $new_conversation = new Conversation();\n $new_conversation->message = $faker->sentence(50);\n $new_conversation->user_id = rand(1,5);\n $new_conversation->save();\n }\n }",
"function random_category_num(){\n $cat_array = array();\n\n $all_category = $this->get_all_category();\n foreach ($all_category as $key => $category) {\n $cat_array[$key] = $category->cat_ID;\n }\n\n shuffle($cat_array);\n $rand_cat_num = $cat_array[ array_rand( $cat_array ) ];\n\n return $rand_cat_num;\n }",
"function weighted_random_simple($values, $weights){ \n $count = count($values); \n $i = 0; \n $n = 0; \n $num = mt_rand(0, array_sum($weights)); \n while($i < $count){\n $n += $weights[$i]; \n if($n >= $num){\n break; \n }\n $i++; \n } \n return $values[$i]; \n}",
"function pickRandom($tablename) {\n\t$result=mysql_query(\"SELECT pkey FROM $tablename\"); //Select all pkeys\n\t$resultCount=mysql_num_rows($result);\n\t$randPkey=mt_rand(0,$resultCount-1);\n\t$result=mysql_query(\"SELECT firstname,surname FROM $tablename WHERE pkey='$randPkey'\"); //select the chosen pkey\n return mysql_fetch_array($result);\n}",
"public static function getRandom()\n\t{\n\t\t$randNumPhp = Lottery::getSecureRand( self::getCount() );\n\t\t//$randNumSql = '( SELECT FLOOR( MAX(`id`) * RAND() ) FROM `category_prize` LIMIT 1 )';\n\n\t\treturn self::find()\n ->select(['id', 'name'])\n\t\t ->andWhere(['>=', 'id', $randNumPhp])\n\t\t ->orderBy('id')\n\t\t ->asArray()\n ->one();\n\t}",
"public function testShuffle()\n {\n $shuffler = new FisherYatesShuffler(1492);\n $string = 'I love donuts';\n for ($i = 99; $i > 0; $i--) {\n $shuffler->shuffle($string);\n }\n $this->assertTrue(true);\n }",
"public function run()\n {\n $member_ids = MemberProfile::all()->pluck('member_ID')->toArray();\n $faker = app(Faker\\Generator::class);\n $books = factory(BookBed::class)\n ->times(50)\n ->make()\n ->each(function($book, $index) \n use ($faker, $member_ids) {\n // $book->elderly_ID = $faker->randomElement($member_ids);\n });\n BookBed::insert($books->toArray());\n }",
"public function run() {\n $b1 = Book::create([\n \t'title'\t=>\t'Lean on Startups',\n \t'author' => 'Prof. Jk Willems',\n \t'link'\t=> 'http://amazon.eu/books/jkw/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 1\n ]);\n $b2 = Book::create([\n \t'author'\t=>\t'Dr. Sulieman Bengal',\n \t'title' => 'Modern Islam',\n \t'link'\t=> 'http://amazon.ksa/books/prof_s_bengal/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 4\n ]);\n $b3 = Book::create([\n \t'author'\t=>\t'Prof. Ali Sheikh',\n \t'title' => 'Feminism in Islam',\n \t'link'\t=> 'http://amazon.ksa/books/Ali_s/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 5\n ]);\n $b4 = Book::create([\n \t'author'\t=>\t'Dietel & Dietel',\n \t'title' => 'How to C#',\n \t'link'\t=> 'http://amazon.com/books/d&d/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 6\n ]);\n $b5 = Book::create([\n \t'author'\t=>\t'Prof. Howard Antonio',\n \t'title' => 'How to overcome Depression',\n \t'link'\t=> 'http://amazon.uk/books/p_howard_antionio/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 2\n ]);\n $b6 = Book::create([\n \t'author'\t=>\t'Prof. Howard Antonio',\n \t'title' => 'How to overcome Anxiety',\n \t'link'\t=> 'http://amazon.uk/books/p_howard_antionio/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 3\n ]);\n $b6 = Book::create([\n \t'author'\t=>\t'Dr. Jack Daniel',\n \t'title' => 'New Start',\n \t'link'\t=> 'http://amazon.us/books/dr_jack_D/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 7\n ]);\n $b7 = Book::create([\n \t'author'\t=>\t'Prof. Marko D.',\n \t'title' => 'Easy English',\n \t'link'\t=> 'http://amazon.uk/books/mard_d/',\n \t'details'\t=> 'Competently coordinate standardized convergence before B2C process improvements. Progressively coordinate distinctive architectures vis-a-vis strategic niches. Authoritatively exploit extensive core competencies and business human capital. Continually.',\n \t'category_id'\t=> 8\n ]);\n }",
"public function randomize()\n {\n return mt_rand(1, $this->maxnumber());\n }",
"function scramble($number) {\n \t\t// return (30533914 * (10033320 - $number + date('s') ) + 151647) % 99447774483;\n\t\t\t$r = rand(100000000000, 999999111111);\n\t\t\treturn abs($r + $id); //better consistency\n\n\t\t}",
"protected function actionRandom() {\n //Fetch all images of the selected category\n $arrRandom = $this->loadFilesRecursive($this->arrElementData[\"repo_id\"]);\n $intRand = array_rand($arrRandom);\n //set the systemid as current\n if(isset($arrRandom[$intRand]))\n $this->setSystemid($arrRandom[$intRand]);\n //and load all\n $strReturn = $this->actionFileDetails(false);\n $strReturn = $this->addPortaleditorCode($strReturn);\n return $strReturn;\n }",
"public function run()\n {\n //\n $products = Product::all();\n\n Shop::all()->each(function ($shop) use ($products){\n $shop->products()->attach(\n $products->random(rand(1,4))->pluck('id')->toArray()\n );\n });\n }",
"public function rand($min,$max);",
"public function run()\n {\n $faker = Faker\\Factory::create();\n for ($i=0; $i<5; $i++)\n {\n $data = array(\n 'name' => $faker->jobTitle,\n 'author'=> $faker->name,\n );\n $books = $this->table('book');\n $books->insert($data);\n $books->save();\n }\n }",
"function bookcrossing_front_page() {\n $bids = db_select('bookcrossing_books', 'b')\n ->fields('b', array('bid'))\n ->condition('status', BOOKCROSSING_BOOK_STATUS_RESERVED, '<>')\n ->range(0, 3)\n ->orderRandom('bid')\n ->execute()\n ->fetchCol();\n $books = bookcrossing_load_multiple($bids);\n\n $output = '';\n foreach ($books as $book) {\n $view = node_view($book['node'], 'front_page');\n $build = bookcrossing_prepare_book_view($view, $book);\n $output .= render($build);\n }\n\n return $output . '<div style=\"clear: left\"></div>';\n}",
"public function test_get_all_books()\n {\n $randomBook = Book::factory()->create();\n $response = $this->getJson('/api/v1/books');\n $response\n ->assertStatus(200)\n ->assertJson([\n \"status_code\" => 200,\n \"status\" => \"success\",\n \"data\" => [\n [\n \"id\" => $randomBook->id,\n \"name\" => $randomBook->name,\n \"isbn\" => $randomBook->isbn,\n \"authors\" => $randomBook->authors,\n \"number_of_pages\" => $randomBook->number_of_pages,\n \"publisher\" => $randomBook->publisher,\n \"country\" => $randomBook->country,\n \"release_date\" => $randomBook->release_date,\n ],\n ]\n ]);\n }",
"abstract public function getRandomKeyword();",
"public function testGetAllBooks()\n {\n //Given we have books in the database\n $book = factory('App\\Book')->create();\n $bookTwo = factory('App\\Book')->create();\n // When the user visits the index page\n $response = $this->get('/api/books');\n //They should see the books Titles and authors\n $response\n ->assertStatus(200) \n ->assertSee($book->title)\n ->assertSee($book->author)\n ->assertSee($bookTwo->title)\n ->assertSee($bookTwo->author);\n \n }",
"public function run()\n {\n $faker = Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Author::create([\n 'name' => $faker->name(),\n 'description' => $faker->text($maxNbChars = 100),\n 'publisher_id' => $faker->numberBetween($min = 1, $max = 10),\n ]);\n }\n }",
"public static function seedRand() {\r\n\t\tsrand((int)((($m=microtime(true))-((int)$m))*pow(10,(int)log10(PHP_INT_MAX)))); \r\n\t}"
] | [
"0.6348684",
"0.62760097",
"0.59678096",
"0.5967124",
"0.59624064",
"0.58881307",
"0.57251835",
"0.56926435",
"0.56852967",
"0.5627833",
"0.56147295",
"0.5578866",
"0.5551529",
"0.5540592",
"0.5456183",
"0.5441198",
"0.5421628",
"0.54120016",
"0.54053587",
"0.53914946",
"0.5391258",
"0.53517914",
"0.53422993",
"0.53393435",
"0.5326325",
"0.5317697",
"0.5310906",
"0.5287512",
"0.5286889",
"0.527987",
"0.5252909",
"0.5249799",
"0.524397",
"0.52401066",
"0.5219737",
"0.52163607",
"0.5210846",
"0.5182007",
"0.51494664",
"0.5145437",
"0.5128046",
"0.5092994",
"0.50825614",
"0.50781846",
"0.50695795",
"0.5068597",
"0.5062258",
"0.5057024",
"0.5055771",
"0.5042232",
"0.50351024",
"0.50316316",
"0.50175464",
"0.50138366",
"0.5002539",
"0.50009507",
"0.49917582",
"0.49877852",
"0.49869755",
"0.4985212",
"0.49813744",
"0.49810094",
"0.4975214",
"0.49744913",
"0.49731895",
"0.49729505",
"0.4970536",
"0.4970086",
"0.4961781",
"0.49594244",
"0.49564958",
"0.49549228",
"0.49434188",
"0.49419305",
"0.4938033",
"0.49278972",
"0.49252892",
"0.49185884",
"0.49172226",
"0.49160087",
"0.48968527",
"0.48932332",
"0.48898903",
"0.4886105",
"0.4884424",
"0.48725995",
"0.48717582",
"0.4871153",
"0.48710796",
"0.4868411",
"0.4865055",
"0.4863857",
"0.48633894",
"0.48593208",
"0.48579517",
"0.4857828",
"0.48540995",
"0.48462668",
"0.48429182",
"0.48408222",
"0.48397145"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$pages = Page::get();
return view("admin.pages.index")
->with(compact('pages',$pages));
} | {
"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()
{
$page = new Page;
$pages = Page::where('id', '!=', $page->id)->get();
$auth = Auth::user();
$users = User::get();
$templates = Template::get();
$image = null;
$imagefiles = null;
foreach($users as $user) {
if($auth->id == $user->id) {
$user->loggedin = true;
break;
}
}
return view('admin.pages.create')
->with(compact('page',$page))
->with(compact('pages',$pages))
->with(compact('users',$users))
->with(compact('image',$image))
->with(compact('imagefiles',$imagefiles))
->with(compact('templates',$templates));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$regex = '/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/';
$validatedData = $request->validate([
'path' => 'required',
'title' => 'required|max:255',
'seo_title' => 'max:255',
'og_image' => 'regex:'.$regex.'|nullable',
'cannonical' => 'regex:'.$regex.'|nullable',
]);
//save the post
$user = User::findOrFail($request->author);
$page = new Page;
$page->title = $request->title;
$page->intro = $request->intro;
$page->content = $request->content;
$page->seo_title = $request->seo_title;
$page->seo_description = $request->seo_description;
$page->og_image = $request->og_image;
$page->cannonical = $request->cannonical;
$page->robots = $request->robots;
$page->template = $request->template;
$page->parent_id = $request->hoofd == 0 ? null : $request->hoofd;
$page->published = $request->published == 'on' ? true : false;
$user->pages()->save($page);
//create a slug and relate to the post
$slug = new Slug;
$slug->path = $request->path;
$slug->cleanup();
$page->slug()->save($slug);
//set featured image
$page->images()->sync($request->featured);
return redirect()->route('admin.pages');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$page = Page::findOrFail($id);
$pages = Page::where('id', '!=', $page->id)->get();
$auth = Auth::user();
$users = User::get();
$image = $page->images->first();
$templates = Template::get();
return view('admin.pages.edit')
->with(compact('page',$page))
->with(compact('pages',$pages))
->with(compact('users',$users))
->with(compact('image',$image))
->with(compact('templates',$templates));
} | {
"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(Form $form)\n {\n //\n }",
"public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"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($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($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(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()\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 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 edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\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 $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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\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 editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit()\n {\n return view('initializer::edit');\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_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\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.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.6834566",
"0.68116575",
"0.68075293",
"0.6805924",
"0.6801357",
"0.6796291",
"0.67915684",
"0.67915684",
"0.67874014",
"0.678544",
"0.67787844",
"0.6777662",
"0.67675763",
"0.676299",
"0.6746726",
"0.6745706",
"0.67450166",
"0.67450166",
"0.6739429",
"0.6734577",
"0.6725992",
"0.67127997",
"0.6694406",
"0.6692487",
"0.6689421",
"0.66884303",
"0.6687299",
"0.6685663",
"0.6682167",
"0.66701853",
"0.66697115",
"0.6666091",
"0.6666091",
"0.66627705",
"0.6661716",
"0.6661522",
"0.6657919",
"0.6656454",
"0.6653187",
"0.6642113",
"0.66332614",
"0.66324973",
"0.66275465",
"0.66275465",
"0.6619777",
"0.6619387",
"0.6617973",
"0.66154003",
"0.66110945",
"0.6607966",
"0.66065043",
"0.6596376",
"0.65953517",
"0.65941286",
"0.6591486",
"0.6590759",
"0.6588404",
"0.658161",
"0.6580548",
"0.6579757",
"0.6577171",
"0.65761065",
"0.657386",
"0.65686774",
"0.6567784",
"0.65672046",
"0.6566417",
"0.65615803",
"0.65615714",
"0.65615714",
"0.65592474",
"0.65586483",
"0.65568006",
"0.6556628",
"0.65564895",
"0.6555322",
"0.65551996",
"0.6555016",
"0.654888",
"0.65477645",
"0.65451735"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$regex = '/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/';
$validatedData = $request->validate([
'path' => 'required',
'title' => 'required|max:255',
'seo_title' => 'max:255',
'og_image' => 'regex:'.$regex.'|nullable',
'cannonical' => 'regex:'.$regex.'|nullable',
]);
//save the post
$user = User::findOrFail($request->author);
$page = Page::findOrFail($id);
$page->title = $request->title;
$page->intro = $request->intro;
$page->content = $request->content;
$page->seo_title = $request->seo_title;
$page->seo_description = $request->seo_description;
$page->og_image = $request->og_image;
$page->cannonical = $request->cannonical;
$page->robots = $request->robots;
$page->template = $request->template;
$page->parent_id = $request->hoofd == 0 ? null : $request->hoofd;
$page->published = $request->published == 'on' ? true : false;
$user->pages()->save($page);
//create a slug and relate to the post
$slug = Slug::findOrFail($page->slug->id);
$slug->path = $request->path;
$slug->cleanup();
$page->slug()->save($slug);
//set featured image
$page->images()->sync($request->featured);
return redirect()->route('admin.pages');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$page = Page::findOrFail($id);
$page->delete();
return redirect()->route('admin.pages');
} | {
"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 |
empty trashed post single item | public function destroytrashed($id)
{
$page = Page::onlyTrashed()->findOrFail($id);
$page->categories()->sync([]);
$page->slug->delete();
$page->forceDelete();
return redirect()->route('admin.pages.trash');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function trashed_post($post_id)\n {\n }",
"public function trashed_posts()\n\t{\n\t\t$data['posts'] = $this->common_model->getAllData('blog_post','*','',array('deleted_at !=' => 'Null'));\n\n\t\t$data['page'] = \"blog/trashed_posts\";\n \t$this->template->template_view($data);\t\n\t}",
"public function trashedPost()\n {\n\n $this->generateSitemap();\n return true;\n\n }",
"public function trashed()\n {\n $postss = post::onlyTrashed()->get();\n \n return view('post.softdelete') -> with('posted' , $postss);\n }",
"function trash_empty() {\n if(!$this->logged_user->isAdministrator() && !$this->logged_user->getSystemPermission('manage_trash')) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n\n $operations_performed = 0;\n\n $objects = ProjectObjects::findTrashed($this->logged_user);\n if(is_foreachable($objects)) {\n db_begin_work();\n foreach($objects as $object) {\n $delete = $object->delete();\n if($delete && !is_error($delete)) {\n $operations_performed++;\n } // if\n } // foreach\n db_commit();\n\n flash_success(':count objects deleted', array('count' => $operations_performed));\n } else {\n flash_success('Already empty');\n } // if\n\n $this->redirectTo('trash');\n }",
"public function emptytrash() {\n $pages = Page::onlyTrashed()->get(); \n foreach($pages as $page) {\n $page->slug->delete();\n $page->forceDelete();\n }\n return redirect()->route('admin.pages.trash');\n }",
"public function emptyItems()\r\n\t{\r\n\t\t$this->_items = array();\r\n\t}",
"abstract public function makeBlankItem();",
"function trashed_post($post_id){\n \n $name = $this->get_name($post_id);\n \n // Get ACFE option\n $settings = acfe_get_settings($this->settings);\n \n // Unset ACFE option\n acfe_unset($settings, $name);\n \n // Update ACFE option\n acfe_update_settings($this->settings, $settings);\n \n }",
"public function removeAllPosts() {}",
"public function trash_changeset_post($post)\n {\n }",
"public function trashed()\n {\n $trashpost = Post::onlyTrashed()->get();\n return view('posts.index')->with('allpost', $trashpost);\n }",
"function wp_trash_post($post_id = 0)\n {\n }",
"function wp_untrash_post($post_id = 0)\n {\n }",
"public function no_items()\n {\n }",
"public function no_items()\n {\n }",
"public function onlyTrashed();",
"function filterPostData()\n {\n /** Remove linked records if they are not set anymore **/\n foreach (array('UNL_MediaHub_Feed_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunesu' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_geo' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_mediahub' => 'value') as $relation=>$field) {\n if (isset($this->post[$relation])) {\n foreach ($this->post[$relation] as $key=>$values) {\n if (empty($values[$field])\n && empty($values['attributes'])) {\n unset($this->post[$relation][$key]);\n }\n }\n }\n }\n unset($this->post['__unlmy_posttarget']);\n unset($this->post['MAX_FILE_SIZE']);\n unset($this->post['submit_existing']);\n }",
"function _untrashed_post($post_id){\n \n if(get_post_type($post_id) !== $this->post_type)\n return;\n \n $this->_save_post($post_id);\n $this->untrashed_post($post_id);\n \n }",
"function wp_idolondemand_delete_post()\n{\n}",
"function wp_insert_post_empty_content($maybe_empty, $postarr)\n {\n }",
"protected function restoreTrashedItems()\n {\n $trashedItems = Item::onlyTrashed()->get();\n foreach ($trashedItems as $item) {\n $item->restore();\n }\n\n }",
"public function forceDeleted(Post $post)\n {\n }",
"public function testPostEmpty()\n {\n $this->assertArrayEmpty($this->get_reflection_property_value('post'));\n }",
"public function forceDeleted(Post $post)\n {\n //\n }",
"public function forceDeleted(Post $post)\n {\n //\n }",
"function _wp_delete_orphaned_draft_menu_items()\n {\n }",
"public function getMyTrashedPosts()\n {\n return $this->posts()\n ->onlyTrashed()\n ->get();\n }",
"function clear_unknown_post_metas()\n {\n global $wpdb;\n\n $query = \"SELECT count(*) FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $count = $wpdb->get_var($query);\n\n if($count)\n {\n $query = \"DELETE FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $wpdb->query($query);\n }\n }",
"function createEmpty()\n\t{\n\t\t$data = array();\n\t\t$data['MexcGallery']['publishing_status'] = 'draft';\n\t\t\n\t\t$this->create();\n\t\treturn $this->save($data, false);\n\t}",
"public function no_items() {\n\n\t\t\techo __( 'No data found', 'wp-data-access' );\n\n\t\t}",
"function clear()\r\n {\r\n $this->items=array();\r\n }",
"function trash() {\n $this->wireframe->current_menu_item = 'trash';\n\n if(!$this->logged_user->isAdministrator() && !$this->logged_user->getSystemPermission('manage_trash')) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n\n if($this->request->isSubmitted()) {\n $action = $this->request->post('action');\n if(!in_array($action, array('restore', 'delete'))) {\n $this->httpError(HTTP_ERR_BAD_REQUEST, 'Invalid action');\n } // if\n\n $object_ids = $this->request->post('objects');\n $objects = ProjectObjects::findByIds($object_ids, STATE_DELETED, VISIBILITY_PRIVATE);\n\n db_begin_work();\n foreach($objects as $object) {\n if($action == 'restore') {\n $object->restoreFromTrash();\n } else {\n $object->delete();\n } // if\n } // foreach\n db_commit();\n } // if\n\n $per_page = 30;\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n\n list($objects, $pagination) = ProjectObjects::paginateTrashed($this->logged_user, $page, $per_page);\n \t$this->smarty->assign(array(\n \t 'objects' => $objects,\n \t 'pagination' => $pagination,\n \t));\n\n \tif(is_foreachable($objects)) {\n \t $this->wireframe->addPageAction(lang('Empty Trash'), assemble_url('trash_empty'), null, array(\n \t 'method' => 'post',\n \t 'confirm' => lang('Are you sure that you want to empty trash?'),\n \t ));\n \t} // if\n }",
"public function untrashed_post($post_id)\n {\n }",
"public function emptyCart()\n {\n unset($this->items);\n\n $this->update();\n\n \\Event::fire('laracart.empty', $this->instance);\n }",
"public function clearItems();",
"public function createNewItem()\n {\n return null;\n }",
"public function nuke () {\n\t\tglobal $wpdb;\n\n\t\t// Make a list of the items syndicated from this feed...\n\t\t$post_ids = $wpdb->get_col($wpdb->prepare(\"\n\t\tSELECT post_id FROM $wpdb->postmeta\n\t\tWHERE meta_key = 'syndication_feed_id'\n\t\tAND meta_value = '%s'\n\t\t\", $this->id));\n\n\t\t// ... and kill them all\n\t\tif (count($post_ids) > 0) :\n\t\t\tforeach ($post_ids as $post_id) :\n\t\t\t\t// Force scrubbing of deleted post\n\t\t\t\t// rather than sending to Trashcan\n\t\t\t\twp_delete_post(\n\t\t\t\t\t/*postid=*/ $post_id,\n\t\t\t\t\t/*force_delete=*/ true\n\t\t\t\t);\n\t\t\tendforeach;\n\t\tendif;\n\n\t\t$this->delete();\n\t}",
"public static function action_clean_post_cache( $post_id ) {\n\t\t$type = get_post_type( $post_id );\n\t\t// Ignore revisions, which aren't ever displayed on the site.\n\t\tif ( $type && 'revision' === $type ) {\n\t\t\treturn;\n\t\t}\n\t\tpantheon_wp_clear_edge_keys( array( 'post-' . $post_id, 'rest-post-' . $post_id ) );\n\t}",
"public function testEmptyBlogPostListWhenNoBlogPostInDatabase()\n {\n $response = $this->get('/posts');\n\n $response->assertSeeText('the list is empty');\n }",
"function clean_post_cache($post)\n {\n }",
"function deletePostFromAdminMenu()\n\t\t{\n\t\t\tglobal $menu;\n\t\t\t\t$restricted = array( __('Posts'));\n\t\t\t\tend ($menu);\n\t\t\t\twhile (prev($menu)){\n\t\t\t\t\t$value = explode(' ',$menu[key($menu)][0]);\n\t\t\t\t\tif(in_array($value[0] != NULL?$value[0]:\"\" , $restricted)){unset($menu[key($menu)]);}\n\t\t\t\t}\n\t\t}",
"public function unpost()\n\t{\n\t\tif ($this->posted)\n\t\t{\n\t\t\t$document_id = Shop_Controller::getDocumentId($this->id, $this->getEntityType());\n\n\t\t\tChartaccount_Entry_Controller::deleteEntriesByDocumentId($document_id);\n\n\t\t\t$this->posted = 0;\n\t\t\t$this->save();\n\t\t}\n\n\t\treturn $this;\n\t}",
"function Clear()\r\n {\r\n $this->_items = array();\r\n }",
"function remove_unpublished_posts($post_ID_query){\n\tglobal $wpdb;\n\t$date_object = count($post_ID_query);\n\t\n\t//build query to find is posts within the results are not published\n\t$post_query .= \"SELECT ID FROM $wpdb->posts WHERE post_status != 'publish' AND (\";\n\tfor($i=0; $i<$date_object;$i++){\n\t\t$current_object = $post_ID_query[$i];\n\t\t$post_query .= \"ID='$current_object->post_id'\";\n\t\tif ($i<($date_object-1)){//add or at the end of each query, expect the last one\n\t\t\t$post_query .= \" OR \";\n\t\t} else{\n\t\t\t$post_query .= \");\";\n\t\t}\n\t}\n\t$trashed_post_id = $wpdb->get_results($post_query);\n\t//make array of id's of trashed posts\n\t$trashed_post_id = get_just_post_ids($trashed_post_id);\n\t//cycle though results or date query, unsetting trashed id's\n\tif (is_array($trashed_post_id)){//check to see $trashed_post_id has results\n\t\tforeach($post_ID_query as $key=>$post){\n\t\t\t//is post id in trashed list?\n\t\t\n\t\t\tif(in_array($post->post_id,$trashed_post_id)){\n\t\t\t\tunset($post_ID_query[$key]);\n\t\t\t}\n\t\t}\n\t} \n\treturn $post_ID_query;\n}",
"public function withoutTrashed()\n {\n $this->trashed = false;\n\n return $this;\n }",
"public function clear()\r\n {\r\n //no action because always isEmpty is true\r\n }",
"function genesisawesome_portfolio_items( $query ) {\n\n if( $query->is_main_query() && is_post_type_archive( 'portfolio' ) && ! is_admin() ) {\n $query->set( 'nopaging', true );\n }\n\n}",
"public function clear()\n {\n $this->items = [];\n $this->saveItems();\n }",
"public function trashed() {\n $editors = Editor::onlyTrashed()->get();\n\n return view('user.posts.trash')->with('posts', $posts);\n }",
"function remove_single_post() {\n remove_action('thematic_singlepost', 'thematic_single_post');\n}",
"function dry() {\n\t\treturn !$this->item;\n\t}",
"public function no_items() {\n\t\t_e( 'No Transactions Found.', 'sp' );\n\t}",
"public function clearOrderHasArticless()\n {\n $this->collOrderHasArticless = null; // important to set this to NULL since that means it is uninitialized\n }",
"function _trashed_post($post_id){\n \n if(get_post_type($post_id) !== $this->post_type)\n return;\n \n $this->trashed_post($post_id);\n \n }",
"public function removeAllRelatedPosts() {}",
"public function testItemWithoutIdShouldBeConsideredNew()\n {\n $item = $this->createItem();\n $this->assertTrue($item->isNew());\n }",
"public function removeMiddlePostFromBlog() {}",
"function doempty()\r\n\t{\r\n\t\t$model\t= &$this->getModel( 'table' );\r\n\t\t$model->truncate();\r\n\t\t$this->display();\r\n\t}",
"function test_insert_post_returns_0() {\n\n\t\t$post = get_post( $this->post_id );\n\n\t\t$updated_id = wp_insert_post( array(\n\t\t\t'ID' => $this->post_id,\n\t\t\t'post_name' => 'post_before_post_name',\n\t\t) );\n\n\t\t$this->assertEquals( 0, $updated_id );\n\n\t}",
"public function testSearchBlankKeyword() {\n $aCategory = factory(App\\Category::class)->create();\n $aLocation = factory(App\\Location::class)->create();\n\n $expectedPost = factory(App\\Post::class)->create([\n 'title' => 'harambe',\n 'category_id' => $aCategory->id,\n 'location_id' => $aLocation->id\n ]);\n\n $acutalPost = $this->call('GET', 'posts/search')->original->getData()['posts']->first();\n\n $this->assertEquals($expectedPost->id, $acutalPost->id);\n $this->assertEquals($expectedPost->title, $acutalPost->title);\n }",
"public function clear()\n {\n $this->items = array();\n }",
"public function onlyTrashed()\n {\n $this->trashed = 'only';\n\n return $this;\n }",
"function unstick_post($post_id)\n {\n }",
"public function withTrashed();",
"public function Clear()\n {\n $this->items = array();\n }",
"public function clear()\n\t{\n\t\t$this->items = [];\n\t}",
"function clear()\n {\n $this->id = \"\";\n $this->offset = \"\";\n $this->title = \"\";\n $this->description = \"\";\n $this->author = \"\";\n $this->type = \"\";\n $this->updated = \"\";\n $this->published = \"\";\n $this->publish_time = \"\";\n $this->insert_time = \"\";\n }",
"public function showSoftDeleted()\n {\n $posts = Post::onlyTrashed()->get();\n return view('admin-posts', ['posts' => $posts]);\n }",
"function emptyPost() {\n\t\t$_POST = array();\n\t}",
"public function all_post() {\n return false;\n }",
"public function all_post() {\n return false;\n }",
"function no_items() {\n _e('No template found.');\n }",
"public function testRandomPostsUnpublished() {\n // create posts, some of them unpublished (note that there is seeded post with id=1)\n $posts = [];\n $posts[0] = $this->createPost(0, TRUE);\n $posts[1] = $this->createPost(1, FALSE);\n $posts[2] = $this->createPost(2, TRUE);\n $posts[3] = $this->createPost(3, FALSE);\n\n\n // get random posts of same quantity\n $random_posts = $this->createRandomPostsComponent();\n $generated_posts = $random_posts->posts();\n\n // ensure there are no unpublished posts in the array\n $ids = $generated_posts->pluck('id');\n self::assertTrue(in_array($posts[0]->id, $ids->all()), 'Published post is in generated array');\n self::assertFalse(in_array($posts[1]->id, $ids->all()), 'Unpublished post is not in generated array');\n self::assertFalse(in_array($posts[3]->id, $ids->all()), 'Unpublished post is not in generated array');\n }",
"public function trash()\n {\n $posts = Posts::onlyTrashed()->orderBy('created_at', 'desc')->paginate(10);\n return view('admin.posts.post.trash',compact('posts'));\n }",
"function postClear()\n {\n }",
"public function purge_post_data() {\n\n if ( current_user_can( 'delete_posts' ) )\n add_action( 'delete_post', array( $this, 'purge_post' ) );\n\n }",
"public function no_items()\n\t{\n \t\t_e( 'No items found.' );\n\t}",
"function no_items() {\n\t\techo apply_filters( 'bdpp_style_no_item_msg', esc_html__('No style found', 'blog-designer-pack') );\n\t}",
"function clear() {\n\t\t\t$this->items = [];\n\t\t}",
"function no_items() {\n\t\tesc_attr_e( 'No assessment results found.' );\n\t}",
"public function no_items() {\n\n\t\t\t_e( 'No items avaliable.', 'js_topic_manager' );\n\n\t\t}",
"public function emptyAction()\n {\n }",
"public function getAndRemoveFirstItem ();",
"public function indexsoftdelete()\n {\n $posts = Post::onlyTrashed()->get();\n \n // Passa os registos para a View\n return view(\"post.indexsoftdelete\",[\"posts\" => $posts]);\n\n }",
"public function clear()\n {\n $this->items = array();\n $this->itemsCount = 0;\n }",
"public function clearPostIndexs()\n\t{\n\t\t$this->collPostIndexs = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function testIsEmpty()\r\n\t{\r\n\t\t$this->assertTrue( $this->list->is_empty() );\r\n\r\n\t\t// add data\r\n\t\t$this->list->ut_dummy_data();\r\n\r\n\t\t// test with data\r\n\t\t$this->assertFalse( $this->list->is_empty() );\r\n\t}",
"protected function _preDelete() {}",
"public function preDelete() { }",
"public function delete_data_to_tombstone(){\n }",
"public function testHasItem()\n {\n self::assertFalse($this->object->hasItem('test'));\n }",
"function _wp_delete_post_menu_item($object_id)\n {\n }",
"function wp_revisions_to_keep($post)\n {\n }",
"public function clearPostData()\n {\n $this->post_data = array();\n }",
"public function testRemoveItem()\n {\n $item = $this->addItem();\n\n $this->laracart->removeItem($item->getHash());\n\n $this->assertEmpty($this->laracart->getItem($item->getHash()));\n }",
"public function hard_delete()\n\t{\n\t\tif (!$this->topic->topic_posts)\n\t\t{\n\t\t\tif (!$this->topic->load($this->topic_id))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Update the postcount for the topic\n\t\t$this->update_topic_postcount(true);\n\n\t\t// Set the visibility appropriately if no posts are visibile to the public/authors\n\t\t$flags = count::get_flags(access::PUBLIC_LEVEL);\n\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t{\n\t\t\t// There are no posts visible to the public, change it to authors level access\n\t\t\t$this->topic->topic_access = access::AUTHOR_LEVEL;\n\n\t\t\t$flags = count::get_flags(access::AUTHOR_LEVEL);\n\t\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t\t{\n\t\t\t\t// There are no posts visible to authors, change it to teams level access\n\t\t\t\t$this->topic->topic_access = access::TEAM_LEVEL;\n\t\t\t}\n\t\t}\n\n\t\t// Sync the first topic post if required\n\t\tif ($this->post_id == $this->topic->topic_first_post_id)\n\t\t{\n\t\t\t$this->topic->sync_first_post($this->post_id);\n\t\t}\n\n\t\t// Sync the last topic post if required\n\t\tif ($this->post_id == $this->topic->topic_last_post_id)\n\t\t{\n\t\t\t$this->topic->sync_last_post($this->post_id);\n\t\t}\n\n\t\t// Submit the topic to store the updated information\n\t\t$this->topic->submit();\n\n\t\t// Remove from the search index\n\t\t$this->search_manager->delete($this->post_type, $this->post_id);\n\n\t\t// @todo remove attachments and other things\n\n\t\t// Remove any attention items\n\t\t$sql = 'DELETE FROM ' . TITANIA_ATTENTION_TABLE . '\n\t\t\tWHERE attention_object_type = ' . ext::TITANIA_POST . '\n\t\t\t\tAND attention_object_id = ' . $this->post_id;\n\t\tphpbb::$db->sql_query($sql);\n\n\t\t// Decrement the user's postcount if we must\n\t\tif (!$this->post_deleted && $this->post_approved && in_array($this->post_type, titania::$config->increment_postcount))\n\t\t{\n\t\t\tphpbb::update_user_postcount($this->post_user_id, '-');\n\t\t}\n\n\t\t$this->forum_queue_hard_delete();\n\n\t\t// Initiate self-destruct mode\n\t\tparent::delete();\n\n\t\t// Update topics posted table\n\t\t$this->topic->update_posted_status('remove', $this->post_user_id);\n\n\t\t// Check if the topic is empty\n\t\t$flags = count::get_flags(access::TEAM_LEVEL, true, true);\n\t\tif (count::from_db($this->topic->topic_posts, $flags) <= 0)\n\t\t{\n\t\t\t$this->topic->delete();\n\t\t}\n\t}",
"public function getTrashed()\n {\n return $this->model->onlyTrashed()->get();\n }",
"public function makeBlankItem() {\n\t\treturn $this->wire(new Fieldgroup());\n\t}",
"public function the_post()\n {\n }",
"function testEmptyKeyValueExpectsDeletePostMeta() {\n\t\t// arrange\n\t\t$post_id = 1;\n\t\t$postvalues = array('field' => null);\n\t\t$existing = 'exists';\n\t\t\\WP_Mock::wpFunction(\n\t\t\t'get_post_meta',\n\t\t\tarray(\n\t\t\t\t'times' => 1,\n\t\t\t\t'return' => $existing,\n\t\t\t)\n\t\t);\n\t\t$form = new TestValidTextField();\n\t\t// act\n\t\t$form->save( $post_id, $postvalues);\n\t\t// assert\n\t}"
] | [
"0.66220754",
"0.6438582",
"0.6377596",
"0.63097525",
"0.61426586",
"0.60319275",
"0.6024002",
"0.5979271",
"0.5858699",
"0.58542657",
"0.58323395",
"0.58235645",
"0.58207756",
"0.5792331",
"0.5737186",
"0.5737168",
"0.572542",
"0.570757",
"0.56476873",
"0.56232256",
"0.5617296",
"0.5613044",
"0.55952656",
"0.55929214",
"0.55831414",
"0.55831414",
"0.5567347",
"0.55639446",
"0.55623037",
"0.55476207",
"0.5528114",
"0.5518773",
"0.5506474",
"0.5489382",
"0.5487133",
"0.54829097",
"0.5479515",
"0.5470719",
"0.5460942",
"0.54488796",
"0.5442252",
"0.54372305",
"0.5417849",
"0.5416871",
"0.54144335",
"0.5410651",
"0.5406091",
"0.5404872",
"0.5404336",
"0.5397052",
"0.53918016",
"0.53786814",
"0.537816",
"0.5365933",
"0.53603506",
"0.5346755",
"0.5334106",
"0.53297454",
"0.5329214",
"0.53290915",
"0.5328541",
"0.532838",
"0.5320539",
"0.53194165",
"0.5317508",
"0.5295154",
"0.52812433",
"0.5277096",
"0.52755946",
"0.52691734",
"0.5268117",
"0.5268117",
"0.5263625",
"0.52602667",
"0.52574956",
"0.52485853",
"0.5237181",
"0.5233489",
"0.5216596",
"0.5215056",
"0.52148247",
"0.5212545",
"0.52068555",
"0.5202089",
"0.5191139",
"0.51705456",
"0.51692826",
"0.5167589",
"0.51634336",
"0.5153237",
"0.51482147",
"0.51345164",
"0.5129508",
"0.5110585",
"0.5110295",
"0.51088905",
"0.5106052",
"0.51016814",
"0.5093951",
"0.50930744",
"0.50928533"
] | 0.0 | -1 |
empty all trashed posts at once | public function emptytrash() {
$pages = Page::onlyTrashed()->get();
foreach($pages as $page) {
$page->slug->delete();
$page->forceDelete();
}
return redirect()->route('admin.pages.trash');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeAllPosts() {}",
"public function clearPostIndexs()\n\t{\n\t\t$this->collPostIndexs = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function trashed_posts()\n\t{\n\t\t$data['posts'] = $this->common_model->getAllData('blog_post','*','',array('deleted_at !=' => 'Null'));\n\n\t\t$data['page'] = \"blog/trashed_posts\";\n \t$this->template->template_view($data);\t\n\t}",
"public function removeAllRelatedPosts() {}",
"public function delete_all() {\n\t\t$this->_cache = array();\n\t\t$this->_collections = array();\n\t}",
"function trash_empty() {\n if(!$this->logged_user->isAdministrator() && !$this->logged_user->getSystemPermission('manage_trash')) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n\n $operations_performed = 0;\n\n $objects = ProjectObjects::findTrashed($this->logged_user);\n if(is_foreachable($objects)) {\n db_begin_work();\n foreach($objects as $object) {\n $delete = $object->delete();\n if($delete && !is_error($delete)) {\n $operations_performed++;\n } // if\n } // foreach\n db_commit();\n\n flash_success(':count objects deleted', array('count' => $operations_performed));\n } else {\n flash_success('Already empty');\n } // if\n\n $this->redirectTo('trash');\n }",
"private function resetAll()\n {\n $this->title = null;\n $this->caption = null;\n $this->categories = null;\n $this->image = null;\n $this->tags = null;\n $this->imagePath = null;\n $this->postId = null;\n }",
"public function do_batch() {\n\t\t$post_ids = array_map( 'intval', $this->get_post_ids() );\n\t\tforeach( $post_ids as $post_to_delete ) {\n\t\t\tadd_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t\twp_delete_post( $post_to_delete, true );\n\t\t\tremove_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t}\n\n\t\t$this->deleted_posts = count( $post_ids );\n\t}",
"private function purgeTables()\n\t{\t\n\t\t$this->db->query(\"DELETE FROM categories\");\n\t\t$this->db->query(\"DELETE FROM album_art\");\n\t\t$this->db->query(\"TRUNCATE TABLE albums\");\n\t\t\n\t}",
"public function clearAll();",
"public function clearAll();",
"public function reset_transient() {\n\t\t$transient_type = $this->_get_all_cached_attachment_transient_ids();\n\n\t\tif ( isset( $transient_type ) and gettype( $transient_type ) ) {\n\t\t\tforeach ( $transient_type as $title ) {\n\t\t\t\tdelete_transient( $title );\n\t\t\t} // foreach()\n\t\t} // if()\n\n\t\t$this->posts = $this->get_posts();\n\t}",
"public function clearAll() {}",
"function clearAllClicks()\n {\n global $wpdb;\n $query = \"TRUNCATE TABLE \" . $this->table_name;\n return $wpdb->query($query);\n }",
"static function eraseWPData() {\n\t\t\n\t\t$user_id = 1;\n\t\t\n\t\tif( defined( 'WP_USERID' ) )\n\t\t\t$user_id = (int)WP_USERID;\n\t\t\n\t\tglobal $wpdb;\n\t\t\n\t\techo_now( 'Clearing WordPress data...' );\n\t\t\n\t\tdo_action( 'erase_wp_data_before' );\n\t\t\n\t\twordpress()->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'comments' );\n\t\twordpress()->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'links' );\n\t\twordpress()->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'postmeta' );\n\t\twordpress()->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'posts' );\n\t\twordpress()->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'term_relationships' );\n\t\twordpress()->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'term_taxonomy' );\n\t\twordpress()->query( 'TRUNCATE TABLE ' . $wpdb->prefix . 'terms' );\n\t\t\n\t\twordpress()->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'users WHERE ID != %d', $user_id ) );\n\t\twordpress()->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'usermeta WHERE user_id != %d', $user_id ) );\n\t\t\n\t\tdo_action( 'erase_wp_data_after' );\n\t\t\n\t}",
"public function clear_tables()\n\t{\n\t\tglobal $wpdb;\n\t\t$wpdb->query( 'DELETE FROM '.self::$site_table.';' );\n\t}",
"private function cleanDatabase()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->tables as $table)\n {\n\n DB::table($table)->truncate();\n\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n\n }",
"public function trashed_post($post_id)\n {\n }",
"public static function emptyTruncateAll()\n {\n self::empty();\n self::truncateAll();\n }",
"public final function destroy_all()\n {\n }",
"protected function resetElementsToBeDeleted() {}",
"function remove_unpublished_posts($post_ID_query){\n\tglobal $wpdb;\n\t$date_object = count($post_ID_query);\n\t\n\t//build query to find is posts within the results are not published\n\t$post_query .= \"SELECT ID FROM $wpdb->posts WHERE post_status != 'publish' AND (\";\n\tfor($i=0; $i<$date_object;$i++){\n\t\t$current_object = $post_ID_query[$i];\n\t\t$post_query .= \"ID='$current_object->post_id'\";\n\t\tif ($i<($date_object-1)){//add or at the end of each query, expect the last one\n\t\t\t$post_query .= \" OR \";\n\t\t} else{\n\t\t\t$post_query .= \");\";\n\t\t}\n\t}\n\t$trashed_post_id = $wpdb->get_results($post_query);\n\t//make array of id's of trashed posts\n\t$trashed_post_id = get_just_post_ids($trashed_post_id);\n\t//cycle though results or date query, unsetting trashed id's\n\tif (is_array($trashed_post_id)){//check to see $trashed_post_id has results\n\t\tforeach($post_ID_query as $key=>$post){\n\t\t\t//is post id in trashed list?\n\t\t\n\t\t\tif(in_array($post->post_id,$trashed_post_id)){\n\t\t\t\tunset($post_ID_query[$key]);\n\t\t\t}\n\t\t}\n\t} \n\treturn $post_ID_query;\n}",
"public function flushAll() {\n\t\t$this->removeKeys();\n\t}",
"public function clear(): void\n {\n $app = App::get();\n $list = $app->data->getList()\n ->filterBy('key', '.temp/cache/', 'startWith');\n foreach ($list as $item) {\n $app->data->delete($item->key);\n };\n }",
"protected function restoreTrashedItems()\n {\n $trashedItems = Item::onlyTrashed()->get();\n foreach ($trashedItems as $item) {\n $item->restore();\n }\n\n }",
"function emptyIndexTable(){\n\t\t$this->ecmDBhandle->truncateTable($this->dfs_db-> table_name);\n\t}",
"protected function clearAllPersistentData()\r\n {\r\n }",
"public function clear()\r\n\t{\r\n\t\t$this->db->runQuery(\"TRUNCATE TABLE `\" . $this->name . \"`\");\r\n\t}",
"public function delete_data_to_tombstone(){\n }",
"public function clearPostsRelatedByReplicaPostId()\n\t{\n\t\t$this->collPostsRelatedByReplicaPostId = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function getMyTrashedPosts()\n {\n return $this->posts()\n ->onlyTrashed()\n ->get();\n }",
"public function deleteAll()\n {\n $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';\n $this->db->sql_query($query);\n }",
"public function nuke () {\n\t\tglobal $wpdb;\n\n\t\t// Make a list of the items syndicated from this feed...\n\t\t$post_ids = $wpdb->get_col($wpdb->prepare(\"\n\t\tSELECT post_id FROM $wpdb->postmeta\n\t\tWHERE meta_key = 'syndication_feed_id'\n\t\tAND meta_value = '%s'\n\t\t\", $this->id));\n\n\t\t// ... and kill them all\n\t\tif (count($post_ids) > 0) :\n\t\t\tforeach ($post_ids as $post_id) :\n\t\t\t\t// Force scrubbing of deleted post\n\t\t\t\t// rather than sending to Trashcan\n\t\t\t\twp_delete_post(\n\t\t\t\t\t/*postid=*/ $post_id,\n\t\t\t\t\t/*force_delete=*/ true\n\t\t\t\t);\n\t\t\tendforeach;\n\t\tendif;\n\n\t\t$this->delete();\n\t}",
"public function unsetAll() {\n\t\tparent::unsetAll();\n\t}",
"function clear_unknown_post_metas()\n {\n global $wpdb;\n\n $query = \"SELECT count(*) FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $count = $wpdb->get_var($query);\n\n if($count)\n {\n $query = \"DELETE FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $wpdb->query($query);\n }\n }",
"function Clear() {\n\t\t\t$s3objects = $this->ListAlls3objects();\n\t\t\t/* delete each one */\n\t\t\tforeach($s3objects AS $s3object) {\n\t\t\t\t$s3object->Delete();\n\t\t\t\tunset($s3object);\n\t\t\t}\n\t\t}",
"public function clearAction()\n {\n $this->container->get('dbal_connection')->executeQuery('SET FOREIGN_KEY_CHECKS = 0');\n $this->container->get('dbal_connection')->executeQuery('TRUNCATE TABLE s_plugin_mailcatcher_attachments');\n $this->container->get('dbal_connection')->executeQuery('TRUNCATE TABLE s_plugin_mailcatcher');\n $this->container->get('dbal_connection')->executeQuery('SET FOREIGN_KEY_CHECKS = 1');\n }",
"public function trashed()\n {\n $postss = post::onlyTrashed()->get();\n \n return view('post.softdelete') -> with('posted' , $postss);\n }",
"public function clear_data() {\n\n $token = $_POST['token'];\n $clear = isset( $_POST['clear'] ) ? $_POST['clear'] : null;\n $key = get_option( \"wpp_rand\" );\n\n if (\n current_user_can( 'manage_options' )\n && ( $token === $key )\n && $clear\n ) {\n\n global $wpdb;\n\n // set table name\n $prefix = $wpdb->prefix . \"popularposts\";\n\n if ( $clear == 'cache' ) {\n\n if ( $wpdb->get_var(\"SHOW TABLES LIKE '{$prefix}summary'\") ) {\n\n $wpdb->query(\"TRUNCATE TABLE {$prefix}summary;\");\n $this->flush_transients();\n\n echo 1;\n\n } else {\n echo 2;\n }\n\n } elseif ( $clear == 'all' ) {\n\n if ( $wpdb->get_var(\"SHOW TABLES LIKE '{$prefix}data'\") && $wpdb->get_var(\"SHOW TABLES LIKE '{$prefix}summary'\") ) {\n\n $wpdb->query(\"TRUNCATE TABLE {$prefix}data;\");\n $wpdb->query(\"TRUNCATE TABLE {$prefix}summary;\");\n $this->flush_transients();\n\n echo 1;\n\n } else {\n echo 2;\n }\n\n } else {\n echo 3;\n }\n } else {\n echo 4;\n }\n\n wp_die();\n\n }",
"public function clear()\n {\n if (null !== $this->getDraft()) {\n $this->getDraft()->clear();\n } else {\n $this->_subcontent->clear();\n $this->subcontentmap = array();\n $this->_data = array();\n $this->index = 0;\n }\n }",
"public function clearMetas(): void\n {\n $this->metas()->delete();\n }",
"function hard_delete_posts()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->hard_delete['p']))\r\n\t\t{\r\n\t\t\t$sql = 'DELETE FROM ' . POSTS_TABLE . '\r\n\t\t\t\tWHERE ' . $db->sql_in_set('post_id', $this->hard_delete['p']);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\tforeach ($this->hard_delete['p'] as $id)\r\n\t\t\t{\r\n\t\t\t\t$topic_id = intval($this->post_data[$id]['topic_id']);\r\n\t\t\t\t$forum_id = intval($this->post_data[$id]['forum_id']);\r\n\t\t\t\t$sql_data = $sql_data1 = '';\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_deleted'] != 0 && (($this->topic_data[$topic_id]['topic_first_post_id'] == $id && $this->topic_data[$topic_id]['topic_last_post_id'] == $id) || ($this->topic_data[$topic_id]['topic_deleted_reply_count'] == 1 && $this->topic_data[$topic_id]['topic_replies_real'] == 0)))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->hard_delete['t'][] = $topic_id;\r\n\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_HARD_DELETE_TOPIC', $this->topic_data[$topic_id]['topic_title']);\r\n\r\n\t\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->hard_delete['t'][] = $this->shadow_topic_ids[$topic_id];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL && $this->forum_data[$forum_id]['forum_deleted_topic_count'] > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql_data1 .= 'forum_deleted_topic_count = forum_deleted_topic_count - 1, ';\r\n\t\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_topic_count']--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_HARD_DELETE_POST', $this->post_data[$id]['post_subject']);\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_replies'] > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql_data .= 'topic_replies = topic_replies - 1, ';\r\n\t\t\t\t\t\t$this->topic_data[$topic_id]['topic_replies']--;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_replies_real'] > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql_data .= 'topic_replies_real = topic_replies_real - 1, ';\r\n\t\t\t\t\t\t$this->topic_data[$topic_id]['topic_replies_real']--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_deleted_reply_count'] > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql_data .= 'topic_deleted_reply_count = topic_deleted_reply_count - 1, ';\r\n\t\t\t\t\t$this->topic_data[$topic_id]['topic_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL && $this->forum_data[$forum_id]['forum_deleted_reply_count'] > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql_data1 .= 'forum_deleted_reply_count = forum_deleted_reply_count - 1, ';\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL && $this->forum_data[$forum_id]['forum_posts'] > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql_data1 .= 'forum_posts = forum_posts - 1, ';\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_posts']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($sql_data != '')\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\tSET ' . $sql_data;\r\n\t\t\t\t\t$sql = substr($sql, 0, -2);\r\n\t\t\t\t\t$sql .= ' WHERE topic_id = ' . $topic_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t}\r\n\t\t\t\tif ($sql_data1 != '' && $this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET ' . $sql_data1;\r\n\t\t\t\t\t\t$sql = substr($sql, 0, -2);\r\n\t\t\t\t\t\t$sql .= ' WHERE forum_id = ' . $forum_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->delete_attachment_data();\r\n\r\n\t\t\t$sql = 'DELETE FROM ' . TERMMAP_TABLE . '\r\n\t\t\t\tWHERE topic_id = ' . (int) $topic_id;\r\n\t\t\t$db->sql_query($sql);\r\n\t\t\t\r\n\t\t\t$this->hard_delete_topics();\r\n\t\t}\r\n\t}",
"public function prune() {\n $this->connection->delete('queue')\n ->condition('name', $this->name)\n ->condition('expire', 0, '>')\n ->execute();\n }",
"public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach($this->getTables() as $t) {\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t}",
"public function trashed()\n {\n $trashpost = Post::onlyTrashed()->get();\n return view('posts.index')->with('allpost', $trashpost);\n }",
"public function reset()\n {\n $db = PDOController::getInstance();\n \n $req = $db->prepare(\"TRUNCATE TABLE `executedtask` \");\n $req->execute([]);\n }",
"public function clear_all()\n {\n }",
"public function restoreAllTrashed()\n {\n return $this->model->withTrashed()->restore();\n }",
"function delivery_featured_content_transient_flusher() {\n\tdelete_transient( 'delivery_featured_posts' );\n}",
"public function truncateAll(): void\n {\n $tables = [\n Newsletter::TABLE_NAME,\n Link::TABLE_NAME,\n Log::TABLE_NAME,\n Queue::TABLE_NAME,\n ];\n foreach ($tables as $table) {\n DatabaseUtility::getConnectionForTable($table)->truncate($table);\n }\n }",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear();",
"public function clear()\n {\n self::foreignChecks(false);\n $this->model->truncate();\n self::foreignChecks(true);\n }",
"function soft_delete_posts()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->soft_delete['p']))\r\n\t\t{\r\n\t\t\t$sql_data = array(\r\n\t\t\t\t'post_deleted'\t\t\t=> $user->data['user_id'],\r\n\t\t\t\t'post_deleted_time'\t\t=> time(),\r\n\t\t\t);\r\n\t\t\t$sql = 'UPDATE ' . POSTS_TABLE . '\r\n\t\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . '\r\n\t\t\t\t\tWHERE ' . $db->sql_in_set('post_id', $this->soft_delete['p']);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t// Update the search index to remove any posts we have soft deleted\r\n\t\t\t$this->update_search_index($this->soft_delete['p'], true);\r\n\r\n\t\t\tforeach ($this->soft_delete['p'] as $id)\r\n\t\t\t{\r\n\t\t\t\t$topic_id = intval($this->post_data[$id]['topic_id']);\r\n\t\t\t\t$forum_id = intval($this->post_data[$id]['forum_id']);\r\n\r\n\t\t\t\t// Update the first/last topic info if we must\r\n\t\t\t\tif (($this->topic_data[$topic_id]['topic_first_post_id'] == $id && $this->topic_data[$topic_id]['topic_last_post_id'] == $id) || ($this->topic_data[$topic_id]['topic_deleted_reply_count'] == ($this->topic_data[$topic_id]['topic_replies_real'])))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Since we are deleting the only post left we shall soft delete the topic\r\n\t\t\t\t\t$this->soft_delete['t'][] = $topic_id;\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_poster'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_SOFT_DELETE_TOPIC', $this->topic_data[$topic_id]['topic_title']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t// Update the first or last post if we have to.\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_first_post_id'] == $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_first_post_topic($topic_id);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ($this->topic_data[$topic_id]['topic_last_post_id'] == $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_last_post_topic($topic_id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif ($this->post_data[$id]['poster_id'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_SOFT_DELETE_POST', $this->post_data[$id]['post_subject']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Fix post reported\r\n\t\t\t\tif ($this->post_data[$id]['post_reported'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . POSTS_TABLE . '\r\n\t\t\t\t\t\tSET post_reported = 0\r\n\t\t\t\t\t\t\tWHERE post_id = ' . $id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t\t\t$this->post_data[$id]['post_reported'] = 0;\r\n\r\n\t\t\t\t\t$some_reported = false;\r\n\t\t\t\t\t$sql = 'SELECT post_reported FROM ' . POSTS_TABLE . '\r\n\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t\t$result = $db->sql_query($sql);\r\n\t\t\t\t\twhile ($row = $db->sql_fetchrow($result))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($row['post_reported'])\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$some_reported = true;\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$db->sql_freeresult($result);\r\n\r\n\t\t\t\t\t// If none of the posts in this topic are reported anymore, reset it for the topic\r\n\t\t\t\t\tif (!$some_reported)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\t\tSET topic_reported = 0\r\n\t\t\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Update the deleted reply count for the topic\r\n\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count + 1\r\n\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t$this->topic_data[$topic_id]['topic_deleted_reply_count']++;\r\n\r\n\t\t\t\t// Update the deleted reply count for the shadow topics\r\n\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count + 1\r\n\t\t\t\t\t\t\tWHERE topic_id = ' . intval($this->shadow_topic_ids[$topic_id]);\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->topic_data[$this->shadow_topic_ids[$topic_id]]['topic_deleted_reply_count']++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the topic is a global announcement, do not attempt to do any updates to forums\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Update the deleted reply count for the forum\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET forum_deleted_reply_count = forum_deleted_reply_count + 1\r\n\t\t\t\t\t\t\tWHERE forum_id = ' . $forum_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_reply_count']++;\r\n\r\n\t\t\t\t\t// Update the last post info for the forum if we must\r\n\t\t\t\t\tif ($this->forum_data[$forum_id]['forum_last_post_id'] == $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_last_post_forum($forum_id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($this->forum_data[$this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']]['forum_last_post_id'] == $id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->update_last_post_forum($this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Soft delete the topics\r\n\t\t\t$this->soft_delete_topics();\r\n\t\t}\r\n\t}",
"protected function clear() {}",
"public function deleteTrash()\n {\n $currentTime = time();\n foreach (self::$cacheData as $key => $item) {\n if ($currentTime >= ($item['time'] + $item['ttl'])) {\n unset(self::$cacheData[$key]);\n }\n }\n }",
"public function clearPostDailyStatss()\n\t{\n\t\t$this->collPostDailyStatss = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"function wp_delete_all_temp_backups()\n {\n }",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"public function clear() {}",
"function CleanUp () {\n global $zOLDAPPLE;\n\n $criteria = array (\"groupInformation_tID\" => $this->tID,\n \"Body\" => DELETED_GROUP_ENTRY);\n $this->groupContent->SelectByMultiple ($criteria);\n\n // Break out if no deleted posts left. \n if ($this->groupContent->CountResult() == 0) return (TRUE);\n\n while ($this->groupContent->FetchArray ()) {\n $CHILDREN = new cGROUPCONTENT ();\n $childcriteria = array (\"parent_tID\" => $this->groupContent->tID,\n \"groupInformation_tID\" => $this->tID,\n \"Context\" => $zOLDAPPLE->Context);\n $CHILDREN->SelectByMultiple ($childcriteria);\n\n // If no children, delete.\n if ($CHILDREN->CountResult () == 0) {\n $this->groupContent->Delete ();\n $this->CleanUp ();\n } // if\n unset ($CHILDREN);\n } // while\n }",
"function netrics_clear_month_data( $query_ids = null ) {\n if ( ! isset( $query_ids->posts ) ) {\n $query_ids = netrics_get_pubs_ids( 2000 );\n }\n\n $log = '';\n foreach ( $query_ids->posts as $post_id ) {\n $del_articles = delete_post_meta( $post_id, 'nn_articles_new' );\n $del_errors = delete_post_meta( $post_id, 'nn_error' );\n $del_flag = wp_remove_object_terms( $post_id, array( 6178, 6179 ), 'flag' ); //'0Feed' and '1PageSpeed'.\n\n $log .= \"$post_id $del_articles/$del_errors/$del_flag\";\n }\n\n return $log;\n}",
"public static function resetIndex(){\n\t\t$sql = \"TRUNCATE TABLE `documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `terms`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t$sql = \"TRUNCATE TABLE `term_documents`\";\n\t\t$result = mysqli_query(self::$conn, $sql) or die(mysqli_error(self::$conn));\n\t\t// delete all files from documents directory\n\t\tarray_map('unlink', glob('documents/' . '*.txt'));\n\t}",
"public function destroy(): void\n {\n foreach ($this->getAll() as $k => $v) {\n if (strlen(strval($k)) > 0) {\n $this->remove($k);\n }\n }\n return;\n }",
"public function delete_all()\n {\n }",
"public function _destroy_queue() {\n\t\tglobal $wpdb;\n\n\t\t$status = \\SearchWP::$index->get_tables()['status']->table_name;\n\t\t$wpdb->query( $wpdb->prepare( \"\n\t\t\tDELETE FROM {$status}\n\t\t\tWHERE indexed IS NULL\n\t\t\tAND omitted IS NULL\n\t\t\tAND queued IS NOT NULL\n\t\t\tAND site = %d\",\n\t\t\tget_current_blog_id()\n\t\t) );\n\t}",
"public function purge(): void\n {\n $this->owner()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->where('current_team_id', $this->id)\n ->update(['current_team_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }",
"protected function truncateTables()\n {\n \\DB::table('cities')->truncate();\n \\DB::table('states')->truncate();\n }",
"public function resetAllIndexes()\n {\n foreach ($this->indexManager->getIndexes() as $index) {\n try {\n $index->truncate();\n }\n catch (DatabaseException $ex)\n {\n }\n }\n }",
"private function flush_transients() {\n\n $wpp_transients = get_option( 'wpp_transients' );\n\n if ( $wpp_transients && is_array( $wpp_transients ) && !empty( $wpp_transients ) ) {\n\n for ( $t=0; $t < count( $wpp_transients ); $t++ )\n delete_transient( $wpp_transients[$t] );\n\n update_option( 'wpp_transients', array() );\n\n }\n\n }",
"public function purge();",
"public function purge();",
"public function purge();",
"public function clearAll()\n {\n }",
"function undelete_posts()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->undelete['p']))\r\n\t\t{\r\n\t\t\t$sql_data = array(\r\n\t\t\t\t'post_deleted'\t\t\t=> 0,\r\n\t\t\t\t'post_deleted_time'\t\t=> 0,\r\n\t\t\t);\r\n\t\t\t$sql = 'UPDATE ' . POSTS_TABLE . '\r\n\t\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . '\r\n\t\t\t\t\tWHERE ' . $db->sql_in_set('post_id', $this->undelete['p']);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t// Add the post info to the search index since we are undeleting it\r\n\t\t\t$this->update_search_index($this->undelete['p'], false);\r\n\r\n\t\t\tforeach ($this->undelete['p'] as $id)\r\n\t\t\t{\r\n\t\t\t\t$topic_id = intval($this->post_data[$id]['topic_id']);\r\n\t\t\t\t$forum_id = intval($this->post_data[$id]['forum_id']);\r\n\r\n\t\t\t\t// Update the first/last topic info if we must\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_deleted'] != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Since the topic was deleted, undelete it\r\n\t\t\t\t\t$this->undelete['t'][] = $topic_id;\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_poster'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_UNDELETE_TOPIC', $this->topic_data[$topic_id]['topic_title']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($this->post_data[$id]['poster_id'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_UNDELETE_POST', $this->post_data[$id]['post_subject']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_first_post_id'] > $id)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->update_first_post_topic($topic_id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_last_post_id'] < $id)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->update_last_post_topic($topic_id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count - 1\r\n\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t$this->topic_data[$topic_id]['topic_deleted_reply_count']--;\r\n\r\n\t\t\t\t// If there is a shadow topic, we will update it too.\r\n\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count - 1\r\n\t\t\t\t\t\t\tWHERE topic_id = ' . intval($this->shadow_topic_ids[$topic_id]);\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t\t\t$this->topic_data[$this->shadow_topic_ids[$topic_id]]['topic_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the topic is a global announcement, do not attempt to do any updates to forums\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Update the last post info for the forum if we must\r\n\t\t\t\t\tif ($this->forum_data[$forum_id]['forum_last_post_id'] < $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_last_post_forum($forum_id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($this->forum_data[$this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']]['forum_last_post_id'] == $id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->update_last_post_forum($this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET forum_deleted_reply_count = forum_deleted_reply_count - 1\r\n\t\t\t\t\t\t\tWHERE forum_id = ' . $forum_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Undelete the topics\r\n\t\t\t$this->undelete_topics();\r\n\t\t}\r\n\t}",
"public function reset()\n {\n $this->getDb()->exec('delete from media');\n //pictures and vignettes deletion\n $this->deleteMedias();\n //backup deletion\n $this->deleteBackup();\n }"
] | [
"0.70051914",
"0.6962962",
"0.6904693",
"0.6723057",
"0.6503081",
"0.64129955",
"0.63915837",
"0.63674873",
"0.63504106",
"0.63281375",
"0.63281375",
"0.6326946",
"0.6317248",
"0.6316123",
"0.62905115",
"0.62790275",
"0.62756115",
"0.6273807",
"0.6268743",
"0.6250929",
"0.6224501",
"0.6221089",
"0.61767185",
"0.61609656",
"0.6157109",
"0.6127365",
"0.612707",
"0.6126797",
"0.61209375",
"0.6114582",
"0.61049247",
"0.6097057",
"0.6095271",
"0.60911363",
"0.6088871",
"0.6078877",
"0.6069731",
"0.60632485",
"0.60558325",
"0.6043099",
"0.6042937",
"0.6015925",
"0.6015183",
"0.6015124",
"0.60112286",
"0.6000256",
"0.59889245",
"0.5987358",
"0.59864527",
"0.59649736",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5944568",
"0.5920233",
"0.5914955",
"0.59102976",
"0.5900139",
"0.5895762",
"0.58957154",
"0.5894399",
"0.5894399",
"0.5894399",
"0.5894399",
"0.58934164",
"0.5885166",
"0.5879334",
"0.5865128",
"0.58602256",
"0.58529115",
"0.5845963",
"0.58443356",
"0.58435637",
"0.58361244",
"0.5835733",
"0.5835733",
"0.5835733",
"0.58316034",
"0.5826544",
"0.5824078"
] | 0.6661631 | 4 |
restore trashed post single item | public function restoretrashed($id)
{
$page = Page::onlyTrashed()->findOrFail($id);
$page->restore();
return redirect()->route('admin.pages.trash');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function restoreTrashedItems()\n {\n $trashedItems = Item::onlyTrashed()->get();\n foreach ($trashedItems as $item) {\n $item->restore();\n }\n\n }",
"public function restored(Post $post)\n {\n //\n }",
"public function restored(Post $post)\n {\n //\n }",
"public function restored(Item $item)\n {\n //\n }",
"public function restored(Item $item)\n {\n //\n }",
"public function trashed_post($post_id)\n {\n }",
"function _untrashed_post($post_id){\n \n if(get_post_type($post_id) !== $this->post_type)\n return;\n \n $this->_save_post($post_id);\n $this->untrashed_post($post_id);\n \n }",
"public function restored(Post $post)\n {\n $post->recordActivity('restored');\n }",
"public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }",
"public function restoretrash() {\n $pages = Page::onlyTrashed()->get(); \n foreach($pages as $page) {\n $page->restore();\n }\n return redirect()->route('admin.pages');\n }",
"public function untrashed_post($post_id)\n {\n }",
"public function restoreAllTrashed()\n {\n return $this->model->withTrashed()->restore();\n }",
"public function restoring(Post $post)\n {\n //-- we restore comments and picture before restore post\n\n $post->comments()->restore();\n $post->picture()->restore();\n }",
"public function restoreOneTrashed($id)\n {\n return $this->model->where('id', $id)->restore();\n }",
"public function restored(BlogPost $blogPost)\n\t{\n\t\t//\n\t}",
"public function trash_changeset_post($post)\n {\n }",
"public function restored(BlogPost $modelsBlogPost)\n {\n //\n }",
"function trashed_post($post_id){\n \n $name = $this->get_name($post_id);\n \n // Get ACFE option\n $settings = acfe_get_settings($this->settings);\n \n // Unset ACFE option\n acfe_unset($settings, $name);\n \n // Update ACFE option\n acfe_update_settings($this->settings, $settings);\n \n }",
"public function restore($id)\n {\n // Restoring post (deleted_at = null)\n $post = Post::where('id', $id)->restore();\n //deleting the reports for that post\n $post = Post::find($id)->usersReports()->detach();\n }",
"public function restored($item)\n {\n $this->elastic->index($item->getTable(), $item->id, $item->toArray());\n }",
"public function restore() {}",
"public function restore(User $user, Post $post)\n {\n //\n }",
"function _trashed_post($post_id){\n \n if(get_post_type($post_id) !== $this->post_type)\n return;\n \n $this->trashed_post($post_id);\n \n }",
"function wp_untrash_post($post_id = 0)\n {\n }",
"public function restored(AssignmentSubmitted $as) {\n Messages::onlyTrashed()->where('id', $as->message_id)->restore();\n }",
"public function restoredItem(int $id)\n {\n return $this->withTrashed()->whereId($id)->restore();\n }",
"public function restore();",
"public function reset_transient() {\n\t\t$transient_type = $this->_get_all_cached_attachment_transient_ids();\n\n\t\tif ( isset( $transient_type ) and gettype( $transient_type ) ) {\n\t\t\tforeach ( $transient_type as $title ) {\n\t\t\t\tdelete_transient( $title );\n\t\t\t} // foreach()\n\t\t} // if()\n\n\t\t$this->posts = $this->get_posts();\n\t}",
"public function trashed_posts()\n\t{\n\t\t$data['posts'] = $this->common_model->getAllData('blog_post','*','',array('deleted_at !=' => 'Null'));\n\n\t\t$data['page'] = \"blog/trashed_posts\";\n \t$this->template->template_view($data);\t\n\t}",
"function untrash() {\n try {\n DB::beginWork('Restoring company from a trash @ ' . __CLASS__);\n \n parent::untrash();\n\n $users = Users::findByCompany($this->object, null, STATE_TRASHED);\n if (is_foreachable($users)) {\n foreach ($users as $user) {\n if ($user->getState() == STATE_TRASHED) {\n if ($user instanceof IActivityLogs) {\n $user->activityLogs()->gag();\n } // if\n $user->state()->untrash();\n } // if\n } // foreach\n } // if\n\n AngieApplication::cache()->removeByModel('users');\n \n DB::commit('Company restored from a trash @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to restore company from trash @ ' . __CLASS__);\n \n throw $e;\n } // try\n }",
"function wp_untrash_post_set_previous_status($new_status, $post_id, $previous_status)\n {\n }",
"public function restore()\n {\n //\n }",
"protected static function restore() {}",
"function wp_restore_post_revision($post_id, $revision_id)\n {\n }",
"public function unpost()\n\t{\n\t\tif ($this->posted)\n\t\t{\n\t\t\t$document_id = Shop_Controller::getDocumentId($this->id, $this->getEntityType());\n\n\t\t\tChartaccount_Entry_Controller::deleteEntriesByDocumentId($document_id);\n\n\t\t\t$this->posted = 0;\n\t\t\t$this->save();\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function restored(Ticket $ticket)\n {\n //\n }",
"public function restored(Article $article)\n {\n //\n }",
"public function withTrashed();",
"function unstick_post($post_id)\n {\n }",
"public function recovery($id){\n $delete = Category::withTrashed()->find($id)->restore();\n }",
"public function restore()\n {\n }",
"public function restorethisitem()\n {\n $id_item = $this->request->getParameter(\"id\");\n $this->item->restoreItem($id_item);\n $this->message->extendedCardRestored();\n }",
"public function trashed()\n {\n $postss = post::onlyTrashed()->get();\n \n return view('post.softdelete') -> with('posted' , $postss);\n }",
"function wp_restore_image($post_id)\n {\n }",
"function acf_reset_postdata( $post_id = 0 ) {\n\treturn acf_get_instance('ACF_Local_Meta')->remove( $post_id );\n}",
"function wp_restore_post_revision( $post_id, $revision_id ) {\n\n\t\t\t// copy postmeta from revision to post (restore from revision)\n\t\t\tacf_copy_postmeta( $revision_id, $post_id );\n\n\t\t\t// Make sure the latest revision is also updated to match the new $post data\n\t\t\t// get latest revision\n\t\t\t$revision = acf_get_post_latest_revision( $post_id );\n\n\t\t\t// save\n\t\t\tif ( $revision ) {\n\n\t\t\t\t// copy postmeta from revision to latest revision (potentialy may be the same, but most likely are different)\n\t\t\t\tacf_copy_postmeta( $revision_id, $revision->ID );\n\n\t\t\t}\n\n\t\t}",
"public function postRollback() {\n $containers = variable_get('forum_containers', array());\n $remaining = array();\n foreach ($containers as $container) {\n if (!in_array($container, $this->deletedContainers) && !in_array($container, $remaining)) {\n $remaining[] = $container;\n }\n }\n variable_set('forum_containers', $remaining);\n }",
"public function restorePost(Request $request)\n {\n // Delete post id\n $post = PostModel::find($request->id); \n $post->status = $request->status;\n $post->save();\n return response()->json(['message'=>__('posts.restore_post_success_message')]);\n // dd($request);\n }",
"public function restore($restorePosts = true) {\n\t\tself::restoreAll($this->threadID, $restorePosts);\n\t}",
"function restore()\n {\n }",
"function wp_trash_post($post_id = 0)\n {\n }",
"public function restored(ShopBlog $shopBlog)\n {\n //\n }",
"function wp_revisions_to_keep($post)\n {\n }",
"public function restore($id)\n {\n $post = Posts::where('id', $id)->restore();\n if($post){\n session()->flash('success','恢复成功');\n }else{\n session()->flash('danger','恢复失败');\n }\n return redirect()->route('posts.posts.index');\n }",
"public function restored(Edit $edit)\n {\n //\n }",
"public function rollback() {\n if (!$this->changed())\n return;\n\n $this->tags = array('new' => array(), 'del' => array());\n $this->inited = false;\n }",
"public function restored(MenuItem $menuItem)\n {\n //\n }",
"public function restored(Exchange $exchange)\n {\n //\n }",
"public function restore()\n {\n $this->restoreEntrustUserTrait();\n $this->restoreSoftDeletes();\n }",
"public function restore(Customer $customer, Post $post)\n {\n //\n }",
"public function restored(RideShareTransaction $rideShareTransaction)\n {\n //\n }",
"function delivery_featured_content_transient_flusher() {\n\tdelete_transient( 'delivery_featured_posts' );\n}",
"public function trashedPost()\n {\n\n $this->generateSitemap();\n return true;\n\n }",
"public function restore($id){\n $book_to_restore = \\App\\Book::withTrashed()->findOrFail($id);\n\n // jika ada, lakukan restore\n if($book_to_restore){\n $book_to_restore->restore();\n return redirect()->route(\"books.index\")->with(\"status\", \"Book successfully restored\");\n } else {\n return redirect()->route(\"books.index\")->with(\"status\", \"Book is not in trash\");\n }\n }",
"public function unarchive()\n {\n if ($this->canArchive()) {\n\n $this->archived = 0;\n $this->save();\n }\n }",
"public function restoring($model)\n\t{\n\t}",
"function tiny_cache_post_transition( $new_status, $old_status, $post ) {\n\n // Post unpublished or published.\n if ( $old_status !== $new_status\n && ( 'publish' === $old_status || 'publish' === $new_status )\n ) {\n tiny_cache_delete_the_content( $post->ID );\n }\n}",
"function restore_current_blog()\n {\n }",
"public function restored(AppointmentNote $note)\n {\n //\n }",
"public function restoreAction()\n {\n $id = $this->params()->fromRoute('id');\n\n try {\n\n $list = ItemQuery::create()->findPk($id);\n\n if (!$list) throw new RuntimeException(\n \"Item does not exist.\"\n );\n\n $list->setRemoved(false)->save();\n\n $this->flashMessenger()->addSuccessMessage(\n \"Item Restored.\"\n );\n\n } catch (Exception $e) {\n $this->flashMessenger()->addErrorMessage($e->getMessage());\n }\n\n return $this->redirect()->toRoute('item');\n }",
"public static function action_clean_post_cache( $post_id ) {\n\t\t$type = get_post_type( $post_id );\n\t\t// Ignore revisions, which aren't ever displayed on the site.\n\t\tif ( $type && 'revision' === $type ) {\n\t\t\treturn;\n\t\t}\n\t\tpantheon_wp_clear_edge_keys( array( 'post-' . $post_id, 'rest-post-' . $post_id ) );\n\t}",
"function post_restoreItem() {\n\n if ((isset($this->input['_no_history']) && $this->input['_no_history'])\n || (!static::$logs_for_item_1\n && !static::$logs_for_item_2)) {\n return;\n }\n\n if ($this->useDeletedToLockIfDynamic()\n && $this->isDynamic()) {\n $item1 = $this->getConnexityItem(static::$itemtype_1, static::$items_id_1);\n $item2 = $this->getConnexityItem(static::$itemtype_2, static::$items_id_2);\n\n if (($item1 !== false)\n && ($item2 !== false)) {\n if ($item1->dohistory\n && static::$logs_for_item_1) {\n $changes[0] = '0';\n $changes[1] = '';\n $changes[2] = addslashes($this->getHistoryNameForItem1($item2, 'unlock'));\n\n Log::history($item1->getID(), $item1->getType(), $changes, $item2->getType(),\n static::$log_history_1_unlock);\n }\n\n if ($item2->dohistory\n && static::$logs_for_item_2) {\n $changes[0] = '0';\n $changes[1] = '';\n $changes[2] = addslashes($this->getHistoryNameForItem2($item1, 'unlock'));\n Log::history($item2->getID(), $item2->getType(), $changes, $item1->getType(),\n static::$log_history_2_unlock);\n }\n }\n\n }\n }",
"public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }",
"public function recoverysoftdelete($id)\n {\n $post = Post::onlyTrashed()->find($id);\n\n $post->restore();\n \n return $this->indexsoftdelete();\n\n }",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restored(Project $project)\n {\n $translations = Translation::where('project_id', $project->id)->get(['id']);\n\n $dataIds = [];\n\n foreach ($translations as $translation) {\n $dataIds[] = $translation->id;\n }\n\n Archive::onlyTrashed()->whereIn('translation_id', $dataIds)->restore();\n Translation::onlyTrashed()->where('project_id', $project->id)->restore();\n Translation::where('project_id', $project->id)->get()->addToIndex();\n }",
"public function restore($id);",
"public function restore($id);",
"public function restore($id);",
"public function restore($id);",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function undo($id)\n {\n $items = User::onlyTrashed()->where('id',$id); \n $items->restore();\n\n return back();\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Apartment $apartment)\n {\n //\n }",
"public function restoring(Order $Order)\n {\n //code...\n }",
"public function restored(Order $Order)\n {\n //code...\n }",
"public function restore($id)\n {\n PurchaseRequest::withTrashed()->where('id', $id)->restore();\n }",
"public function restored(Testimonials $testimonials)\n {\n //\n }",
"public function backUp()\n {\n $inventory = $this->inventory;\n $this->oldInventory = $inventory;\n return;\n }",
"function remove_single_post() {\n remove_action('thematic_singlepost', 'thematic_single_post');\n}",
"public function restored(Instance $instance)\n {\n //\n }",
"function dokan_store_category_delete_transient( $post_id ) {\n\n $post_tmp = get_post( $post_id );\n $seller_id = $post_tmp->post_author;\n\n //delete store category transient\n delete_transient( 'dokan-store-category-'.$seller_id );\n}",
"function clean_post_cache($post)\n {\n }",
"public function revert();"
] | [
"0.749934",
"0.7450364",
"0.7450364",
"0.6838015",
"0.6838015",
"0.6816885",
"0.6800222",
"0.674118",
"0.6503433",
"0.6496795",
"0.64947575",
"0.6453908",
"0.6439421",
"0.6386067",
"0.638073",
"0.6347891",
"0.63362664",
"0.6304327",
"0.6246267",
"0.62184477",
"0.6179735",
"0.6152681",
"0.61509204",
"0.61430424",
"0.6129113",
"0.6125763",
"0.6123921",
"0.61096686",
"0.6109112",
"0.60199976",
"0.5991922",
"0.5988056",
"0.59573627",
"0.59475726",
"0.5932194",
"0.59268045",
"0.5926762",
"0.59018403",
"0.5882549",
"0.58624125",
"0.5836295",
"0.58104616",
"0.5809646",
"0.57825965",
"0.5773986",
"0.5772822",
"0.5752834",
"0.5750867",
"0.5723004",
"0.5719231",
"0.57017416",
"0.56946254",
"0.56935704",
"0.5662016",
"0.5629648",
"0.5626134",
"0.5623433",
"0.56202066",
"0.5617109",
"0.5609755",
"0.55868554",
"0.55855304",
"0.558513",
"0.55650634",
"0.5563004",
"0.55491436",
"0.5544297",
"0.5536151",
"0.55171376",
"0.5510744",
"0.5507744",
"0.5496016",
"0.54953957",
"0.54916537",
"0.5481402",
"0.5481402",
"0.5479459",
"0.5471449",
"0.5471449",
"0.5471449",
"0.5471449",
"0.5463621",
"0.5463621",
"0.5463621",
"0.5463621",
"0.54450876",
"0.5434216",
"0.5434216",
"0.5434216",
"0.5429951",
"0.5429651",
"0.54286325",
"0.5420899",
"0.53887415",
"0.53881496",
"0.5386336",
"0.53837407",
"0.5372025",
"0.5371988",
"0.5361688"
] | 0.54846776 | 74 |
restore all trashed posts | public function restoretrash() {
$pages = Page::onlyTrashed()->get();
foreach($pages as $page) {
$page->restore();
}
return redirect()->route('admin.pages');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function restoreTrashedItems()\n {\n $trashedItems = Item::onlyTrashed()->get();\n foreach ($trashedItems as $item) {\n $item->restore();\n }\n\n }",
"public function restoreAllTrashed()\n {\n return $this->model->withTrashed()->restore();\n }",
"public function trashed_posts()\n\t{\n\t\t$data['posts'] = $this->common_model->getAllData('blog_post','*','',array('deleted_at !=' => 'Null'));\n\n\t\t$data['page'] = \"blog/trashed_posts\";\n \t$this->template->template_view($data);\t\n\t}",
"public function trashed_post($post_id)\n {\n }",
"public function restored(Post $post)\n {\n //\n }",
"public function restored(Post $post)\n {\n //\n }",
"public function trashed()\n {\n $trashpost = Post::onlyTrashed()->get();\n return view('posts.index')->with('allpost', $trashpost);\n }",
"public function reset_transient() {\n\t\t$transient_type = $this->_get_all_cached_attachment_transient_ids();\n\n\t\tif ( isset( $transient_type ) and gettype( $transient_type ) ) {\n\t\t\tforeach ( $transient_type as $title ) {\n\t\t\t\tdelete_transient( $title );\n\t\t\t} // foreach()\n\t\t} // if()\n\n\t\t$this->posts = $this->get_posts();\n\t}",
"function untrash() {\n try {\n DB::beginWork('Restoring company from a trash @ ' . __CLASS__);\n \n parent::untrash();\n\n $users = Users::findByCompany($this->object, null, STATE_TRASHED);\n if (is_foreachable($users)) {\n foreach ($users as $user) {\n if ($user->getState() == STATE_TRASHED) {\n if ($user instanceof IActivityLogs) {\n $user->activityLogs()->gag();\n } // if\n $user->state()->untrash();\n } // if\n } // foreach\n } // if\n\n AngieApplication::cache()->removeByModel('users');\n \n DB::commit('Company restored from a trash @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to restore company from trash @ ' . __CLASS__);\n \n throw $e;\n } // try\n }",
"public function getMyTrashedPosts()\n {\n return $this->posts()\n ->onlyTrashed()\n ->get();\n }",
"public function restore($restorePosts = true) {\n\t\tself::restoreAll($this->threadID, $restorePosts);\n\t}",
"public function trashed() {\n $editors = Editor::onlyTrashed()->get();\n\n return view('user.posts.trash')->with('posts', $posts);\n }",
"public function withTrashed();",
"public function restored(BlogPost $modelsBlogPost)\n {\n //\n }",
"public function trashed()\n {\n $postss = post::onlyTrashed()->get();\n \n return view('post.softdelete') -> with('posted' , $postss);\n }",
"public function postRollback() {\n $containers = variable_get('forum_containers', array());\n $remaining = array();\n foreach ($containers as $container) {\n if (!in_array($container, $this->deletedContainers) && !in_array($container, $remaining)) {\n $remaining[] = $container;\n }\n }\n variable_set('forum_containers', $remaining);\n }",
"function _untrashed_post($post_id){\n \n if(get_post_type($post_id) !== $this->post_type)\n return;\n \n $this->_save_post($post_id);\n $this->untrashed_post($post_id);\n \n }",
"public function restored(Post $post)\n {\n $post->recordActivity('restored');\n }",
"public function restore($id)\n {\n // Restoring post (deleted_at = null)\n $post = Post::where('id', $id)->restore();\n //deleting the reports for that post\n $post = Post::find($id)->usersReports()->detach();\n }",
"public function onlyTrashed();",
"public function restored(BlogPost $blogPost)\n\t{\n\t\t//\n\t}",
"public function restore()\n {\n $this->restoreEntrustUserTrait();\n $this->restoreSoftDeletes();\n }",
"public function restoreOneTrashed($id)\n {\n return $this->model->where('id', $id)->restore();\n }",
"public function untrashed_post($post_id)\n {\n }",
"public function restored(AssignmentSubmitted $as) {\n Messages::onlyTrashed()->where('id', $as->message_id)->restore();\n }",
"public function trash_changeset_post($post)\n {\n }",
"public function rollback() {\n if (!$this->changed())\n return;\n\n $this->tags = array('new' => array(), 'del' => array());\n $this->inited = false;\n }",
"function delivery_featured_content_transient_flusher() {\n\tdelete_transient( 'delivery_featured_posts' );\n}",
"public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }",
"function wp_untrash_post($post_id = 0)\n {\n }",
"function trashed_post($post_id){\n \n $name = $this->get_name($post_id);\n \n // Get ACFE option\n $settings = acfe_get_settings($this->settings);\n \n // Unset ACFE option\n acfe_unset($settings, $name);\n \n // Update ACFE option\n acfe_update_settings($this->settings, $settings);\n \n }",
"public function restore()\n {\n //Query Builder\n DB::table('users')->delete();\n DB::table('respuestas')->delete();\n \n echo \"Realizado\";\n }",
"public function restoring(Post $post)\n {\n //-- we restore comments and picture before restore post\n\n $post->comments()->restore();\n $post->picture()->restore();\n }",
"public function recovery($id){\n $delete = Category::withTrashed()->find($id)->restore();\n }",
"function wp_delete_all_temp_backups()\n {\n }",
"public function dump( $args = array(), $assoc_args = array() ) {\n\n\t\tglobal $wpdb;\n\t\t$revs = $wpdb->get_var( \"SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'revision'\" );\n\n\t\tif ( $revs < 1 ) {\n\t\t\tWP_CLI::success( 'No revisions.' );\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::confirm( sprintf( 'Remove all %d revisions?', $revs ), $assoc_args );\n\n\t\tif ( isset( $assoc_args['hard'] ) ) {\n\t\t\tWP_CLI::run_command( array( 'revisions', 'clean', -1 ), array( 'hard' => '' ) );\n\t\t\treturn;\n\t\t}\n\n\t\t$wpdb->query( \"DELETE FROM $wpdb->posts WHERE post_type = 'revision'\" );\n\n\t\t// @todo: Are there caches to clear?\n\n\t\tWP_CLI::success( 'Finished removing all revisions.' );\n\n\t}",
"public function restore() {}",
"public function purgeUndoTable()\n\t{\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Truncate the table\n\t\t$objDatabase->execute(\"TRUNCATE TABLE tl_undo\");\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the undo table', __METHOD__, TL_CRON);\n\t}",
"public function restore();",
"public function trashedPost()\n {\n\n $this->generateSitemap();\n return true;\n\n }",
"public function restored(Project $project)\n {\n $translations = Translation::where('project_id', $project->id)->get(['id']);\n\n $dataIds = [];\n\n foreach ($translations as $translation) {\n $dataIds[] = $translation->id;\n }\n\n Archive::onlyTrashed()->whereIn('translation_id', $dataIds)->restore();\n Translation::onlyTrashed()->where('project_id', $project->id)->restore();\n Translation::where('project_id', $project->id)->get()->addToIndex();\n }",
"public function emptytrash() {\n $pages = Page::onlyTrashed()->get(); \n foreach($pages as $page) {\n $page->slug->delete();\n $page->forceDelete();\n }\n return redirect()->route('admin.pages.trash');\n }",
"public static function restoreAll($threadIDs, $restorePosts = true) {\n\t\tif (empty($threadIDs)) return;\n\t\t\n\t\t// restore thread\n\t\t$sql = \"UPDATE \twbb\".WBB_N.\"_thread\n\t\t\tSET\tisDeleted = 0\n\t\t\tWHERE \tthreadID IN (\".$threadIDs.\")\";\n\t\tWCF::getDB()->sendQuery($sql);\n\t\t\n\t\t// restore post\t\n\t\tif ($restorePosts) {\n\t\t\tPostEditor::restoreAll(self::getAllPostIDs($threadIDs));\n\t\t}\n\t}",
"protected static function restore() {}",
"function remove_unpublished_posts($post_ID_query){\n\tglobal $wpdb;\n\t$date_object = count($post_ID_query);\n\t\n\t//build query to find is posts within the results are not published\n\t$post_query .= \"SELECT ID FROM $wpdb->posts WHERE post_status != 'publish' AND (\";\n\tfor($i=0; $i<$date_object;$i++){\n\t\t$current_object = $post_ID_query[$i];\n\t\t$post_query .= \"ID='$current_object->post_id'\";\n\t\tif ($i<($date_object-1)){//add or at the end of each query, expect the last one\n\t\t\t$post_query .= \" OR \";\n\t\t} else{\n\t\t\t$post_query .= \");\";\n\t\t}\n\t}\n\t$trashed_post_id = $wpdb->get_results($post_query);\n\t//make array of id's of trashed posts\n\t$trashed_post_id = get_just_post_ids($trashed_post_id);\n\t//cycle though results or date query, unsetting trashed id's\n\tif (is_array($trashed_post_id)){//check to see $trashed_post_id has results\n\t\tforeach($post_ID_query as $key=>$post){\n\t\t\t//is post id in trashed list?\n\t\t\n\t\t\tif(in_array($post->post_id,$trashed_post_id)){\n\t\t\t\tunset($post_ID_query[$key]);\n\t\t\t}\n\t\t}\n\t} \n\treturn $post_ID_query;\n}",
"public function recoverysoftdelete($id)\n {\n $post = Post::onlyTrashed()->find($id);\n\n $post->restore();\n \n return $this->indexsoftdelete();\n\n }",
"public function removeAllRelatedPosts() {}",
"function restore_current_blog()\n {\n }",
"private function flush_transients() {\n\n $wpp_transients = get_option( 'wpp_transients' );\n\n if ( $wpp_transients && is_array( $wpp_transients ) && !empty( $wpp_transients ) ) {\n\n for ( $t=0; $t < count( $wpp_transients ); $t++ )\n delete_transient( $wpp_transients[$t] );\n\n update_option( 'wpp_transients', array() );\n\n }\n\n }",
"public function dump( $args = array(), $assoc_args = array() ) {\n\n\t\tglobal $wpdb;\n\t\t$revs = $wpdb->get_var( \"SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'revision'\" ); // phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery,WordPress.VIP.DirectDatabaseQuery.NoCaching\n\n\t\tif ( $revs < 1 ) {\n\t\t\tWP_CLI::success( 'No revisions.' );\n\t\t\treturn;\n\t\t}\n\n\t\tWP_CLI::confirm( sprintf( 'Remove all %d revisions?', $revs ), $assoc_args );\n\n\t\tif ( isset( $assoc_args['hard'] ) ) {\n\t\t\tWP_CLI::run_command( array( 'revisions', 'clean', -1 ), array( 'hard' => '' ) );\n\t\t\treturn;\n\t\t}\n\n\t\t$wpdb->query( \"DELETE FROM $wpdb->posts WHERE post_type = 'revision'\" ); // phpcs:ignore WordPress.VIP.DirectDatabaseQuery.DirectQuery,WordPress.VIP.DirectDatabaseQuery.NoCaching\n\n\t\tWP_CLI::success( 'Finished removing all revisions.' );\n\n\t}",
"public function restored(Exchange $exchange)\n {\n //\n }",
"public function removeAllPosts() {}",
"public function handleTrashedPost($postId)\n {\n $this->deletePost($postId);\n }",
"function trash() {\n $this->wireframe->current_menu_item = 'trash';\n\n if(!$this->logged_user->isAdministrator() && !$this->logged_user->getSystemPermission('manage_trash')) {\n $this->httpError(HTTP_ERR_FORBIDDEN);\n } // if\n\n if($this->request->isSubmitted()) {\n $action = $this->request->post('action');\n if(!in_array($action, array('restore', 'delete'))) {\n $this->httpError(HTTP_ERR_BAD_REQUEST, 'Invalid action');\n } // if\n\n $object_ids = $this->request->post('objects');\n $objects = ProjectObjects::findByIds($object_ids, STATE_DELETED, VISIBILITY_PRIVATE);\n\n db_begin_work();\n foreach($objects as $object) {\n if($action == 'restore') {\n $object->restoreFromTrash();\n } else {\n $object->delete();\n } // if\n } // foreach\n db_commit();\n } // if\n\n $per_page = 30;\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n\n list($objects, $pagination) = ProjectObjects::paginateTrashed($this->logged_user, $page, $per_page);\n \t$this->smarty->assign(array(\n \t 'objects' => $objects,\n \t 'pagination' => $pagination,\n \t));\n\n \tif(is_foreachable($objects)) {\n \t $this->wireframe->addPageAction(lang('Empty Trash'), assemble_url('trash_empty'), null, array(\n \t 'method' => 'post',\n \t 'confirm' => lang('Are you sure that you want to empty trash?'),\n \t ));\n \t} // if\n }",
"public function restored(ShopBlog $shopBlog)\n {\n //\n }",
"protected function rollbackToSavePoint(): void\n {\n foreach ($this->getActiveConnections() as $connection) {\n try {\n while ($connection->isTransactionActive()) {\n $connection->rollBack();\n }\n } catch (\\Exception $e) {\n }\n }\n }",
"public function restored(Replies $replies)\n {\n //\n }",
"function _trashed_post($post_id){\n \n if(get_post_type($post_id) !== $this->post_type)\n return;\n \n $this->trashed_post($post_id);\n \n }",
"public function restored(Ticket $ticket)\n {\n //\n }",
"protected function discardUndo()\n\t{\n\t\t$this->undoArray = array();\n\t}",
"public function restore()\n {\n //\n }",
"public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }",
"private function undo_cleanup_actions() {\n global $db;\n $elements_locked = array();\n $undo_nodes = $db->fetch_table(\"SELECT * FROM `\".$this->table.\"_undo` ORDER BY ID_UNDO DESC\");\n for ($i = 0; $i < count($undo_nodes); $i++) {\n $node = $undo_nodes[$i];\n foreach ($elements_locked as $id => $lock) {\n if (($node[\"FK_PARENT\"] == $id) ||\n (!$this->element_read($id)) ||\n ($this->element_is_child($node[\"FK_PARENT\"], $id)) ||\n ($this->element_is_child($node[\"FK_PARENT_PREV\"], $id))) {\n $db->querynow(\"DELETE FROM `\".$this->table.\"_undo` WHERE ID_UNDO=\".$node[\"ID_UNDO\"]);\n }\n }\n if ($node[\"ACTION\"] == \"MOVE\") {\n // Element wurde verschoben\n $elements_locked[$node[\"FK_PARENT\"]] = true;\n $elements_locked[$node[\"FK_PARENT_PREV\"]] = true;\n }\n }\n }",
"public function restoretrashed($id)\n {\n $page = Page::onlyTrashed()->findOrFail($id);\n $page->restore();\n return redirect()->route('admin.pages.trash');\n }",
"public function clearPostIndexs()\n\t{\n\t\t$this->collPostIndexs = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"function trash($trash_already_trashed = false) {\n try {\n DB::beginWork('Moving company to trash @ ' . __CLASS__);\n \n parent::trash($trash_already_trashed);\n\n $users = Users::findByCompany($this->object, null, STATE_ARCHIVED);\n if (is_foreachable($users)) {\n foreach ($users as $user) {\n if ($user instanceof IActivityLogs) {\n $user->activityLogs()->gag();\n } // if\n $user->state()->trash(true);\n } // foreach\n } // if\n\n AngieApplication::cache()->removeByModel('users');\n \n DB::commit('Company moved to trash @ ' . __CLASS__);\n } catch(Exception $e) {\n DB::rollback('Failed to move company to trash @ ' . __CLASS__);\n \n throw $e;\n } // try\n }",
"public function onlyTrashed()\n {\n $this->trashed = 'only';\n\n return $this;\n }",
"function undelete_posts()\r\n\t{\r\n\t\tglobal $auth, $config, $db, $phpbb_root_path, $phpEx, $user;\r\n\r\n\t\tif (sizeof($this->undelete['p']))\r\n\t\t{\r\n\t\t\t$sql_data = array(\r\n\t\t\t\t'post_deleted'\t\t\t=> 0,\r\n\t\t\t\t'post_deleted_time'\t\t=> 0,\r\n\t\t\t);\r\n\t\t\t$sql = 'UPDATE ' . POSTS_TABLE . '\r\n\t\t\t\tSET ' . $db->sql_build_array('UPDATE', $sql_data) . '\r\n\t\t\t\t\tWHERE ' . $db->sql_in_set('post_id', $this->undelete['p']);\r\n\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t// Add the post info to the search index since we are undeleting it\r\n\t\t\t$this->update_search_index($this->undelete['p'], false);\r\n\r\n\t\t\tforeach ($this->undelete['p'] as $id)\r\n\t\t\t{\r\n\t\t\t\t$topic_id = intval($this->post_data[$id]['topic_id']);\r\n\t\t\t\t$forum_id = intval($this->post_data[$id]['forum_id']);\r\n\r\n\t\t\t\t// Update the first/last topic info if we must\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_deleted'] != 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Since the topic was deleted, undelete it\r\n\t\t\t\t\t$this->undelete['t'][] = $topic_id;\r\n\r\n\t\t\t\t\tif ($this->topic_data[$topic_id]['topic_poster'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_UNDELETE_TOPIC', $this->topic_data[$topic_id]['topic_title']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($this->post_data[$id]['poster_id'] != $user->data['user_id'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tadd_log('mod', $forum_id, $topic_id, 'LOG_UNDELETE_POST', $this->post_data[$id]['post_subject']);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_first_post_id'] > $id)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->update_first_post_topic($topic_id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_last_post_id'] < $id)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->update_last_post_topic($topic_id);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count - 1\r\n\t\t\t\t\t\tWHERE topic_id = ' . $topic_id;\r\n\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t$this->topic_data[$topic_id]['topic_deleted_reply_count']--;\r\n\r\n\t\t\t\t// If there is a shadow topic, we will update it too.\r\n\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = 'UPDATE ' . TOPICS_TABLE . '\r\n\t\t\t\t\t\tSET topic_deleted_reply_count = topic_deleted_reply_count - 1\r\n\t\t\t\t\t\t\tWHERE topic_id = ' . intval($this->shadow_topic_ids[$topic_id]);\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\r\n\t\t\t\t\t$this->topic_data[$this->shadow_topic_ids[$topic_id]]['topic_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If the topic is a global announcement, do not attempt to do any updates to forums\r\n\t\t\t\tif ($this->topic_data[$topic_id]['topic_type'] != POST_GLOBAL)\r\n\t\t\t\t{\r\n\t\t\t\t\t// Update the last post info for the forum if we must\r\n\t\t\t\t\tif ($this->forum_data[$forum_id]['forum_last_post_id'] < $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->update_last_post_forum($forum_id);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (array_key_exists($topic_id, $this->shadow_topic_ids))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($this->forum_data[$this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']]['forum_last_post_id'] == $id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->update_last_post_forum($this->topic_data[$this->shadow_topic_ids[$topic_id]]['forum_id']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$sql = 'UPDATE ' . FORUMS_TABLE . '\r\n\t\t\t\t\t\tSET forum_deleted_reply_count = forum_deleted_reply_count - 1\r\n\t\t\t\t\t\t\tWHERE forum_id = ' . $forum_id;\r\n\t\t\t\t\t$db->sql_query($sql);\r\n\t\t\t\t\t$this->forum_data[$forum_id]['forum_deleted_reply_count']--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Undelete the topics\r\n\t\t\t$this->undelete_topics();\r\n\t\t}\r\n\t}",
"public function getTrashed()\n {\n return $this->model->onlyTrashed()->get();\n }",
"public function unarchive()\n {\n if ($this->canArchive()) {\n\n $this->archived = 0;\n $this->save();\n }\n }",
"public function rollback()\n\t{\n\t\tforeach($this->subformArr as $key => $sf) $sf->rollback();\n\t}",
"public function undo($id)\n {\n $items = User::onlyTrashed()->where('id',$id); \n $items->restore();\n\n return back();\n }",
"public static function action_clean_post_cache( $post_id ) {\n\t\t$type = get_post_type( $post_id );\n\t\t// Ignore revisions, which aren't ever displayed on the site.\n\t\tif ( $type && 'revision' === $type ) {\n\t\t\treturn;\n\t\t}\n\t\tpantheon_wp_clear_edge_keys( array( 'post-' . $post_id, 'rest-post-' . $post_id ) );\n\t}",
"public function trash($trashPosts = true, $reason = '') {\n\t\tself::trashAll($this->threadID, $trashPosts, $reason);\n\t}",
"function wp_revisions_to_keep($post)\n {\n }",
"public function down()\n {\n $this->table('contents')->drop()->save();\n }",
"public function restored(Testimonials $testimonials)\n {\n //\n }",
"public function restore()\n {\n }",
"function wp_reset_postdata()\n {\n }",
"function restore()\n {\n }",
"public function trash()\n {\n $posts = Posts::onlyTrashed()->orderBy('created_at', 'desc')->paginate(10);\n return view('admin.posts.post.trash',compact('posts'));\n }",
"public function deleteTrash()\n {\n $currentTime = time();\n foreach (self::$cacheData as $key => $item) {\n if ($currentTime >= ($item['time'] + $item['ttl'])) {\n unset(self::$cacheData[$key]);\n }\n }\n }",
"public function rollback()\n {\n // my code\n $by = 'id';\n $order = 'desc';\n $eventMessages = CEventMessage::GetList($by, $order, ['TYPE' => self::EVENT_TYPE]);\n $eventMessage = new CEventMessage;\n while ($template = $eventMessages->Fetch()) {\n $eventMessage->Delete((int)$template['ID']);\n }\n CEventType::Delete(self::EVENT_TYPE);\n }",
"public function withoutTrashed()\n {\n $this->trashed = false;\n\n return $this;\n }",
"public function revert();",
"private function rollback() {\n\t\tEE::warning( 'Exiting gracefully after rolling back. This may take some time.' );\n\t\tif ( $this->level > 0 ) {\n\t\t\t$this->delete_site();\n\t\t}\n\t\tEE::success( 'Rollback complete. Exiting now.' );\n\t\texit;\n\t}",
"function wprss_feed_reset() {\n wp_schedule_single_event( time(), 'wprss_delete_all_feed_items_hook' );\n\t\tset_transient( WPRSS_TRANSIENT_NAME_IS_REIMPORTING, true );\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function do_batch() {\n\t\t$post_ids = array_map( 'intval', $this->get_post_ids() );\n\t\tforeach( $post_ids as $post_to_delete ) {\n\t\t\tadd_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t\twp_delete_post( $post_to_delete, true );\n\t\t\tremove_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t}\n\n\t\t$this->deleted_posts = count( $post_ids );\n\t}",
"function DNUI_restore_backup($ids) {\r\n global $wpdb;\r\n $basePlugin = plugin_dir_path(__FILE__) . '../backup/';\r\n\r\n foreach ($ids as $id) {\r\n $backFiles = DNUI_scan_dir($basePlugin . $id[\"backup\"] . '/', 1);\r\n $fileImages = preg_grep(\"/^(?!.*\\.backup)/\", $backFiles);\r\n $fileBackup =preg_grep(\"/^(.*\\.backup)/\", $backFiles);\r\n $fileBackup = $basePlugin . $id[\"backup\"] . '/' . array_pop($fileBackup);\r\n //var_dump($fileBackup);\r\n $backupInfo = unserialize(file_get_contents($fileBackup));\r\n foreach ($backupInfo[\"posts\"] as $posts) {\r\n $wpdb->replace($wpdb->prefix . \"posts\", $posts);\r\n }\r\n foreach ($backupInfo[\"postMeta\"] as $postMeta) {\r\n $wpdb->replace($wpdb->prefix . \"postmeta\", $postMeta);\r\n }\r\n\r\n foreach ($fileImages as $image) {\r\n rename($basePlugin . $id[\"backup\"] . '/' . $image, $backupInfo[\"dirBase\"] . $image);\r\n }\r\n DNUI_delete_backup($id);\r\n }\r\n \r\n}",
"public function restored(Article $article)\n {\n //\n }",
"public function _tearDown()\n {\n global $wpdb, $wp_query, $wp;\n\n if (empty($wpdb) || !$wpdb instanceof wpdb) {\n return;\n }\n\n $wpdb->query('ROLLBACK');\n if (is_multisite()) {\n while (ms_is_switched()) {\n restore_current_blog();\n }\n }\n $wp_query = new WP_Query();\n $wp = new WP();\n\n // Reset globals related to the post loop and `setup_postdata()`.\n $post_globals = array(\n 'post',\n 'id',\n 'authordata',\n 'currentday',\n 'currentmonth',\n 'page',\n 'pages',\n 'multipage',\n 'more',\n 'numpages'\n );\n foreach ($post_globals as $global) {\n $GLOBALS[$global] = null;\n }\n\n remove_theme_support('html5');\n remove_filter('query', array($this, '_create_temporary_tables'));\n remove_filter('query', array($this, '_drop_temporary_tables'));\n remove_filter('wp_die_handler', array($this, 'get_wp_die_handler'));\n $this->_restore_hooks();\n wp_set_current_user(0);\n $this->requestTimeTearDown();\n }",
"private function delete_all_transients() {\n\t\t$this->transients->delete( 'googlesitekit_verification_meta_tags' );\n\t}",
"function undo()\n {\n $this->document->eraseLast();\n }",
"public function restore() {\n self::restoreAll($this->chapterID);\n }",
"public function unpublish_expired_posts() {\n $expired_posts = $this->get_expired_posts();\n foreach ( $expired_posts as $expired_post ) {\n // Only automatically unpublish if the corresponding option is enabled for this post\n if ( $expired_post->bbx_best_before_unpublish_when_expired ) {\n // Set post to draft\n wp_update_post(\n array(\n 'ID' => $expired_post->ID,\n 'post_status' => 'draft'\n )\n );\n }\n }\n }",
"public function reset()\n {\n $this->getDb()->exec('delete from media');\n //pictures and vignettes deletion\n $this->deleteMedias();\n //backup deletion\n $this->deleteBackup();\n }"
] | [
"0.793516",
"0.78645676",
"0.75180626",
"0.7009122",
"0.69669116",
"0.69669116",
"0.6661088",
"0.66356534",
"0.66042733",
"0.65506727",
"0.6523616",
"0.64810157",
"0.64680654",
"0.6456855",
"0.6449989",
"0.6444507",
"0.63709474",
"0.6336842",
"0.62940454",
"0.6223377",
"0.6210339",
"0.61437243",
"0.6139168",
"0.61290133",
"0.6068396",
"0.60481364",
"0.60339177",
"0.6022608",
"0.59976476",
"0.5989514",
"0.59771883",
"0.59716356",
"0.59511113",
"0.5931376",
"0.5921745",
"0.5909184",
"0.58895004",
"0.5864379",
"0.5858255",
"0.5854678",
"0.5852355",
"0.58216286",
"0.581287",
"0.5805374",
"0.57899964",
"0.57894534",
"0.57894415",
"0.5760782",
"0.5759637",
"0.57573265",
"0.57430935",
"0.57309484",
"0.57278043",
"0.57226664",
"0.56998366",
"0.5682523",
"0.56763405",
"0.5668742",
"0.5653835",
"0.5652046",
"0.5638724",
"0.56293356",
"0.5627478",
"0.5605801",
"0.55908924",
"0.55869347",
"0.55865324",
"0.55851805",
"0.5584648",
"0.5574619",
"0.5572385",
"0.55716944",
"0.555867",
"0.55584484",
"0.5548716",
"0.5537863",
"0.5526476",
"0.55185986",
"0.55139816",
"0.55115175",
"0.5504588",
"0.55042434",
"0.549253",
"0.5490144",
"0.5486305",
"0.54815894",
"0.54791105",
"0.54642415",
"0.54642415",
"0.54642415",
"0.54642415",
"0.5462212",
"0.5457323",
"0.5454916",
"0.5445926",
"0.5439854",
"0.54386145",
"0.5436327",
"0.5431109",
"0.54271436"
] | 0.7240323 | 3 |
Find rate based on location and calendar? (//TODO) | public function getRuleAttribute(){
$pickupZipcode = $this->pickup_address_zipcode;
$rule = \App\Rule::whereHas('locations', function($query) use($pickupZipcode){
$query->where('zipcode',$pickupZipcode);
})->first();
return $rule;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhood;\n\t\t\n\t\t// And the rate itself.\n\t\t$rate = getCrimeRate($force, $neighbourhood, \"drugs\");\n\t\t\n\t\treturn $rate;\n\t\t}",
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhood;\n\t\t\n\t\t// And the rate itself.\n\t\t$rate = getCrimeRate($force, $neighbourhood, \"burglary\");\n\t\t\n\t\treturn $rate;\n\t\t}",
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhood;\n\t\t\n\t\t// And the rate itself.\n\t\t$rate = getCrimeRate($force, $neighbourhood, \"all-crime\");\n\t\t\n\t\treturn $rate;\n\t\t}",
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhood;\n\t\t\n\t\t// And the rate itself.\n\t\t$rate = getCrimeRate($force, $neighbourhood, \"violent-crime\");\n\t\t\n\t\treturn $rate;\n\t\t}",
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhood;\n\t\t\n\t\t// And the rate itself.\n\t\t$rate = getCrimeRate($force, $neighbourhood, \"criminal-damage-arson\");\n\t\t\n\t\treturn $rate;\n\t\t}",
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhood;\n\t\t\n\t\t// And the rate itself.\n\t\t$rate = getCrimeRate($force, $neighbourhood, \"anti-social-behaviour\");\n\t\t\n\t\treturn $rate;\n\t\t}",
"public function get_result($db, $location) {\n\t\t$lat = $location['lat'];\n\t\t$lng = $location['lng'];\n\t\t\n\t\t// Get the API-format force and neighbourhood IDs.\n\t\t$forceAndNhoodObj = getForceAndNhood($lat, $lng);\n\t\t$force = $forceAndNhoodObj->force;\n\t\t$neighbourhood = $forceAndNhoodObj->neighbourhood;\n\t\t\n\t\t// And the rate itself.\n\t\t$rate = getCrimeRate($force, $neighbourhood, \"public-disorder-weapons\");\n\t\t\n\t\treturn $rate;\n\t\t}",
"function it_finds_the_lowest_base_monthly_rate_in_the_absence_of_other_rates()\n {\n // daily rate - 10\n // daily rate - 10\n $baseRate = new Rate(null, Price::fromString('10', Currency::fromString('EUR')), 1);\n $equipment = new Equipment('Jack Hammer', $baseRate);\n $rentalPeriod = RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1);\n $rentalQuery = new RentalQuery($equipment, $rentalPeriod);\n\n // weekly rate - 60\n $weekPrice = Price::fromString('65', Currency::fromString('EUR'));\n $equipment->addRate(null, $weekPrice, 7);\n\n // 3 weekly + 5 daily = 250\n // monthly rate = 240\n $monthPrice = Price::fromString('240', Currency::fromString('EUR'));\n $equipment->addRate(null, $monthPrice, 30);\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($monthPrice);\n }",
"public function getRate(Currency $currency);",
"public static function get_rate_all($today) {\n\t\t$today = date_create($today);\n\t\t$year = date_format($today, 'Y');\n\t\t$month = date_format($today, 'm');\n\t\t$date = date_format($today, 'd');\n\t\t// get week\n\t\t$book_rate = BooksRateStatisticQModel::get_book_rate_all($date, $month, $year);\n\t\tif ($book_rate == null) {\n\t\t\t$week = null;\n\t\t} else {\n\t\t\t$week = $book_rate->week;\n\t\t}\n\t\t// dd($week);\n\t\t$data['sum']\t\t\t= [];\n\t\t$data['sum']['day']\t\t= [];\n\t\t$data['sum']['week']\t= [];\n\t\t$data['sum']['month']\t= [];\n\t\t$data['sum']['season']\t= [];\n\t\t$data['sum']['year']\t= [];\n\t\t// get view day all\n\t\tfor ($i = 0; $i < 7; $i++) { \n\t\t\t$data['sum']['day'][$i] = [];\n\t\t\t// j is rate point\n\t\t\t$data['sum']['day'][$i][0] = 0;\n\t\t\tfor ($j = 1; $j <= 5; $j++) { \n\t\t\t\t$data['sum']['day'][$i][$j] = BooksRateStatisticQModel::get_book_rate_day_all($i,$week, $month, $year, $j);\n\t\t\t\tif ($data['sum']['day'][$i][$j] == null) {\n\t\t\t\t\t$data['sum']['day'][$i][$j] = $data['sum']['day'][$i][$j-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$data['sum']['day'][$i][$j] = (int)$data['sum']['day'][$i][$j]->rate + $data['sum']['day'][$i][$j-1];\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t// get view week all\n\t\tfor ($i = 0; $i < 5; $i++) { \n\t\t\t$data['sum']['week'][$i] = [];\n\t\t\t// j is rate point\n\t\t\t$data['sum']['week'][$i][0] = 0;\n\t\t\tfor ($j = 1; $j <= 5; $j++) { \n\t\t\t\t$data['sum']['week'][$i][$j] = BooksRateStatisticQModel::get_book_rate_week_all($i, $month, $year, $j);\n\t\t\t\tif ($data['sum']['week'][$i][$j] == null) {\n\t\t\t\t\t$data['sum']['week'][$i][$j] = $data['sum']['week'][$i][$j-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$data['sum']['week'][$i][$j] = (int)$data['sum']['week'][$i][$j]->rate + $data['sum']['week'][$i][$j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// get view month all\n\t\tfor ($i = 1; $i <= 12; $i++) { \n\t\t\t$data['sum']['month'][$i] = [];\n\t\t\t// j is rate point\n\t\t\t$data['sum']['month'][$i][0] = 0;\n\t\t\tfor ($j = 1; $j <= 5; $j++) { \n\t\t\t\t$data['sum']['month'][$i][$j] = BooksRateStatisticQModel::get_book_rate_month_all($i, $year, $j);\n\t\t\t\tif ($data['sum']['month'][$i][$j] == null) {\n\t\t\t\t\t$data['sum']['month'][$i][$j] = $data['sum']['month'][$i][$j-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$data['sum']['month'][$i][$j] = (int)$data['sum']['month'][$i][$j]->rate + $data['sum']['month'][$i][$j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// get view season all\n\t\tfor ($i = 1; $i <= 4; $i++) { \n\t\t\t$data['sum']['season'][$i] = [];\n\t\t\t// j is rate point\n\t\t\t$data['sum']['season'][$i][0] = 0;\n\t\t\tfor ($j = 1; $j <= 5; $j++) { \n\t\t\t\t$data['sum']['season'][$i][$j] = BooksRateStatisticQModel::get_book_rate_season_all($i, $year, $j);\n\t\t\t\tif ($data['sum']['season'][$i][$j] == null) {\n\t\t\t\t\t$data['sum']['season'][$i][$j] = $data['sum']['season'][$i][$j-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$data['sum']['season'][$i][$j] = (int)$data['sum']['season'][$i][$j]->rate + $data['sum']['season'][$i][$j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// get view year all\n\t\tfor ($i = 0; $i < 8; $i++) { \n\t\t\t$data['sum']['year'][$i] = [];\n\t\t\t// j is rate point\n\t\t\t$data['sum']['year'][$i][0] = 0;\n\t\t\tfor ($j = 1; $j <= 5; $j++) { \n\t\t\t\t$data['sum']['year'][$i][$j] = BooksRateStatisticQModel::get_book_rate_year_all($i+2012, $j);\n\t\t\t\tif ($data['sum']['year'][$i][$j] == null) {\n\t\t\t\t\t$data['sum']['year'][$i][$j] = $data['sum']['year'][$i][$j-1];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$data['sum']['year'][$i][$j] = (int)$data['sum']['year'][$i][$j]->rate + $data['sum']['year'][$i][$j-1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// get data percent\n\t\t$data['percent']\t\t\t= [];\n\t\t$data['percent']['day']\t\t= [];\n\t\t$data['percent']['week']\t= [];\n\t\t$data['percent']['month']\t= [];\n\t\t$data['percent']['season']\t= [];\n\t\t$data['percent']['year']\t= [];\n\t\t// dd($data);\n\t\t// day\n\t\tforeach ($data['sum']['day'] as $key => $day) {\n\t\t\t$sum = 0;\n\t\t\t$data['percent']['day'][$key] = [];\n\t\t\tforeach ($day as $star => $number) {\n\t\t\t\t\n\t\t\t\t$data['percent']['day'][$key][$star] = $sum + $number;\n\n\t\t\t\t$sum += $number;\n\t\t\t}\n\t\t\tforeach ($day as $star => $number) {\n\t\t\t\tif ($sum != 0) {\n\t\t\t\t\t$value = $data['percent']['day'][$key][$star];\n\t\t\t\t\t$max = $data['percent']['day'][$key][5];\n\t\t\t\t\t$data['percent']['day'][$key][$star] = ($value / $max) * 100;\n\t\t\t\t} else {\n\t\t\t\t\tif ($star != 0)\n\t\t\t\t\t\t$data['percent']['day'][$key][$star] = 20 * $star;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// week\n\t\tforeach ($data['sum']['week'] as $key => $week) {\n\t\t\t$sum = 0;\n\t\t\t$data['percent']['week'][$key] = [];\n\t\t\tforeach ($week as $star => $number) {\n\t\t\t\t\n\t\t\t\t$data['percent']['week'][$key][$star] = $sum + $number;\n\n\t\t\t\t$sum += $number;\n\t\t\t}\n\t\t\tforeach ($week as $star => $number) {\n\t\t\t\t\n\t\t\t\tif ($sum != 0) {\n\t\t\t\t\t$value = $data['percent']['week'][$key][$star];\n\t\t\t\t\t$max = $data['percent']['week'][$key][5];\n\t\t\t\t\t$data['percent']['week'][$key][$star] = ($value / $max) * 100;\n\t\t\t\t} else {\n\t\t\t\t\tif ($star != 0)\n\t\t\t\t\t\t$data['percent']['week'][$key][$star] = 20 * $star;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// month\n\t\tforeach ($data['sum']['month'] as $key => $month) {\n\t\t\t$sum = 0;\n\t\t\t$data['percent']['month'][$key] = [];\n\t\t\tforeach ($month as $star => $number) {\n\t\t\t\t\n\t\t\t\t$data['percent']['month'][$key][$star] = $sum + $number;\n\n\t\t\t\t$sum += $number;\n\t\t\t}\n\t\t\tforeach ($month as $star => $number) {\n\t\t\t\tif ($sum != 0) {\n\t\t\t\t\t$value = $data['percent']['month'][$key][$star];\n\t\t\t\t\t$max = $data['percent']['month'][$key][5];\n\t\t\t\t\t$data['percent']['month'][$key][$star] = ($value / $max) * 100;\n\t\t\t\t} else {\n\t\t\t\t\tif ($star != 0)\n\t\t\t\t\t\t$data['percent']['month'][$key][$star] = 20 * $star;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// season\n\t\tforeach ($data['sum']['season'] as $key => $season) {\n\t\t\t$sum = 0;\n\t\t\t$data['percent']['season'][$key] = [];\n\t\t\tforeach ($season as $star => $number) {\n\t\t\t\t\n\t\t\t\t$data['percent']['season'][$key][$star] = $sum + $number;\n\n\t\t\t\t$sum += $number;\n\t\t\t}\n\t\t\tforeach ($season as $star => $number) {\n\t\t\t\tif ($sum != 0) {\n\t\t\t\t\t$value = $data['percent']['season'][$key][$star];\n\t\t\t\t\t$max = $data['percent']['season'][$key][5];\n\t\t\t\t\t$data['percent']['season'][$key][$star] = ($value / $max) * 100;\n\t\t\t\t} else {\n\t\t\t\t\tif ($star != 0)\n\t\t\t\t\t\t$data['percent']['season'][$key][$star] = 20 * $star;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// year\n\t\tforeach ($data['sum']['year'] as $key => $year) {\n\t\t\t$sum = 0;\n\t\t\t$data['percent']['year'][$key] = [];\n\t\t\tforeach ($year as $star => $number) {\n\t\t\t\t\n\t\t\t\t$data['percent']['year'][$key][$star] = $sum + $number;\n\n\t\t\t\t$sum += $number;\n\t\t\t}\n\t\t\tforeach ($year as $star => $number) {\n\t\t\t\tif ($sum != 0) {\n\t\t\t\t\t$value = $data['percent']['year'][$key][$star];\n\t\t\t\t\t$max = $data['percent']['year'][$key][5];\n\t\t\t\t\t$data['percent']['year'][$key][$star] = ($value / $max) * 100;\n\t\t\t\t} else {\n\t\t\t\t\tif ($star != 0)\n\t\t\t\t\t\t$data['percent']['year'][$key][$star] = 20 * $star;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}",
"public function getRate()\n {\n $ratesData = $this->getDataFromSource();\n\n if (!$ratesData) {\n return null;\n }\n\n $rateElements = $ratesData->xpath('/source/organizations/organization/currencies/c[@id=\"USD\"]');\n\n $rateSourcesCount = count($rateElements);\n\n if (!$rateSourcesCount) {\n return null;\n }\n\n $sumRate = 0;\n\n foreach ($rateElements as $rateSource) {\n $sumRate += (float)$rateSource->attributes()->ar;\n }\n\n return $sumRate / $rateSourcesCount;\n }",
"function calculateCurrentRate( $zipcode )\n\t{\n\t\t$url = \"http://api.genability.com/rest/public/tariffs?appId=9a8e8699-e784-4d56-85be-becf6163a560&appKey=2ba657c1-95f1-48a2-9d28-284be8b17dc5&customerClasses=RESIDENTIAL&tariffTypes=DEFAULT&zipCode=\" . $zipcode;\n\t\t$json = file_get_contents($url);\n\t\t$jsonArray = json_decode($json, TRUE);\n\t\t\n\t\t$masterTariffId = $jsonArray['results'][0]['masterTariffId'];\n\t\t// Find master tariff schedule and assume 1000 kWh per month consumption\n\t\t$url = \"http://api.genability.com/rest/public/prices/\" . $masterTariffId . \n\t\t\t \"?appId=9a8e8699-e784-4d56-85be-becf6163a560&appKey=2ba657c1-95f1-48a2-9d28-284be8b17dc5&consumptionAmount=1000\";\n\t\t$jsonTariff = file_get_contents($url);\n\t\t$jsonTariffArray = json_decode($jsonTariff, TRUE);\n\t\t\n\t\t// Find which is the highest price for this average level of consumption\n\t\t$maxTariff = 0.0;\n\t\tforeach ($jsonTariffArray['results'] as &$tariff) {\n\t\t\tif ( $tariff['rateAmount'] > maxTariff )\n\t\t\t{\n\t\t\t\t$maxTariff = $tariff['rateAmount'];\n\t\t\t}\n\t\t}\n\t\techo \"You are currently paying \" . round( $maxTariff * 100, 2 ) . \" cents per kWh.\";\n\t}",
"function it_finds_the_lowest_base_weekly_rate_in_the_absence_of_other_rates()\n {\n $baseRate = new Rate(null, Price::fromString('10', Currency::fromString('EUR')), 1);\n $equipment = new Equipment('Jack Hammer', $baseRate);\n $rentalPeriod = RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1);\n $rentalQuery = new RentalQuery($equipment, $rentalPeriod);\n\n $weekPrice = Price::fromString('65', Currency::fromString('EUR'));\n $equipment->addRate(null, $weekPrice, 7);\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($weekPrice);\n }",
"public function getShippingrate()\n\t{\n\t\tinclude_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/shipping.php';\n\t\t$shipping = new shipping;\n\t\techo $shipping->getShippingrate_calc();\n\t\texit;\n\t}",
"public function getStoreToOrderRate();",
"function getExchangeRate($currency);",
"public function collectRates(Mage_Shipping_Model_Rate_Request $request)\r\n {\r\r\n\t\tif (!$this->getConfigFlag('active')) \r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\r\n\t\t$result = Mage::getModel('shipping/rate_result');\t\t\r\r\n\t\t// Switch between domestic and international shipping methods based\r\t\t// on destination country.\r\t\t//if($destCountry == \"AU\")\r\n\t\t//{\r\r\n\t\t\t$arr_resp = $this->_drcRequest($request);\r\n\t\t\t\t$quote_count = ((int) $arr_resp[\"QUOTECOUNT\"]) - 1;\r\r\r\n\t\t\t\t# ASSIGNING VALUES TO ARRAY METHODS \r\n\t\t\t\tfor ($x=0; $x<=$quote_count; $x++){\t\r\r\n\t\t\t\t\t$title = $this->getConfigData('name') . \" \" . \r\t\t\t\t\tucfirst(strtolower($arr_resp[\"QUOTE($x)_ESTIMATEDTRANSITTIME\"])) ;\r\n\t\t\t\t\t$method = $this->_createMethod($request, $x, $title, $arr_resp[\"QUOTE({$x})_TOTAL\"], $arr_resp[\"QUOTE({$x})_TOTAL\"]);\r\t\t\t\t\t$result->append($method);\r\r\n\t\t\t\t}\r\r\n //}\r\r\n return $result;\r\n }",
"function it_finds_a_daily_rate_price_from_date_range_rate()\n {\n $dailyPrice = Price::fromString('10', Currency::fromString('EUR'));\n $equipment = new Equipment('Jack Hammer', new Rate(null, $dailyPrice, 1));\n\n $rentalQuery = new RentalQuery(\n $equipment,\n RentalPeriod::fromDateTime(new \\DateTime('2014-07-01'), new \\DateTime('2014-07-07'), 1)\n );\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($dailyPrice);\n\n //////////\n $tempPrice = Price::fromString('8', Currency::fromString('EUR'));\n $equipment->addRate(\n RentalPeriod::fromDateTime(new \\DateTime('2014-07-04'), new \\DateTime('2014-07-10')),\n $tempPrice,\n 1\n );\n\n $quotes = $this->getQuotesFor($rentalQuery);\n $quote = $quotes[0];\n\n /** @var RateQuote $quote */\n $quote->getLineItems()->shouldHaveCount(1);\n $lineItems = $quote->getLineItems();\n /** @var RateQuoteLineItem $lineItem */\n $lineItem = $lineItems[0];\n $lineItem->getRate()->getPrice()->equals($tempPrice);\n\n }",
"public function getZoneRates();",
"public function getRate($orderPrice, $orderWeight, Varien_Object $config ) \n { \n $code = $config->getSystemPath();\n Mage::log(\"destination coutnry {$config->getDestCountry()}\");\n if($config->getMultiprices()){\n $ratePath = sprintf('carriers/%s/price_%s',$code, $config->getDestCountry());\n }else{\n $ratePath = sprintf('carriers/%s/%s',$code, $config->getPriceCode());\n }\n \n $result = Mage::getStoreConfig($ratePath);\n if(!$result){\n Mage::log(\"no rate for code $code and path $ratePath\" );\n \n return FALSE;\n }\n $pickupShippingRates = unserialize($result); \n if (is_array($pickupShippingRates) && !empty($pickupShippingRates)) {\n foreach ($pickupShippingRates as $pickupShippingRate) {\n if( (float)$pickupShippingRate['orderminprice'] <= (float)$orderPrice\n && ( (float)$pickupShippingRate['ordermaxprice'] >= (float)$orderPrice || (float)$pickupShippingRate['ordermaxprice'] == 0)\n && (float)$pickupShippingRate['orderminweight'] <= (float)$orderWeight\n && ( (float)$pickupShippingRate['ordermaxweight'] >= (float)$orderWeight || (float)$pickupShippingRate['ordermaxweight'] == 0)\n ) {\n return $pickupShippingRate['price'];\n }\n }\n }\n }",
"function getratetable($previoustable=false)\n\t{\n\t\tif(!$previoustable)\n\t\t\t$previoustable=array();\n\t\tif(is_array($this->cachedratetable))\n\t\t{\n\t\t\treturn $this->cachedratetable;\n\t\t}\n\t\t$rates=array();\n\t\tforeach($this->data->Calendar->CalendarDay as $cday)\n\t\t{\n\t\t\t$closed=false;\n\t\t\t$minstay=0;\n\t\t\t$maxstay=365;\n\t\t\t$closedarrival=0;\n\t\t\t$closeddeparture=0;\n\t\t\t$restrictionlist=$cday->Rates->RestrictionList->Restriction;\n\t\t\tif(!is_array($restrictionlist))\n\t\t\t\t$restrictionlist=array($restrictionlist);\n\t\t\tforeach($restrictionlist as $restriction)\n\t\t\t{\n\t\t\t\tif(true || $restriction->rateCode==$this->rateplan) //opera sometimes sends us rates other than those requested -- disabling this check for now. may end up being permanent.\n\t\t\t\t{\n\t\t\t\t\tswitch($restriction->restrictionType)\n\t\t\t\t\t{\n\t\t\t\t\tcase 'CLOSED':\n\t\t\t\t\t\t$closed=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'CLOSED_FOR_ARRIVAL':\n\t\t\t\t\t\t$closedarrival=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'CLOSED_FOR_DEPARTURE':\n\t\t\t\t\t\t$closeddeparture=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MINIMUM_STAY_THROUGH':\n\t\t\t\t\t\t$minstay=$restriction->numberOfDays;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MAXIMUM_STAY_THROUGH':\n\t\t\t\t\t\t$maxstay=$restriction->numberOfDays;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$closed=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$closed && isset($cday->Rates->RateList) && $minstay<=$maxstay)\n\t\t\t{\n\t\t\t\t$rates[$cday->Date]=array(\n\t\t\t\t\t'dayrate'=>$cday->Rates->RateList->Rate->Rates->Rate->Base->_,\n\t\t\t\t\t'currency'=>$cday->Rates->RateList->Rate->Rates->Rate->Base->currencyCode,\n\t\t\t\t\t'minstay'=>$minstay,\n\t\t\t\t\t'maxstay'=>$maxstay,\n\t\t\t\t\t'noarrival'=>$closedarrival,\n\t\t\t\t\t'nodeparture'=>$closeddeparture\n\t\t\t\t\t);\n\t\t\t\t$previoustable[$cday->Date]=$rates[$cday->Date];\n\t\t\t}\n\t\t\telseif(!$closed && $minstay<=$maxstay && ($closedarrival==1 || $closeddeparture==1)) //date should be between sat-sat days\n\t\t\t{\n\t\t\t\t$pdate=date('Y-m-d',jdtounix(unixtojd(strtotime($cday->Date)))); //this will subtract a day on its own(12 am unix date time is the previous julian date)\n\t\t\t\tif(isset($previoustable[$pdate]))\n\t\t\t\t{\n\t\t\t\t\t$rates[$cday->Date]=array(\n\t\t\t\t\t\t'dayrate'=>$previoustable[$pdate]['dayrate'],\n\t\t\t\t\t\t'currency'=>$previoustable[$pdate]['currency'],\n\t\t\t\t\t\t'minstay'=>$minstay,\n\t\t\t\t\t\t'maxstay'=>$maxstay,\n\t\t\t\t\t\t'noarrival'=>$closedarrival,\n\t\t\t\t\t\t'nodeparture'=>$closeddeparture\n\t\t\t\t\t\t);\n\t\t\t\t\t$previoustable[$cday->Date]=$rates[$cday->Date];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->cachedratetable=$rates;\n\t\treturn $rates;\n\t}",
"function getratetable($previoustable=false)\n\t{\n\t\tif(!$previoustable)\n\t\t\t$previoustable=array();\n\t\tif(is_array($this->cachedratetable))\n\t\t{\n\t\t\treturn $this->cachedratetable;\n\t\t}\n\t\t$rates=array();\n\t\tforeach($this->data->Calendar->CalendarDay as $cday)\n\t\t{\n\t\t\t$closed=false;\n\t\t\t$minstay=0;\n\t\t\t$maxstay=365;\n\t\t\t$closedarrival=0;\n\t\t\t$closeddeparture=0;\n\t\t\t$restrictionlist=$cday->Rates->RestrictionList->Restriction;\n\t\t\tif(!is_array($restrictionlist))\n\t\t\t\t$restrictionlist=array($restrictionlist);\n\t\t\tforeach($restrictionlist as $restriction)\n\t\t\t{\n\t\t\t\tif(true || $restriction->rateCode==$this->rateplan) //opera sometimes sends us rates other than those requested -- disabling this check for now. may end up being permanent.\n\t\t\t\t{\n\t\t\t\t\tswitch($restriction->restrictionType)\n\t\t\t\t\t{\n\t\t\t\t\tcase 'CLOSED':\n\t\t\t\t\t\t$closed=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'CLOSED_FOR_ARRIVAL':\n\t\t\t\t\t\t$closedarrival=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'CLOSED_FOR_DEPARTURE':\n\t\t\t\t\t\t$closeddeparture=1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MINIMUM_STAY_THROUGH':\n\t\t\t\t\t\t$minstay=$restriction->numberOfDays;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'MAXIMUM_STAY_THROUGH':\n\t\t\t\t\t\t$maxstay=$restriction->numberOfDays;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$closed=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(!$closed && isset($cday->Rates->RateList) && $minstay<=$maxstay)\n\t\t\t{\n\t\t\t\t$rates[$cday->Date]=array(\n\t\t\t\t\t'dayrate'=>$cday->Rates->RateList->Rate->Rates->Rate->Base->_,\n\t\t\t\t\t'currency'=>$cday->Rates->RateList->Rate->Rates->Rate->Base->currencyCode,\n\t\t\t\t\t'minstay'=>$minstay,\n\t\t\t\t\t'maxstay'=>$maxstay,\n\t\t\t\t\t'noarrival'=>$closedarrival,\n\t\t\t\t\t'nodeparture'=>$closeddeparture\n\t\t\t\t\t);\n\t\t\t\t$previoustable[$cday->Date]=$rates[$cday->Date];\n\t\t\t}\n\t\t\telseif(!$closed && $minstay<=$maxstay && ($closedarrival==1 || $closeddeparture==1)) //date should be between sat-sat days\n\t\t\t{\n\t\t\t\t$pdate=date('Y-m-d',jdtounix(unixtojd(strtotime($cday->Date)))); //this will subtract a day on its own(12 am unix date time is the previous julian date)\n\t\t\t\tif(isset($previoustable[$pdate]))\n\t\t\t\t{\n\t\t\t\t\t$rates[$cday->Date]=array(\n\t\t\t\t\t\t'dayrate'=>$previoustable[$pdate]['dayrate'],\n\t\t\t\t\t\t'currency'=>$previoustable[$pdate]['currency'],\n\t\t\t\t\t\t'minstay'=>$minstay,\n\t\t\t\t\t\t'maxstay'=>$maxstay,\n\t\t\t\t\t\t'noarrival'=>$closedarrival,\n\t\t\t\t\t\t'nodeparture'=>$closeddeparture\n\t\t\t\t\t\t);\n\t\t\t\t\t$previoustable[$cday->Date]=$rates[$cday->Date];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->cachedratetable=$rates;\n\t\treturn $rates;\n\t}",
"public static function getRates() {\n $result = self::get(self::getPath('rates'));\n \n Return $result;\n }",
"public function getRate(Mage_Shipping_Model_Rate_Request $request)\n\t{\n\t \n $adapter = $this->_getReadAdapter();\n $bind = array(\n ':website_id' => (int) $request->getWebsiteId(),\n ':country_id' => $request->getDestCountryId(),\n ':region_id' => (int) $request->getDestRegionId(),\n ':postcode' => $request->getDestPostcode()\n );\n $select = $adapter->select()\n ->from(Mage::getSingleton('core/resource')->getTableName('correos/correos'))\n ->where('website_id = :website_id')\n ->order(array('dest_country_id DESC', 'dest_region_id DESC', 'dest_zip DESC'))\n ->limit(1);\n\n // Render destination condition\n $orWhere = '(' . implode(') OR (', array(\n \"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = :postcode\",\n \"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = ''\",\n\n // Handle asterix in dest_zip field\n \"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = '*'\",\n \"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = '*'\",\n \"dest_country_id = '0' AND dest_region_id = :region_id AND dest_zip = '*'\",\n \"dest_country_id = '0' AND dest_region_id = 0 AND dest_zip = '*'\",\n\n \"dest_country_id = '0' AND dest_region_id = 0 AND dest_zip = ''\",\n\n \"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = ''\",\n \"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = :postcode\",\n \"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = '*'\",\n )) . ')';\n $select->where($orWhere);\n \n \n // Render condition by condition name\n if (is_array($request->getConditionName())) {\n $orWhere = array();\n $i = 0;\n foreach ($request->getConditionName() as $conditionName) {\n $bindNameKey = sprintf(':condition_name_%d', $i);\n $bindValueKey = sprintf(':condition_value_%d', $i);\n $orWhere[] = \"(condition_name = {$bindNameKey} AND condition_value <= {$bindValueKey})\";\n $bind[$bindNameKey] = $conditionName;\n $bind[$bindValueKey] = $request->getData($conditionName);\n $i++;\n }\n\n if ($orWhere) {\n $select->where(implode(' OR ', $orWhere));\n }\n } else {\n $bind[':condition_name'] = $request->getConditionName();\n $bind[':condition_value'] = $request->getData($request->getConditionName());\n\n $select->where('condition_name = :condition_name');\n $select->where('condition_value <= :condition_value');\n $select->where('method_code=?', $request->getMethodCode());\n }\n\n $result = $adapter->fetchRow($select, $bind);\n \n \n // log\n Mage::helper('correos')->_logger('Consulta de petición de rates [' . $request->getMethodCode() . ']');\n $adapter->getProfiler()->setEnabled(true); //enable profiler\n Mage::helper('correos')->_logger($adapter->getProfiler()->getLastQueryProfile());\n \n \n // Normalize destination zip code\n if ($result && $result['dest_zip'] == '*') {\n $result['dest_zip'] = '';\n }\n return $result;\n \n\t}",
"public function getRates()\n {\n return (new Rates)->fetchRates(); \n }",
"public function getRate(\n Location $origin = null,\n Location $destination = null,\n Package $package = null\n ) {\n return $this->rate;\n }",
"public function getStoreToBaseRate();",
"function getAllRates($interval) {\n\n\t\tforeach ( $this->lConf['productDetails'] as $uid => $val ) {\n\t\t\t// get all prices for given UID and given dates\n\t\t\t$this->lConf['productDetails'][$uid]['prices'] = tx_abbooking_div::getPrices($uid, $interval);\n\t\t}\n\n\t\treturn 0;\n\t}",
"public function getShippingRate();",
"function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }",
"public function getExternalTaxRate();",
"protected function loadRates() {\n\t\t$query = array(\n\t\t\t'$or' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'params.serving_networks' => array(\n\t\t\t\t\t\t'$exists' => true,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'UNRATED',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t$rates_coll = Billrun_Factory::db()->ratesCollection();\n\t\t$rates = $rates_coll->query($query)->cursor()->setReadPreference(Billrun_Factory::config()->getConfigValue('read_only_db_pref'));\n\t\tforeach ($rates as $rate) {\n\t\t\t$rate->collection($rates_coll);\n\t\t\tif (is_array($rate['params']['serving_networks'])) {\n\t\t\t\tforeach ($rate['params']['serving_networks'] as $serving_network) {\n\t\t\t\t\t$this->rates['by_names'][$serving_network][] = $rate;\n\t\t\t\t}\n\t\t\t} else if (is_string($rate['params']['serving_networks'])) {\n\t\t\t\t$this->rates['by_regex'][$rate['params']['serving_networks']][] = $rate;\n\t\t\t} else if ($rate['key'] == 'UNRATED') {\n\t\t\t\t$this->rates['UNRATED'] = $rate;\n\t\t\t}\n\t\t}\n\t}",
"public function collectRates(Mage_Shipping_Model_Rate_Request $request) {\n\t\t// Check if this method is active\n\t\tif (!$this->getConfigFlag('active')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if this method is even applicable (must ship from Spain)\n\t\t$origCountry = Mage::getStoreConfig('shipping/origin/country_id', $this->getStore());\n\t\t$result = Mage::getModel('shipping/rate_result');\n\n\t\t$error = Mage::getModel('shipping/rate_result_error');\n\t\tif ($origCountry != \"ES\") {\n\t\t\tif($this->getConfigData('showmethod')){\n\t\t\t\t$error->setCarrier($this->_code)\n\t\t\t\t\t->setCarrierTitle($this->getConfigData('title'))\n\t\t\t\t\t->setErrorMessage($this->getConfigData('specificerrmsg'));\n\t\t\t\t$result->append($error);\n\t\t\t\treturn $result;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t//check if cart order value falls between the minimum and maximum order amounts required\n\t\t$packagevalue = $request->getBaseCurrency()->convert($request->getPackageValue(), $request->getPackageCurrency());\n\t\t$minorderval = (int)$this->getConfigData('min_order_value');\n\t\t$maxorderval = (int)$this->getConfigData('max_order_value');\n\t\tif(\n\t\t\t/* EL PAQUETE ES MENOR O IGUAL AL MINIMO Y EL MINIMO ESTA HABILITADO*/\n\t\t\t($packagevalue <= $minorderval) && ($minorderval > 0) || \n\t\t\t/* EL PAQUETE ES MAYOR O IGUAL AL MAXIMO Y EL MAXIMO ESTA HABILITADO*/\n\t\t\t(($maxorderval != 0) && ($packagevalue >= $maxorderval))){\n\t\t\tif($this->getConfigData('showmethod')){\n\t\t\t\t$error->setCarrier($this->_code)\n\t\t\t\t\t->setCarrierTitle($this->getConfigData('title'));\n\t\t\t\t$currency\t=\tMage::getStoreConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE);\n\t\t\t\t/* SI EL MINIMO Y EL MAXIMO ESTA HABILITADO*/\n\t\t\t\tif($minorderval != 0 && $maxorderval != 0){\n\t\t\t\t\t$errorMsg=Mage::helper('nacex')->__('Package value must be between %s and %s',Mage::app()->getStore()->formatPrice($minorderval),Mage::app()->getStore()->formatPrice($maxorderval));\n\t\t\t\t/* SI EL MAXIMO ESTA HABILITADO*/\n\t\t\t\t}elseif($maxorderval != 0){\n\t\t\t\t\t$errorMsg=Mage::helper('nacex')->__('Package value must be less than %s',\n\t\t\t\t\t\tMage::app()->getStore()->formatPrice($maxorderval)\n\t\t\t\t\t);\n\t\t\t\t/* SI EL MINIMO ESTA HABILITADO*/\n\t\t\t\t}else{\n\t\t\t\t\t$errorMsg=Mage::helper('nacex')->__('Package value must be higher than %s',Mage::app()->getStore()->formatPrice($minorderval));\n\t\t\t\t}\n\t\t\t\t$error->setErrorMessage($errorMsg);\n\t\t\t\t$result->append($error);\n\t\t\t\treturn $result;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// CODIGO POSTAL DE LA TIENDA\n\t\t$this->_frompcode = Mage::getStoreConfig('shipping/origin/postcode', $this->getStore());\n\t\t// CODIGO POSTAL DEL COMPRADOR\n\t\t$this->_topcode = $request->getDestPostcode();\n\t\tif ($request->getDestCountryId()) {\n\t\t\t$destCountry = $request->getDestCountryId();\n\t\t} else {\n\t\t\t$destCountry = \"ES\";\n\t\t}\n\n\t\t$sweightunit = $this->getConfigData('weight_units');\n\t\t$this->_sweight = $request->getPackageWeight()*$sweightunit;\n\n\t\t// En el caso de que sea dentro de espaņa se muestra\n\t\t// en caso contrario no\n\t\tif($destCountry == \"ES\") {\n\t\t\ttry {\n\t\t\t\t$this->_servicio\t=\tMage::getSingleton('nacex/standard_data')->setServicio($this->_frompcode,$this->_topcode);\n\t\t\t\t$_params\t=\tarray('servicio'=>$this->_servicio,'sweight'=>$this->_sweight,'code'=>$this->_code);\n\t\t\t\t$datosPrecio\t=\tMage::getSingleton('nacex/standard_data')->getPrecio($_params);\n\t\t\t\t$shippingPrice\t=\t$datosPrecio['price'];\n\t\t\t\t// set the handling fee type....\n\t\t\t\t$calculateHandlingFee = $this->getConfigData('handling_type');\n\t\t\t\t$handlingFee = $this->getConfigData('handling_fee');\n\t\t\t\tif ($this->getConfigData('handling_type') == 'F') {\n\t\t\t\t\t$shippingPrice += $this->getConfigData('handling_fee');\n\t\t\t\t} else {\n\t\t\t\t\t$handlingFee = ($shippingPrice * $this->getConfigData('handling_fee'))/100;\n\t\t\t\t\t$shippingPrice += $handlingFee;\n\t\t\t\t}\n\n\t\t\t\t$rate = Mage::getModel('shipping/rate_result_method');\n\t\t\t\t$rate->setCarrier($this->_code);\n\t\t\t\t$rate->setCarrierTitle($this->getConfigData('title'));\n\t\t\t\t$rate->setMethod($this->_code);\n\t\t\t\t$rate->setMethodTitle($this->getConfigData('msg'));\n\t\t\t\t$rate->setCost($datosPrecio['price']);\n\t\t\t\t$rate->setPrice($shippingPrice);\n\t\t\t\t$result->append($rate);\n\t\t\t} catch(Exception $e){\n\t\t\t\tMage::logException($e);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$error = Mage::getModel('shipping/rate_result_error');\n\t\t\t$error->setCarrier($this->_code);\n\t\t\t$error->setCarrierTitle($this->getConfigData('title'));\n\t\t\t$error->setErrorMessage($this->getConfigData('specificerrmsg'));\n\t\t\t$result->append($error);\n\t\t}\n\t\treturn $result;\n\t}",
"public function getRate($destination, $weight)\n {\n $result = false;\n\n // Get rate per grams\n $identifier = $destination == 'manila' ? 'intra-province' : 'inter-land';\n $result = $this->_getRate($identifier, $weight);\n\n return $result;\n }",
"public function getBaseToGlobalRate();",
"function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) {\n global $customer_zone_id, $customer_country_id;\n\n if ( ($country_id == -1) && ($zone_id == -1) ) {\n if (!tep_session_is_registered('customer_id')) {\n $country_id = STORE_COUNTRY;\n $zone_id = STORE_ZONE;\n } else {\n $country_id = $customer_country_id;\n $zone_id = $customer_zone_id;\n }\n }\n\n $tax_query = tep_db_query(\"select SUM(tax_rate) as tax_rate from \" . TABLE_TAX_RATES . \" tr left join \" . TABLE_ZONES_TO_GEO_ZONES . \" za ON tr.tax_zone_id = za.geo_zone_id left join \" . TABLE_GEO_ZONES . \" tz ON tz.geo_zone_id = tr.tax_zone_id WHERE (za.zone_country_id IS NULL OR za.zone_country_id = '0' OR za.zone_country_id = '\" . $country_id . \"') AND (za.zone_id IS NULL OR za.zone_id = '0' OR za.zone_id = '\" . $zone_id . \"') AND tr.tax_class_id = '\" . $class_id . \"' GROUP BY tr.tax_priority\");\n if (tep_db_num_rows($tax_query)) {\n $tax_multiplier = 0;\n while ($tax = tep_db_fetch_array($tax_query)) {\n $tax_multiplier += $tax['tax_rate'];\n }\n return $tax_multiplier;\n } else {\n return 0;\n }\n}",
"private function _calculateTotalsByRating()\n {\n $sql = new SqlStatement();\n $sql->select(array(\n 'id' => 'ROUND(total)',\n 'val' => 'ROUND(total)',\n 'c' => 'COUNT(*)',\n 'type' => \"'RATING'\"))\n ->from(array('p' => self::RESULTS_TABLE))\n ->group(array('ROUND(total)'));\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n $res = $this->db->query($sql);\n// echo $sql;\n return $res->rows;\n }",
"function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) {\n global $customer_zone_id, $customer_country_id;\n\n if ( ($country_id == -1) && ($zone_id == -1) ) {\n $country_id = STORE_COUNTRY;\n $zone_id = STORE_ZONE;\n }\n\n $Qtax = Registry::get('Db')->prepare('select sum(tax_rate) as tax_rate from :table_tax_rates tr left join :table_zones_to_geo_zones za on tr.tax_zone_id = za.geo_zone_id left join :table_geo_zones tz on tz.geo_zone_id = tr.tax_zone_id where (za.zone_country_id IS NULL OR za.zone_country_id = \"0\" OR za.zone_country_id = :zone_country_id) AND (za.zone_id IS NULL OR za.zone_id = \"0\" OR za.zone_id = :zone_id) AND tr.tax_class_id = :tax_class_id group by tr.tax_priority');\n $Qtax->bindInt(':zone_country_id', (int)$country_id);\n $Qtax->bindInt(':zone_id', (int)$zone_id);\n $Qtax->bindInt(':tax_class_id', (int)$class_id);\n $Qtax->execute();\n\n if ($Qtax->fetch() !== false) {\n $tax_multiplier = 0;\n\n do {\n $tax_multiplier += $Qtax->value('tax_rate');\n } while ($Qtax->fetch());\n\n return $tax_multiplier;\n } else {\n return 0;\n }\n }",
"function calc_referal_day_stat($r, $r_db = null, $perc, $system_percent) {\r\n //$r_db - referal from db\r\n $rday = array(); //array of referal day changes\r\n\r\n $rday['day_profit'] = 0.00;\r\n $rday['day_profit_mlgame'] = 0.00;\r\n $rday['level'] = $r['level'];\r\n\r\n\r\n if ($r_db) {\r\n $rday['spent'] = round($r_db['spent'], 2);\r\n $rday['earned'] = round($r_db['earned'], 2);\r\n $rday['inputted'] = round($r_db['inputted'], 2);\r\n $rday['ref_paid'] = round($r_db['ref_paid'], 2);\r\n $rday['ref_to_pay'] = round($r_db['ref_to_pay'], 2);\r\n\r\n $rday['spent'] = $r['spent'] - $r_db['spent'];\r\n $rday['earned'] = $r['earned'] - $r_db['earned'];\r\n $rday['inputted'] = $r['inputted'] - $r_db['inputted'];\r\n $rday['ref_paid'] = $r['ref_paid'] - $r_db['ref_paid'];\r\n } else {\r\n $rday['spent'] = $r['spent'];\r\n $rday['earned'] = $r['earned'];\r\n $rday['inputted'] = $r['inputted'];\r\n $rday['ref_paid'] = $r['ref_paid'];\r\n $rday['ref_to_pay'] = $r['ref_to_pay'];\r\n }\r\n // if ($r_db)\r\n // $r['ref_to_pay'] -= $r_db['ref_to_pay'];\r\n\r\n if ($rday['spent'] == 0 && $rday['ref_paid'] == 0/* && $rday['inputted'] == 0*/) {\r\n //log_message(\"debug\", \"Calc Referal Day Stats. No day operations for referal \");\r\n return false;\r\n } //skip if day operations are absent\r\n $rday['credit'] = $r_db ? $r_db['credit'] : 0.00;\r\n $rday['credit'] = round($rday['credit'], 2);\r\n\r\n $rday['day_sum'] = $rday['spent'] - $rday['earned'] - $rday['credit'];\r\n\r\n if ($rday['day_sum'] < 0) {\r\n //give credit\r\n $rday['credit'] = abs($rday['day_sum']);\r\n $rday['day_sum'] = 0;\r\n } else {\r\n $rday['credit'] = 0;\r\n }\r\n\r\n $rday['day_sum'] += $rday['ref_paid'];\r\n\t//\t$rday['day_profit'] = round($rday['day_sum'] * $perc / 100, 2);\r\n\t\t$rday['day_profit'] = round($rday['ref_paid'] * $perc / 100, 2);\r\n\r\n if ($rday['ref_paid'] > 0) {\r\n\t\t\t\r\n\t\t//\t$rday['day_profit_mlgame'] = round($rday['ref_paid'] / $system_percent/* config_item(\"mlgame_system_percent\") */ *\r\n // $perc, 2);\r\n\t\t\t\r\n\t\t\t$rday['day_profit_mlgame'] = round($rday['ref_paid'] * config_item(\"mlgame_system_percent\") / 100, 2);\r\n }\r\n\r\n return $rday;\r\n }",
"public function getExchangeRate();",
"public function collectRates(Mage_Shipping_Model_Rate_Request $request)\n {\n $storeId = $request->getStoreId();\n if (!$request->getOrig()) {\n $request\n ->setCountryId(Mage::getStoreConfig(self::XML_PATH_STORE_COUNTRY_ID, $request->getStore()))\n ->setRegionId(Mage::getStoreConfig(self::XML_PATH_STORE_REGION_ID, $request->getStore()))\n ->setCity(Mage::getStoreConfig(self::XML_PATH_STORE_CITY, $request->getStore()))\n ->setPostcode(Mage::getStoreConfig(self::XML_PATH_STORE_ZIP, $request->getStore()));\n }\n\n $limitCarrier = $request->getLimitCarrier();\n if (!$limitCarrier) {\n $carriers = Mage::getStoreConfig('carriers', $storeId);\n\n /*\n For UPS Saturday Shipping, add an additional carrier that will will have the saturday delivery\n option added in Shipping/Carrier/Ups.php\n Saturday delivery is an option in the API request and applies to ALL shipping rates in that result.\n So we make 2 requests to UPS - once for non-saturday and once for Saturday.\n */\n if( Mage::getStoreConfig('shipping/saturday_delivery_ups/enabled') && in_array( date('w'), explode( \",\", Mage::getStoreConfig('shipping/saturday_delivery_ups/days_enabled') ) ) ) {\n $carriers['upssaturday'] = $carriers['ups'];\n }\n\n foreach ($carriers as $carrierCode => $carrierConfig) {\n $this->collectCarrierRates($carrierCode, $request);\n }\n } else {\n if (!is_array($limitCarrier)) {\n $limitCarrier = array($limitCarrier);\n }\n foreach ($limitCarrier as $carrierCode) {\n $carrierConfig = Mage::getStoreConfig('carriers/' . $carrierCode, $storeId);\n if (!$carrierConfig) {\n continue;\n }\n $this->collectCarrierRates($carrierCode, $request);\n }\n }\n\n return $this;\n }",
"public function fetchRates()\n {\n $res = $this->_fetch($this->_cfg['ratesUri']);\n\n return $res;\n }",
"public function findDistrictCropRates($where = \"\") {\n $table = self::$table_name . \" dr JOIN tree_crop_types_description ctd ON dr.croptree_id = ctd.id JOIN tbl_crop_description cd ON ctd.crop_description_id = cd.id JOIN tbl_tree_or_crop_types tct ON ctd.tree_crop_id = tct.id JOIN tbl_district d ON dr.district_id = d.id\";\n $fields = \"`dr`.`id`, dr.rate, d.district_name, district_id, tct.`title` as croptype, cd.`title` as cropdescription\";\n $result = $this->getfarray($table, $fields, $where, \"district_name\", \"\");\n return !empty($result) ? $result : false;\n }",
"private function _getRateToUse($from, $to)\n {\n $rate = 1;\n if ($from !== $to) {\n if ($this->database) {\n $rate = $this->_getRateFromSession($from, $to);\n if (!$rate) {\n $rate = $this->_getRateFromDatabase($from, $to);\n }\n } else {\n $rate = $this->_getRateFromAPI($from, $to);\n }\n }\n\n return $rate;\n }",
"public function getRates()\n {\n # Convert the rates to a key / value array:\n return json_decode( json_encode($this->rates), true );\n }",
"public function get_rates() {\n\t\t$rates = self::make_api_call( 'rates' );\n\t\tif ( 'ok' === $rates['error'] ) {\n\t\t\treturn $rates['result'];\n\t\t}\n\t\treturn array();\n\t}",
"private function _getRateFromDatabase($from, $to)\n {\n $result = $this->currencyratesTable->find('all')->where(['from_currency' => $from, 'to_currency' => $to])->first();\n if ($result) {\n if ($result->get('modified')->wasWithinLast($this->refresh . ' hours')) {\n $rate = $result->get('rate');\n $this->_storeRateInSession($result);\n } else {\n $rate = $this->_getRateFromAPI($from, $to);\n if ($rate) {\n $result->rate = $rate;\n $this->currencyratesTable->save($result);\n $this->_storeRateInSession($result);\n }\n }\n } else {\n $rate = $this->_getRateFromAPI($from, $to);\n if ($rate) {\n $result = $this->currencyratesTable->newEntity([\n 'from_currency' => $from,\n 'to_currency' => $to,\n 'rate' => $rate\n ]);\n $this->currencyratesTable->save($result);\n $this->_storeRateInSession($result);\n }\n }\n\n return $rate;\n }",
"public function collectRates(RateRequest $request)\n {\n\n if (!$this->getConfigFlag('active')) {\n return false;\n }\n /*if ($this->appState->getAreaCode() == 'webapi_rest') {\n return false;\n }*/\n\n if ($this->appState->getAreaCode() =='crontab'\n || $this->appState->getAreaCode() =='adminhtml'\n || $this->appState->getAreaCode() == 'webapi_rest'\n ) {\n\n $price = $this->getConfigData('price');\n // set a default shipping price maybe 0\n if (!$price) {\n $price = 0;\n }\n\n $handling = $this->getConfigFlag('handling');\n\n /** @var \\Magento\\Shipping\\Model\\Rate\\Result $result */\n $result = $this->_rateResultFactory->create();\n /** @var \\Magento\\Quote\\Model\\Quote\\Address\\RateResult\\Method $method */\n $method = $this->_rateMethodFactory->create();\n $method->setCarrier($this->_code);\n $method->setMethod($this->_code);\n\n $method->setCarrierTitle($this->getConfigData('title'));\n $method->setMethodTitle($this->getConfigData('name'));\n\n $method->setPrice($price);\n $method->setCost(0);\n\n $result->append($method);\n return $result;\n\n } else {\n return false;\n }\n }",
"public function getExchangeRate(Request $request)\n {\n try {\n $validator = Validator::make($request->all(), [\n 'base' => 'required',\n 'target' => 'required',\n 'date' => 'required|date'\n ]);\n\n if ($validator->fails()) {\n return response()->json([\n 'status' => false,\n 'message' => $validator->errors()\n ], 200);\n }\n\n if ($request->base == $request->target) {\n return response()->json([\n 'status' => true,\n 'rate' => 1\n ], 200);\n } else {\n $model = ForeignCurrencyTransactionSettings::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('base_currency', '=', $request->base)\n ->where('foreign_exchange_currency', '=', $request->target)\n ->first();\n\n if ($model) {\n $exchangeRates = ExchangeRates::query()->where('foreign_currency_id', '=', $model->id)\n ->where('date', '=', Carbon::parse($request->date)->format('Y-m-d'))\n ->first();\n if ($exchangeRates) {\n return response()->json([\n 'status' => true,\n 'rate' => $exchangeRates->rate\n ], 200);\n }\n } else {\n $model = ForeignCurrencyTransactionSettings::query()\n ->whereIn('business_account_id', getDependentUserIds())\n ->where('base_currency', '=', $request->target)\n ->where('foreign_exchange_currency', '=', $request->base)\n ->first();\n\n $exchangeRates = ExchangeRates::query()->where('foreign_currency_id', '=', $model->id)\n ->where('date', '=', Carbon::parse($request->date)->format('Y-m-d'))\n ->first();\n if ($exchangeRates) {\n return response()->json([\n 'status' => true,\n 'rate' => round(1/(float)$exchangeRates->rate, 2) //dividing by 1 as we have now changed the exchange rate\n ], 200);\n }\n }\n return response()->json([\n 'status' => true,\n 'rate' => 1\n ], 200);\n\n }\n } catch (\\Exception $e) {\n return response()->json([\n 'status' => false,\n 'message' => $e->getMessage()\n ], 200);\n }\n }",
"public function collectRates(RateRequest $request)\n {\n if (!$this->getConfigFlag('active')) {\n return false;\n }\n \n /** @var \\Magento\\Shipping\\Model\\Rate\\Result $result */\n $result = $this->_rateResultFactory->create();\n\t\t\n\t\t\n\t\t $zone = $this->helper->getShippingZoneByZipcode($request->getDestPostcode());\n if (!$zone) {\n return false;\n }\n\t\t$storeScope = \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE;\n $matressAttributeSetId = $this->scopeConfig->getValue('carriers/zonerate/matress_attribute_set', $storeScope);\n $furnitureAttributeSetId = $this->scopeConfig->getValue('carriers/zonerate/furniture_attribute_set', $storeScope);\n $matressGreaterAmount = (int)$this->scopeConfig->getValue('carriers/zonerate/matress_greater_amount', $storeScope);\n $bedInBoxCategory = $this->scopeConfig->getValue('carriers/zonerate/bed_in_box_cateid', $storeScope);\n $beddingCategory = $this->scopeConfig->getValue('carriers/zonerate/bedding_cateid', $storeScope);\n\n if ($request->getAllItems()) {\n $rule=array();\n foreach ($request->getAllItems() as $item) {\n if ($item->getProduct()->isVirtual() || $item->getParentItem()) {\n continue;\n }\n $item->setData('product', null);\n $product = $item->getProduct();\n $productAttributeId = $product->getAttributeSetId();\n $price = $product->getPrice();\n $productCategoryIds = $product->getCategoryIds();\n\n\n if ($productAttributeId == $matressAttributeSetId && $price >= $matressGreaterAmount && !in_array($bedInBoxCategory,$productCategoryIds) && !in_array($beddingCategory,$productCategoryIds) && $zone['id'] == 1) {\n if(!in_array('Rule1', $rule, true)){\n $rule['rule1'] = 'Rule1';\n }\n } elseif ($productAttributeId == $furnitureAttributeSetId && !in_array($bedInBoxCategory,$productCategoryIds) && !in_array($beddingCategory,$productCategoryIds) && $zone['id'] == 1) {\n if(!in_array('Rule2', $rule, true)){\n $rule['rule2'] = 'Rule2';\n }\n //return false;\n } elseif (($productAttributeId == $matressAttributeSetId || $productAttributeId == $furnitureAttributeSetId) && !in_array($bedInBoxCategory,$productCategoryIds) && !in_array($beddingCategory,$productCategoryIds) && $zone['id'] == 2 ) {\n if(!in_array('Rule3', $rule, true)){\n $rule['rule3'] = 'Rule3';\n }\n //return false;\n } elseif (in_array($bedInBoxCategory,$productCategoryIds) && ( $zone['id'] == 1 || $zone['id'] == 2)) {\n if(!in_array('Rule4', $rule, true)){\n $rule['rule4'] = 'Rule4';\n }\n } elseif (in_array($beddingCategory,$productCategoryIds)) {\n if(!in_array('Rule5', $rule, true)){\n $rule['rule5'] = 'Rule5';\n }\n } else{\n \n }\n \n\n } \n if(!in_array('Rule1', $rule, true) && (in_array('Rule2', $rule, true) || in_array('Rule3', $rule, true)) ){\n return false;\n }\n }\n \n $this->_updateFreeMethodQuote($request);\n\n if ($request->getFreeShipping() || $this->isFreeShippingRequired($request)) {\n /** @var \\Magento\\Quote\\Model\\Quote\\Address\\RateResult\\Method $method */\n $method = $this->_rateMethodFactory->create();\n\n $method->setCarrier('freeshipping');\n $method->setCarrierTitle($this->getConfigData('title'));\n\n $method->setMethod('freeshipping');\n $method->setMethodTitle($this->getConfigData('name'));\n\n $method->setPrice('0.00');\n $method->setCost('0.00');\n\n $result->append($method);\n } elseif ($this->getConfigData('showmethod')) {\n $error = $this->_rateErrorFactory->create();\n $error->setCarrier($this->_code);\n $error->setCarrierTitle($this->getConfigData('title'));\n $errorMsg = $this->getConfigData('specificerrmsg');\n $error->setErrorMessage(\n $errorMsg ? $errorMsg : __(\n 'Sorry, but we can\\'t deliver to the destination country with this shipping module.'\n )\n );\n return $error;\n }\n return $result;\n }",
"public function searchDriveway()\n { \n \n $rangeprice = $this->input->post('rangeprice', TRUE);\n $type = $this->input->post('option', TRUE); // 1 - continuous / 2 - recurring\n \n if($rangeprice == 1){\n $minprice = 0;\n $maxprice = 10; \n } else if($rangeprice == 2){\n $minprice = 11;\n $maxprice = 20; \n } else if($rangeprice == 3){\n $minprice = 21;\n $maxprice = 150; \n } else if($rangeprice == ''){\n $minprice = 0;\n $maxprice = 150; \n }\n \n $centerlat = $this->input->post('centerlat', TRUE);\n $centerlong = $this->input->post('centerlong', TRUE);\n $search_zone = $this->get_nearest_timezone($centerlat, $centerlong) ;\n $this->session->set_userdata('search_zone',$search_zone);\n $userInfo = $this->session->userdata ( 'logged_in' );\n $userId = $userInfo ['user_id'];\n \n date_default_timezone_set($search_zone); //search location time\n \n $frmdate = $this->input->post('fromdate', TRUE);\n $tdate = $this->input->post('todate', TRUE); \n $fromdate = date(\"Y-m-d\", strtotime($frmdate));\n $todate = date(\"Y-m-d\", strtotime($tdate)); \n $datef = new DateTime($this->input->post('fromdate', TRUE)); \n $datet = new DateTime($this->input->post('todate', TRUE));\n $timef = new DateTime($this->input->post ( 'fromtime', TRUE )); \n $timet = new DateTime($this->input->post ( 'totime', TRUE )); \n $bookingFrom= new DateTime($fromdate .' ' .$timef->format(TIME_FORMAT));\n $bookingTo= new DateTime($todate .' ' .$timef->format(TIME_FORMAT));\n \n $reindexed_array = array();\n $drivewaysdisplay = array();\n $drivewaybooking = array();\n $availableDriveways = array();\n $drivewayArray = array();\n $slot = array();\n \n $con=mysqli_connect(\"192.168.12.210\",\"louiparkwebapp\",\"j698hjgd85\",\"louiparkwebapp\"); \n $dPrice = \"\";\n $drivewayPrice=\"\"; \n if($type==3){\n $dPrice= 'ddailyPrice';\n $drivewayPrice = 'dailyprice';\n \n }else{\n $dPrice = 'dPrice';\n $drivewayPrice = 'price';\n } \n\n $sql=\"SELECT DISTINCT b.drivewayID,userID,slot ,b.building,b.route,b.streetAddress,b.city,b.state,b.zip,b.latitude,b.longitude,b.price,b.dailyprice,Max(\".$dPrice.\") AS dPrice,bb.fromDate AS froma ,\n\n (\n 6371 *\n acos(\n cos( radians( \".$centerlat.\" ) ) *\n cos( radians( latitude ) ) *\n cos(\n radians( longitude ) - radians( \".$centerlong.\" )\n ) +\n sin(radians(\".$centerlat.\")) *\n sin(radians(latitude))\n )\n ) distance\n FROM\n tbl_driveway b\n LEFT JOIN tbl_driveway_views_update AS bb \n ON b.drivewayID =bb.drivewayID AND bb.fromdate= '\".$fromdate.\"'\n WHERE drivewayStatus = 1 \n GROUP BY b.drivewayid\n HAVING\n distance < \".DRIVEWAY_DISTANCE.\" and ((dPrice BETWEEN '\".$minprice.\"' AND '\".$maxprice.\"' ) OR ((b.\".$drivewayPrice.\" BETWEEN '\".$minprice.\"' AND '\".$maxprice.\"' ) AND ISNULL(dPrice)=1))\n ORDER BY distance\n \"; \n $query = $this->db->query($sql); \n\n if($query -> num_rows() > 0)\n {\n $results = $query->result_array();\n foreach( $results as $result )\n { \n $drivewayArray[$result['drivewayID']] = $result;\n $slot[$result['drivewayID']]=$result['slot'];\n $drvInfo = $this->drivewaymodel->getDrivewayZone($result['drivewayID']); \n $drivewayTZ = new DateTimeZone($drvInfo->timeZone);\n $fromdateget = new DateTime($datef->format(DATE_FORMAT) .' ' .$timef->format(TIME_FORMAT));\n $fromdateget->setTimezone($drivewayTZ);\n $todateget = new DateTime($datet->format(DATE_FORMAT) .' ' .$timet->format(TIME_FORMAT));\n $todateget->setTimezone($drivewayTZ);\n \n $fromdatevalue= $fromdateget->format(DATE_TIME);\n $todatevalue= $todateget->format(DATE_TIME);\n $fromtimeonly=$fromdateget->format(TIME_FORMAT);\n $totimeonly=$todateget->format(TIME_FORMAT);\n\n $dateArrayrange = $this->createDateRangeArray($fromdatevalue, $todatevalue); \n $driveways=array(); \n \n $sqldate=\"Select * from tbl_driveway_date_settings where status=1 and driveway_id=\".$result['drivewayID'];\n \n $resultdate = $con->query($sqldate);\n if ($resultdate->num_rows> 0) \n { \n $sqldate=\"Select * from tbl_driveway_date_settings where status=1 and driveway_id=\".$result['drivewayID'].\" and start_date<='$fromdatevalue' and end_date>='$todatevalue'\"; \n $resultdate = $con->query($sqldate); \n if ($resultdate->num_rows == 0) \n { \n continue;\n }\n }\n \n $sqldate=\"Select * from tbl_driveway_day_settings where status=1 and driveway_id=\".$result['drivewayID']; \n $resultdate = $con->query($sqldate);\n\n if ($resultdate->num_rows> 0) \n {\n for($i=0;$i<count($dateArrayrange);$i++)\n {\n \n $weekday=date(\"w\",strtotime($dateArrayrange[$i]));\n if($weekday>1 && $weekday<5)\n {\n $weekday=1;\n } \n $sqltime=\"Select * from tbl_driveway_day_settings where driveway_id=\".$result['drivewayID'].\" and status=1 and day_option=\".$weekday; \n $resulttime = $con->query($sqltime);\n \n if ($resulttime->num_rows > 0) \n { \n \n while($rowtime = $resulttime->fetch_assoc()) \n {\n $fromtime=$rowtime[\"from\"];\n $totime=$rowtime[\"to\"];\n if($fromtime==\"00:00:00\")\n {\n $fromtime=\"\";\n \n }\n if($totime==\"00:00:00\")\n {\n $totime=\"\";\n \n }\n if(count($dateArrayrange)==\"1\")//only one day in search\n { \n \n if((strtotime($dateArrayrange[$i].\"\".$fromtime)<=strtotime($fromdatevalue) || $fromtime==\"\") && (strtotime($dateArrayrange[$i].\"\".$totime)>=strtotime($todatevalue) || $totime==\"\"))\n { \n $driveways[]=$result['drivewayID']; \n }\n }\n else //multi date range\n {\n \n //for continuous\n //start\n \n if($type==\"1\")\n {\n $date1 = $fromdate;\n $date2 = $todate;\n $diff = strtotime($date2) - strtotime($date1);\n $diff_in_hrs = $diff/3600;\n $hourcharge[$result['drivewayID']]= number_format($diff_in_hrs,2); \n if($i==0)\n {\n if(strtotime($dateArrayrange[$i].\"\".$fromtime)<=strtotime($fromdatevalue) || $fromtime==\"\")\n { \n $driveways[]=$result['drivewayID']; \n }\n \n }\n else if($i==count($dateArrayrange)-1)\n {\n \n if(strtotime($dateArrayrange[$i].\"\".$totime)>=strtotime($todatevalue) || $totime==\"\")\n { \n $driveways[]=$result['drivewayID']; \n } \n }\n else\n { \n if($fromtime==\"\" && $totime==\"\")\n {\n \n $driveways[]=$result['drivewayID'];\n } \n }\n \n }\n //end else recurring\n else\n {\n \n if((strtotime($dateArrayrange[$i].\"\".$fromtime)<=strtotime($dateArrayrange[$i].\"\".$fromtimeonly) || $fromtime==\"\") && (strtotime($dateArrayrange[$i].\"\".$totime)>=strtotime($dateArrayrange[$i].\"\".$totimeonly) || $totime==\"\"))\n {\n $driveways[]=$result['drivewayID'];\n \n }\n \n }\n \n }\n \n }\n \n }\n \n }\n }\n else\n {\n \n $drivewaysdisplay[]=$result['drivewayID'];\n } \n \n if(count($driveways)>0 && (count($dateArrayrange)==count($driveways)))\n {\n array_push($drivewaysdisplay,$result['drivewayID']);\n }\n \n }\n } \n\n //Convert Search From and To date to UTC \n //Write code for changing the search from and to time to UTC\n //date_default_timezone_set($search_zone); //search location time\n $datef = new DateTime($this->input->post('fromdate', TRUE));\n $timef = new DateTime($this->input->post ( 'fromtime', TRUE )); \n $datet = new DateTime($this->input->post('todate', TRUE));\n $timet = new DateTime($this->input->post ( 'totime', TRUE )); \n\n $datefrom = new DateTime($datef->format(DATE_FORMAT) .' ' .$timef->format(TIME_FORMAT) , new DateTimeZone($search_zone));\n $datefrom->setTimezone(new DateTimeZone(UTC));\n $bookingFrom= $datefrom->format(DATE_TIME); \n $bookingFromOnly=$datefrom->format(DATE_FORMAT);\n $bookingFromTimeOnly=$datefrom->format(TIME_FORMAT);\n\n $dateto = new DateTime($datet->format(DATE_FORMAT) .' ' .$timet->format(TIME_FORMAT) , new DateTimeZone($search_zone));\n $dateto->setTimezone(new DateTimeZone(UTC));\n $bookingTo= $dateto->format(DATE_TIME);\n $bookingToOnly=$dateto->format(DATE_FORMAT);\n $bookingToTimeOnly=$dateto->format(TIME_FORMAT);\n\n $currentTime = new DateTime(date(\"Y-m-d H:i:s\") );\n $currentTime->setTimezone(new DateTimeZone(UTC));\n $nowTime = $currentTime->format(DATE_TIME);\n \n $daterangesearch= $this->createDateRangeArray($bookingFromOnly,$bookingToOnly); \n $bookingtype=array();\n $hourcharge=array();\n\t\t\n if(count($drivewaysdisplay)>0 )\n { \n for($a=0;$a<count($drivewaysdisplay);$a++)\n {\n $sql=\"select * from tbl_booking where drivewayID=\".$drivewaysdisplay[$a];\n $sql.=\" and (('$bookingFrom'>=fromdate and '$bookingFrom'<=todate) \";\n $sql.=\"or ('$bookingFrom'<=fromdate and '$bookingTo'>=todate)\";\n $sql.=\" or ('$bookingTo'>=fromdate and '$bookingTo'<=todate)\";\n $sql.=\" or ('$bookingFrom'<=fromdate and '$bookingTo'<=todate and '$bookingTo'>=fromdate)) AND (bookingStatus=1 or ((UnlockTime > '\".$nowTime.\" ' AND bookingStatus=2 AND userID NOT IN ('\".$userId.\"') ) ) )\"; \n $resultfinal = $con->query($sql); \n\n if ($resultfinal->num_rows > 0) \n {\n $drivewaycountforslot=array();\n while($row = $resultfinal->fetch_assoc()) \n {\n \n $booking_id=$row[\"bookingID\"];\n $hour=0; \n if($type==\"1\")\n { \n $drivewaybooking[]=$drivewaysdisplay[$a];\n $diff =strtotime($bookingTo) - strtotime($bookingFrom);\n $diff_in_hrs = $diff/3600;\n $hourcharge[$row[\"drivewayID\"]]=number_format($diff_in_hrs,2);\n $bookingtype[$row[\"drivewayID\"]]=\"1\";\n $drivewaycountforslot[]=$drivewaysdisplay[$a];\n \n }\n else if($type==\"3\")//for flat rate\n { \n $drivewaybooking[]=$drivewaysdisplay[$a];\n $diff = round(abs(strtotime($bookingToOnly)-strtotime($bookingFromOnly))/86400)+1;//strtotime($bookingToOnly) - \n $bookingtype[$row[\"drivewayID\"]]=\"3\";\n $hourcharge[$row[\"drivewayID\"]]=$diff;//no of day for flat rate\n }\n else //for recurring\n {\n $bookingtype[$row[\"drivewayID\"]]=\"2\";\n if($row[\"bookingType\"]==\"1\" || $row[\"bookingType\"]==\"3\")\n {\n $drivewaybooking[]= $row[\"drivewayID\"];\n $drivewaycountforslot[]= $row[\"drivewayID\"];\n }\n else\n {\n if( strtotime($bookingFromTimeOnly)<strtotime($bookingToTimeOnly) ) //If search from time < to time Ex: 10:00 to 16:00\n {\n $hour=0;\n $bookingexists=0;\n for($m=0;$m<count($daterangesearch);$m++)\n {\n $startdatetime=$daterangesearch[$m].\" \".$bookingFromTimeOnly;\n $enddatetime=$daterangesearch[$m].\" \".$bookingToTimeOnly;\n $diff =strtotime($enddatetime) - strtotime($startdatetime); \n $diff_in_hrs = $diff/3600; \n $hour=$hour+$diff_in_hrs;\n $hour = number_format($hour,2);\n \n $sqlbooking=\"Select * from tbl_booking_date where booking_id=\".$booking_id.\" and (('$startdatetime'>=start_date and '$startdatetime'<=end_date) or ('$startdatetime'<=start_date and '$enddatetime'>=end_date) or ('$enddatetime'>=start_date and '$enddatetime'<=end_date) or ('$startdatetime'<=start_date and '$enddatetime'<=end_date and '$enddatetime'>=start_date))\"; \n $resultbookingsearch = $con->query($sqlbooking);\n if ($resultbookingsearch->num_rows > 0) {\n while($rowbookingsearch = $resultbookingsearch->fetch_assoc()) {\n $bookingexists=1;\n $drivewaybooking[]= $row[\"drivewayID\"];\n } \n }\n \n }\n if($bookingexists)\n {\n \n $drivewaycountforslot[]= $row[\"drivewayID\"];\n }\n $hourcharge[$row[\"drivewayID\"]]=$hour;\n }\n else //If search from time > to time Ex: 16:00 PM to 10:00 AM //from\n {\n $hour=0;\n $bookingexists=0;\n for($m=0;$m<count($daterangesearch);$m++)\n {\n $startdatetime=$daterangesearch[$m].\" \".$bookingFromTimeOnly;\n $todate=date(DATE_FORMAT,strtotime($daterangesearch[$m]));\n $stop_date = date(DATE_FORMAT, strtotime($todate . ' +1 day'));\n $enddatetime=$stop_date.\" \".$bookingToTimeOnly; \n if($stop_date<=$bookingToOnly)\n {\n $diff = strtotime($enddatetime) - strtotime($startdatetime);\n $diff_in_hrs = $diff/3600;\n $hour=$hour+$diff_in_hrs;\n $hour = number_format($hour,2);\n \n $sqlbooking=\"Select * from tbl_booking_date where booking_id=\".$booking_id.\" and (('$startdatetime'>=start_date and '$startdatetime'<=end_date) or ('$startdatetime'<=start_date and '$enddatetime'>=end_date) or ('$enddatetime'>=start_date and '$enddatetime'<=end_date) or ('$startdatetime'<=start_date and '$enddatetime'<=end_date and '$enddatetime'>=start_date))\"; \n \n $resultbookingsearch = $con->query($sqlbooking);\n if ($resultbookingsearch->num_rows > 0) {\n while($rowbookingsearch = $resultbookingsearch->fetch_assoc()) {\n $bookingexists=1;\n $drivewaybooking[]=$row[\"drivewayID\"];\n } \n \n }\n \n } \n \n }\n if($bookingexists)\n {\n \n $drivewaycountforslot[]= $row[\"drivewayID\"];\n }\n $hourcharge[$row[\"drivewayID\"]]=$hour;\n \n }\n }\n }\n\n \n } \n //based on slot slot calculation \n if(count($drivewaycountforslot)<$slot[$drivewaysdisplay[$a]])\n {\n if(($key = array_search($drivewaysdisplay[$a], $drivewaybooking)) !== false) \n {\n unset($drivewaybooking[$key]);\n }\n \n } \n \n } \n\n else\n { \n if($type==\"1\")\n {\n $diff =strtotime($bookingTo) - strtotime($bookingFrom);\n $diff_in_hrs = $diff/3600;\n $hourcharge[$drivewaysdisplay[$a]]=number_format($diff_in_hrs,2);\n $bookingtype[$drivewaysdisplay[$a]]=\"1\"; \n }\n //for flat rate\n else if($type==\"3\")\n { \n \n $diff = abs(strtotime($bookingToOnly) - strtotime($bookingFromOnly));\n $years = floor($diff / (365*60*60*24));\n $months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));\n $diff = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24)) + 1; \n //$diff = round(abs(strtotime($bookingToOnly)-strtotime($bookingFromOnly))/86400)+1;\n $bookingtype[$drivewaysdisplay[$a]]=\"3\";\n //no of day for flat rate\n $hourcharge[$drivewaysdisplay[$a]]=$diff;\n }\n else\n {\n \n $bookingtype[$drivewaysdisplay[$a]]=\"2\";\n\t\t\t\t\t\t//If search from time < to time Ex: 10:00 to 16:00\n if( strtotime($fromtimeonly)<strtotime($totimeonly) )\n {\n $hour=0; \n \n for($m=0;$m<count($daterangesearch);$m++)\n {\n \n $startdatetime=$daterangesearch[$m].\" \".$bookingFromTimeOnly;\n $enddatetime=$daterangesearch[$m].\" \".$bookingToTimeOnly;\n $diff =strtotime($enddatetime) - strtotime($startdatetime);\n $diff_in_hrs = $diff/3600;\n \n $hour=$hour+$diff_in_hrs;\n $hour = number_format($hour,2);\n \n }\n $hourcharge[$drivewaysdisplay[$a]]=$hour;\n }\n //If search from time > to time Ex: 16:00 PM to 10:00 AM //from\n else \n {\n $hour=0;\n for($m=0;$m<count($daterangesearch);$m++)\n {\n $startdatetime=$daterangesearch[$m].\" \".$bookingFromTimeOnly;\n $todate=date(DATE_FORMAT,strtotime($daterangesearch[$m]));\n $stop_date = date(DATE_FORMAT, strtotime($todate . ' +1 day'));\n $enddatetime=$stop_date.\" \".$bookingToTimeOnly; \n if($stop_date<=$bookingToOnly)\n {\n $diff = strtotime($enddatetime) - strtotime($startdatetime);\n $diff_in_hrs = $diff/3600;\n $hour=$hour+$diff_in_hrs;\n $hour = number_format($hour,2);\n }\n }\n \n $hourcharge[$drivewaysdisplay[$a]]=$hour;\n }\n \n }\n \n } \n\n }\n \n $finaldriveways = array_diff( $drivewaysdisplay,$drivewaybooking);\n $reindexed_array = array_values(array_unique($finaldriveways));\n }\n foreach ($drivewayArray as $val) { \n if (in_array($val['drivewayID'], $reindexed_array))\n { \n array_push($availableDriveways,$val);\n } \n \n }\n if($availableDriveways)\n { \n echo json_encode(array('data' => $availableDriveways, 'hours'=>$hourcharge,'searchtype'=>$bookingtype, 'status' => 1)); \n } \n else \n {\n echo json_encode(array('data' => $availableDriveways, 'hours'=>$hourcharge,'searchtype'=>$bookingtype, 'status' => 0));\n }\n \n \n }",
"public function getUseExchangeRates();",
"function getRateByProvider(Request $request, Application $app) {\n if (!$request->has('provider')) {\n return $this->renderErrorResponse(['currency provider not detected']);\n }\n\n $provider = $request->get('provider', 'cbrf');\n\n $providerNameMap = [\n 'cbrf' => CBRFExchangeRatesProvider::NAME,\n 'yhoo' => YahooFinanceExchangeRatesProvider::NAME\n ];\n\n if (!array_key_exists($provider, $providerNameMap)) {\n return $this->renderErrorResponse(['bad provider name']);\n }\n \n return $this->renderSuccessResponse((new BaseExchangeServiceProvider($app))\n ->getCurrencyCodeRates($providerNameMap[$provider]));\n\n \n }",
"protected function rates(string $base, string $date): \\stdClass\n {\n $ch = curl_init();\n $url = self::HTTPS_API_EXCHANGERATESAPI . $date . ($base? '?base=' . $base: '');\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n $response = curl_exec($ch);\n\n $data = json_decode($response);\n if (property_exists($data, 'error')) {\n throw new \\Exception($data->error);\n }\n\n return $data;\n }",
"protected function extractedRates(string $base, string $date): \\stdClass\n {\n $data = $this->rates($base, $date);\n return $this->extractRates($data);\n }",
"function tep_get_tax_rate($class_id, $country_id = -1, $zone_id = -1) {\n\n \n//Eversun mod for sppc and qty price breaks\n// global $customer_zone_id, $customer_country_id;\n global $customer_zone_id, $customer_country_id, $sppc_customer_group_tax_exempt;\n\n if(!tep_session_is_registered('sppc_customer_group_tax_exempt')) {\n $customer_group_tax_exempt = '0';\n } else {\n $customer_group_tax_exempt = $sppc_customer_group_tax_exempt;\n }\n\n if ($customer_group_tax_exempt == '1') {\n return 0;\n }\n//Eversun mod end for sppc and qty price breaks\n if ( ($country_id == -1) && ($zone_id == -1) ) {\n if (!tep_session_is_registered('customer_id')) {\n $country_id = STORE_COUNTRY;\n $zone_id = STORE_ZONE;\n } else {\n $country_id = $customer_country_id;\n $zone_id = $customer_zone_id;\n }\n }\n\n $tax_query = tep_db_query(\"select sum(tax_rate) as tax_rate from \" . TABLE_TAX_RATES . \" tr left join \" . TABLE_ZONES_TO_GEO_ZONES . \" za on (tr.tax_zone_id = za.geo_zone_id) left join \" . TABLE_GEO_ZONES . \" tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '\" . (int)$country_id . \"') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '\" . (int)$zone_id . \"') and tr.tax_class_id = '\" . (int)$class_id . \"' group by tr.tax_priority\");\n if (tep_db_num_rows($tax_query)) {echo \"}}}}{{{{{\";\n $tax_multiplier = 1.0;\n while ($tax = tep_db_fetch_array($tax_query)) {\n $tax_multiplier *= 1.0 + ($tax['tax_rate'] / 100);\n }\n return ($tax_multiplier - 1.0) * 100;\n } else {\n return 0;\n }\n }",
"private function getRainToday() {\n //rain now\n $statement = $this->db->prepare('SELECT * FROM \"pluviometer\" ORDER BY \"created\" DESC LIMIT 1');\n $result = $statement->execute();\n $rain_end = $result->fetchArray(SQLITE3_ASSOC);\n \n //now get amount on day start\n $statement = $this->db->prepare('SELECT \"amount\" FROM \"pluviometer\" WHERE \"created\" < ? ORDER BY \"created\" DESC LIMIT 1');\n $statement->bindValue(1, explode(\" \", $rain_end['created'])[0]);\n $result = $statement->execute();\n $rain_start = $result->fetchArray(SQLITE3_ASSOC);\n \n //now clac today rain\n return floatval($rain_end[\"amount\"]) - floatval($rain_start[\"amount\"]);\n }",
"function get_payment_rate($subtotal) {}",
"private function _getRateFromAPI($from, $to)\n {\n $rate = null;\n\n return $this->currencyConverter->getRates($from, $to);\n }",
"public function getRates()\n {\n return $this->_rates;\n }",
"public function rateCall(Request $request)\n {\n $rate = new ServiceProviderRating;\n\n if (empty($request->comment)) {\n $rate->comment = \"\";\n } else {\n $rate->comment = $request->comment;\n }\n \n if (empty($request->call_rate)) {\n $rate->call_rate = 0;\n } else {\n $rate->call_rate = $request->call_rate;\n }\n \n if (empty($request->provider_rate)) {\n $rate->provider_rate = 0;\n } else {\n $rate->provider_rate = $request->provider_rate;\n }\n \n $rate->service_provider_id = $request->service_provider_id;\n if (empty($request->good_communication_skills)) {\n $rate->good_communication_skills = 0;\n } else {\n $rate->good_communication_skills = $request->good_communication_skills;\n }\n \n if (empty($request->good_teaching_skills)) {\n $rate->good_teaching_skills = 0;\n } else {\n $rate->good_teaching_skills = $request->good_teaching_skills;\n }\n\n if (empty($request->intersting_conserviation)) {\n $rate->intersting_conserviation = 0;\n } else {\n $rate->intersting_conserviation = $request->intersting_conserviation;\n }\n \n if (empty($request->kind_personality)) {\n $rate->kind_personality = 0;\n } else {\n $rate->kind_personality = $request->kind_personality;\n }\n \n if (empty($request->correcting_my_language)) {\n $rate->correcting_my_language = 0;\n } else {\n $rate->correcting_my_language = $request->correcting_my_language;\n }\n \n $rate->language_id = 1;\n \n $rate->save();\n\n $provider_rates = ServiceProviderRating::where('service_provider_id', '=', $request->service_provider_id)->get();\n $counter = 0;\n $total_rate = 0.0;\n if (count($provider_rates) > 0) {\n foreach ($provider_rates as $provider_rate) {\n ++$counter;\n $total_rate += $provider_rate->provider_rate;\n }\n $provider = ServiceProvider::findOrFail($request->service_provider_id);\n $provider->rating = $total_rate/$counter;\n $provider->save();\n }\n return response()\n ->json([\n 'success' => true,\n 'message' => __('messages.call_rate_message'),\n 'new_rate' => round($provider->rating, 2),\n 'service_provider_id' => $request->service_provider_id\n ]);\n }",
"public function computePriceProvider(){\n\n /*Price once a child is < 4 years full day 0€*/\n yield [Booking::TYPE_DAY, '2019-01-01' , false, 0];\n /*Price once a child is < 4 years full day \"reduce\" 0€*/\n yield [Booking::TYPE_DAY, '2019-01-01', true, 0];\n /*Price once a child is < 4 years half day 0€*/\n yield [Booking::TYPE_HALF_DAY, '2019-01-01', false, 0];\n /*Price once a child is < 4 years half day \"reduce\" 0€*/\n yield [Booking::TYPE_HALF_DAY, '2019-01-01', true, 0];\n\n\n /*Price once a child is 4 - 12 years full day 8€*/\n yield [Booking::TYPE_DAY, '2014-01-01', false, 8];\n /*Price once a child is 4 - 12 years full day \"reduce\" 8€*/\n yield [Booking::TYPE_DAY, '2014-01-01', true, 8];\n /*Price once a child is 4 - 12 years half day 4€*/\n yield [Booking::TYPE_HALF_DAY, '2014-01-01', false, 4];\n /*Price once a child is 4 - 12 years half day \"reduce\" 4€*/\n yield [Booking::TYPE_HALF_DAY, '2014-01-01', true, 4];\n\n\n /*Price normal full day 16€*/\n yield [Booking::TYPE_DAY, '1980-01-01', false, 16];\n /*Price normal full day \"reduce\" 10€*/\n yield [Booking::TYPE_DAY, '1980-01-01', true, 10];\n /*Price normal half day 8€*/\n yield [Booking::TYPE_HALF_DAY, '1980-01-01', false, 8];\n /*Price normal half day \"reduce\" 5€*/\n yield [Booking::TYPE_HALF_DAY, '1980-01-01', true, 5];\n\n\n /*Price senior >60 years full day 12€*/\n yield [Booking::TYPE_DAY, '1955-01-01', false, 12];\n /*Price senior >60 years full day \"reduce\" 10€*/\n yield [Booking::TYPE_DAY, '1955-01-01', true, 10];\n /*Price senior >60 years half day 6€*/\n yield [Booking::TYPE_HALF_DAY, '1955-01-01', false, 6];\n /*Price senior >60 years half day \"reduce\" 5€*/\n yield [Booking::TYPE_HALF_DAY, '1955-01-01', true, 5];\n\n }",
"function getOrCountCardsInLocation($count, $owner, $location, $ordered_by_age, $ordered_by_color) {\n \n $type_of_result = $count ? \"COUNT(*)\" : \"*\";\n $opt_order_by = $count ? \"\" : \"ORDER BY position\";\n $getFromDB = $count ? 'getUniqueValueFromDB' : 'getObjectListFromDB'; // If we count, we want to get an unique value, else, we want to get a list of cards\n \n if(!$ordered_by_age && !$ordered_by_color) {\n return self::$getFromDB(self::format(\"\n SELECT\n {type_of_result}\n FROM\n card\n WHERE\n owner = {owner} AND\n location = '{location}'\n {opt_order_by}\n \",\n array('type_of_result' => $type_of_result, 'owner' => $owner, 'location' => $location, 'opt_order_by' => $opt_order_by)\n ));\n }\n \n if ($ordered_by_age) {\n $key = 'age';\n $num_min = 1;\n $num_max = 10;\n }\n else if ($ordered_by_color) {\n $key = 'color';\n $num_min = 0;\n $num_max = 4;\n }\n \n $result = array();\n \n for($value = $num_min; $value <= $num_max; $value++) {\n $result[$value] = self::$getFromDB(self::format(\"\n SELECT\n {type_of_result}\n FROM\n card\n WHERE\n owner = {owner} AND\n location = '{location}' AND\n {key} = {value}\n {opt_order_by}\n \",\n array('type_of_result' => $type_of_result, 'owner' => $owner, 'location' => $location, 'key' => $key, 'value' => $value, 'opt_order_by' => $opt_order_by)\n ));\n }\n return $result;\n }",
"public function collectRates(RateRequest $requestData)\n {\n \t$shippingConfig = $this->_shippingCollection->loadOrderShipping($requestData->getVendorId());\n \tif (!$this->getConfigData(self::ACTIVE) && !$shippingConfig[self::ACTIVE]) {\n return false;\n }\n\n $shippingRates = $this->_shippingCollection->getRateRanger($shippingConfig[self::RATES]);\n $orderAmount = $this->getOrderAmount($requestData);\n $shippingPrice = false;\n\n \tif(empty($shippingRates)) {\n \t\treturn false;\n \t}\n\t foreach($shippingRates as $rateData) {\n\t \tif($orderAmount >= $rateData[self::MIN_AMOUNT] && $orderAmount <= $rateData[self::MAX_AMOUNT]) {\n\t \t\t$shippingPrice = $rateData[self::SHIPPING_PRICE_DATA];\n\t \t\tbreak;\n\t \t}\n\t }\n\t $rateResult = $this->_rateResultFactory->create();\n\t if ($shippingPrice !== false) {\n\t \t$rateMethod = $this->_rateMethodFactory->create();\n\t \t$rateMethod->setCarrier(self::VENDOR_ORDER_RATE);\n\t\t $rateMethod->setCarrierTitle($this->getConfigData(self::TITLE));\n\t\t /**\n\t\t * Displayed as shipping method under Carrier\n\t\t */\n\t\t $rateMethod->setMethod(self::ORDER_RATE);\n\t\t $rateMethod->setMethodTitle($this->getConfigData(self::SHIPPING_NAME));\n\t\t if ($requestData->getFreeShipping() === true || $requestData->getPackageQty() == $this->getFreeBoxes()) {\n $shippingPrice = self::SHIPPING_PRICE;\n }\n $rateMethod->setPrice($shippingPrice);\n\t\t $rateMethod->setCost($shippingPrice);\n\t\t $rateResult->append($rateMethod);\n\t }\n\t return $rateResult;\n }",
"public function bestRated_get()\n {\n $em = $this->doctrine->em;\n $serviceRepo = $em->getRepository('Entities\\Service');\n $bestRated = $serviceRepo->findBy(array(), array('globalrate' => 'DESC'), 3);\n\n foreach ($bestRated as $service) {\n $service->loadRelatedData(null, null, site_url());\n }\n\n if ($bestRated) {\n $response[\"desc\"] = \"Servicios mejores evaluados\";\n $response[\"count\"] = count($bestRated);\n $response[\"data\"] = $bestRated;\n } else {\n $response[\"desc\"] = 'No existen servicios evaluados';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"function get_tax_rate()\n\t{\n\t\tif(empty($this->address))\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$rate\t= 0;\n\t\t\n\t\t$rate += $this->get_country_tax_rate();\n\t\t$rate += $this->get_zone_tax_rate();\n\t\t$rate += $this->get_area_tax_rate();\n\t\t\n\t\t//returns the total rate not affected by price of merchandise.\n\t\treturn $rate;\n\t}",
"public function getStatForDonations() {\r\n // TODO: Move to config\r\n $requiredPerYear = 1000;\r\n $requiredPerMonth = 85;\r\n\r\n // Calculate donations received for current year\r\n $result = $this->dao->query(\"\r\n SELECT\r\n SUM(amount) AS YearDonation,\r\n year(NOW()) AS yearnow,\r\n month(NOW()) AS month,\r\n quarter(NOW()) AS quarter\r\n FROM\r\n donations\r\n WHERE\r\n created > CONCAT(CONCAT(year(NOW()), '-01'), '-01')\r\n \");\r\n $rowYear = $result->fetch(PDB::FETCH_OBJ);\r\n\r\n switch ($rowYear->quarter) {\r\n case 1:\r\n $start = $rowYear->yearnow . \"-01-01\";\r\n $end = $rowYear->yearnow . \"-04-01\";\r\n break;\r\n case 2:\r\n $start = $rowYear->yearnow . \"-04-01\";\r\n $end = $rowYear->yearnow . \"-07-01\";\r\n break;\r\n case 3:\r\n $start = $rowYear->yearnow . \"-07-01\";\r\n $end = $rowYear->yearnow . \"-10-01\";\r\n break;\r\n case 4:\r\n $start = $rowYear->yearnow . \"-10-01\";\r\n $end = $rowYear->yearnow . \"-12-31\";\r\n break;\r\n }\r\n\r\n $query = \"\r\n SELECT\r\n SUM(ROUND(amount)) AS Total,\r\n year(now()) AS year\r\n FROM\r\n donations\r\n WHERE\r\n created >= '$start'\r\n AND\r\n created < '$end'\r\n \";\r\n $result = $this->dao->query($query);\r\n\r\n $row = $result->fetch(PDB::FETCH_OBJ);\r\n $row->QuarterDonation = sprintf(\"%d\", $row->Total);\r\n $row->MonthNeededAmount = $requiredPerMonth;\r\n $row->YearNeededAmount = $requiredPerYear;\r\n $row->QuarterNeededAmount = $requiredPerMonth * 3;\r\n $row->YearDonation = $rowYear->YearDonation;\r\n\r\n return $row;\r\n }",
"function find_closest_stations ($lat, $lng, $stations, $num, $recalc = FALSE) {\r\n\tstatic $R = 6371;\r\n\tstatic $distances = array();\r\n\t$closest = -1;\r\n\treset($distances);\r\n\t//if (count(array_diff($stations_cache,$stations)) > 0) {\r\n\t//\t$stations_cache = $stations;\r\n\t// \t$recalc = TRUE;\r\n\t//}\r\n\tif (count($distances) == 0 || $recalc) {\r\n\t\t$station_ids = array_keys( $stations );\r\n\t\tfor ( $i = 0 ; $i < count( $station_ids ) ; $i++ ) {\r\n\t\t\tif ( !isset( $stations[$station_ids[$i]] ) ) { continue; }\r\n\t\t\t// check for a duplicate station using an alternate ID, e.g. 999999XXXXX or XXXXXX99999\r\n\t\t\tif ( isset( $stations[$station_ids[$i]] ) && $stations[$station_ids[$i]]['usafid'] != '999999' && $stations[$station_ids[$i]]['wban'] != '99999' ) {\r\n\t\t\t\t$i_usafid_only = $stations[$station_ids[$i]]['usafid'] . '99999';\r\n\t\t\t\tif ( isset( $stations[$i_usafid_only] ) ) {\r\n\t\t\t\t\tunset( $stations[$i_usafid_only] );\r\n\t\t\t\t\tif ( isset( $distances[$i_usafid_only] ) ) {\r\n\t\t\t\t\t\tunset( $distances[$i_usafid_only] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$i_wban_only = '999999' . $stations[$station_ids[$i]]['wban'];\r\n\t\t\t\tif ( isset( $stations[$i_wban_only] ) ) {\r\n\t\t\t\t\tunset( $stations[$i_wban_only] );\r\n\t\t\t\t\tif ( isset( $distances[$i_wban_only] ) ) {\r\n\t\t\t\t\t\tunset( $distances[$i_wban_only] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$mlat = $stations[$station_ids[$i]]['lat'];\r\n\t\t\t$mlng = $stations[$station_ids[$i]]['lng'];\r\n\t\t\t$dLat = rad($mlat - $lat);\r\n\t\t\t$dLng = rad($mlng - $lng);\r\n\t\t\t$a = sin($dLat/2) * sin($dLat/2) +\r\n\t\t\t\tcos(rad($lat)) * cos(rad($lat)) * sin($dLng/2) * sin($dLng/2);\r\n\t\t\t$c = 2 * atan2(sqrt($a), sqrt(1-$a));\r\n\t\t\t$d = $R * $c;\r\n\t\t\t/* If the distance calculation results in is_nan($d), do not add it to the distances array. \r\n\t\t\tThese values will always be pushed to the top of the array, resulting in a poor \r\n\t\t\t\"closest station\" calculation. */\r\n\t\t\tif (!is_nan($d)) {\r\n\t\t\t\t$distances[$station_ids[$i]] = $d;\r\n\t\t\t}\r\n\t\t}\r\n\t\tasort($distances);\r\n\t} else {\r\n\t\tunset($distances[key($distances)]);\r\n\t}\r\n\treturn array_slice($distances,0,$num,TRUE);\r\n}",
"public function get_nearest_driver($coordinates = array(), $category, $limit=10,$distance_unit='',$requested_drivers= array(),$global=\"\",$location = \"\",$reqType='share',$genderPref=FALSE) {\n \n\t\t$map_searching_radius = $this->config->item('map_searching_radius');\n\t\tif($map_searching_radius<1000){\n\t\t\t$map_searching_radius = 1000;\n\t\t}\n\t\tif($global==\"global\"){\n\t\t\t$map_searching_radius = 100000;\n\t\t}\n\t\t\n\t\t$distanceMultiplier = 0.001;\n\t\tif($distance_unit == 'km'){\n\t\t\t$distanceMultiplier = 0.001;\n\t\t} else if($distance_unit == 'mi'){\n\t\t\t$distanceMultiplier = 0.000621371;\n\t\t} else if($distance_unit == 'm'){\n\t\t\t$distanceMultiplier = 1;\n\t\t}\n\t\t#print_R($category);die;\n if(!is_array($requested_drivers)&& empty($requested_drivers)){\n\t\t\t$requested_drivers=array();\n\t\t}\t\t\n\t\t\n\t\t$admin_muti_vehicle_status = $this->config->item('multi_category_option');\n\t\tif($admin_muti_vehicle_status == ''){\n\t\t\t$admin_muti_vehicle_status = 'OFF';\n\t\t} \n\t\t\n $matchArr = array('availability' => array('$eq' => 'Yes'),\n\t\t\t\t\t\t\t\t\t\t'status' => array('$eq' => 'Active'),\n\t\t\t\t\t\t\t\t\t\t'verify_status' => array('$eq' => 'Yes'),\n\t\t\t\t\t\t\t\t\t\t'last_active_time' => array('$gte' => MongoDATE(time()-1800)),\n\t\t\t\t\t\t\t\t\t\t#'_id'=>array('$nin'=>$requested_drivers)\n\t\t\t\t\t\t\t\t\t);\n\t\tif($genderPref!=FALSE && $genderPref!=\"\"){\n\t\t\t$matchArr[\"gender\"] = array('$eq' =>strtolower($genderPref));\n\t\t}\n\t\t\n \n\t\tif(is_array($category) && $reqType == 'share'){ \n\t\t\tif($location!=\"\"){ \n\t\t\t\t$this->mongo_db->select(array('pool_map_search_radius'));\n\t\t\t\t$this->mongo_db->where(array('_id' => MongoID($location)));\n\t\t\t\t$res = $this->mongo_db->get(LOCATIONS);\n\t\t\t\tif($res->num_rows()>0){\n\t\t\t\t\tif(isset($res->row()->pool_map_search_radius)){\n\t\t\t\t\t\tif($res->row()->pool_map_search_radius>=1000){\n\t\t\t\t\t\t\t$map_searching_radius = $res->row()->pool_map_search_radius;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$matchArr[\"category\"] = array('$in' =>$category);\n\t\t\t$matchArr[\"active_trips\"] = array('$lt' =>intval(2));\n\t\t\t$matchArr['$or'] = array(array('mode' => array('$eq' =>'Booked'),'ride_type'=>array('$exists' =>true,'$eq' => 'Share')),\n\t\t\t\t\t\t\t\t\t\t\t\tarray('mode' => array('$eq' =>'Available'),'ride_type' => array('$exists' =>true,'$eq' =>\"Normal\")),\n\t\t\t\t\t\t\t\t\t\t\t\tarray('mode' => array('$eq' =>'Available'),'ride_type' => array('$exists' =>true,'$eq' =>\"Share\")),\n\t\t\t\t\t\t\t\t\t\t\t\tarray('mode' => array('$eq' =>'Available'),'ride_type' => array('$exists' =>true,'$eq' =>\"\")),\n\t\t\t\t\t\t\t\t\t\t\t\tarray('mode' => array('$eq' =>'Available'),'ride_type'=>array('$exists' =>false))\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t}else{\n if(is_array($category) && $reqType == 'all'){\n $matchArr[\"category\"] = array('$in' =>$category);\n } else {\n\t\t\t\tif(is_array($category)){\n\t\t\t\t\t$aCatArr = array();\n\t\t\t\t\tforeach($category as $key => $val){\n\t\t\t\t\t\t$aCatArr[] = (string) $val; \n\t\t\t\t\t} \n\t\t\t\t\t$matchArr['$or'] = array(array('category'=>array('$in' =>$category)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray('multi_car_status' => array('$eq' =>'ON'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'additional_category' => array('$eq' =>$aCatArr)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$matchArr['$or'] = array(array('category'=>array('$eq' => MongoID($category))),\n\t\t\t\t\t\t\t\t\t\t\t\t\tarray('multi_car_status' => array('$eq' =>'ON'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'additional_category' => array('$eq' =>$category)\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n }\n\t\t\t$matchArr[\"active_trips\"] = array('$lt' =>intval(1));\n\t\t\t$matchArr[\"mode\"] = array('$eq' => 'Available');\n\t\t}\n\t\t#echo '<pre>'; print_r($matchArr); die;\n\t\t\n $option = array(\n array(\n '$geoNear' => array(\"near\" => array(\"type\" => \"Point\",\n \"coordinates\" => $coordinates\n ),\n \"spherical\" => true,\n \"maxDistance\" => intval($map_searching_radius),\n \"includeLocs\" => 'loc',\n \"distanceField\" => \"distance\",\n \"distanceMultiplier\" => $distanceMultiplier,\n 'num' => (string)$limit\n ),\n ),\n array(\n '$project' => array(\n 'category' => 1,\n 'driver_name' => 1,\n 'loc' => 1,\n 'availability' => 1,\n 'status' => 1,\n 'mode' => 1,\n 'push_notification' => 1,\n 'no_of_rides' => 1,\n 'avg_review' => 1,\n 'total_review' => 1,\n 'distance' => 1,\n 'verify_status' => 1,\n 'last_active_time' => 1,\n 'active_trips' => 1,\n 'ride_type' => 1,\n\t\t\t\t\t'gender' => 1,\n\t\t\t\t\t'multi_car_status' => 1,\n\t\t\t\t\t'additional_category' => 1,\n\t\t\t\t\t'messaging_status' => 1\n )\n ),\n\t\t\tarray('$match' => $matchArr),\n array(\n '$sort' => array(\n 'distance'=>1,\n 'last_active_time' => -1\n )\n )\n );\n\t\t\n\t\t#print_r($option);\n\t\t\n $res = $this->mongo_db->aggregate(DRIVERS, $option);\n return $res;\n }",
"public function getTaxRate();",
"function search($searchType, $price, $location, $categories) {\n $url_params = array();\n \n $url_params['term'] = $searchType;\n //$url_params['location'] = $location;\n $url_params['longitude'] = $location[0];\n $url_params['latitude'] = $location[1];\n //8046.72 is equivalent to 5 miles 16093.44 is equivalent to 10 miles\n $url_params['radius'] = 16093;\n $url_params['price'] = $price;\n $url_params['sort_by'] = 'rating';\n $url_params['open_now'] = true;\n $url_params['limit'] = 20;\n $url_params['categories'] = $categories;\n \n //converts into 'https://api.yelp.com/v3/businesses/search/location&limit&price&sort_by&radius'\n $response = request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params);\n \n $pretty_response = json_encode(json_decode($response), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n\n $data = json_decode($pretty_response, true);\n\n return $data['businesses'];\n}",
"function adjust_shipping_rate($rates)\n{\n foreach ($rates as $rate) {\n if ($rate->id === 'cdek_shipping_method') {\n if (isset($_COOKIE['shipping_city_cost'])) {\n $rate->cost = $_COOKIE['shipping_city_cost'];\n $rate->label = $_COOKIE['shipping_name'];\n }\n }\n }\n return $rates;\n}",
"public function rate()\n {\n return $this->rate;\n }",
"public function rate()\n {\n return $this->rate;\n }",
"private static function getAmortizationCoefficient(float $rate): float\n {\n // Life of assets (1/rate) Depreciation coefficient\n // Less than 3 years 1\n // Between 3 and 4 years 1.5\n // Between 5 and 6 years 2\n // More than 6 years 2.5\n $fUsePer = 1.0 / $rate;\n\n if ($fUsePer < 3.0) {\n return 1.0;\n } elseif ($fUsePer < 4.0) {\n return 1.5;\n } elseif ($fUsePer <= 6.0) {\n return 2.0;\n }\n\n return 2.5;\n }",
"function get_price_rate($price)\n { \n $rtn = array();\n foreach ( $price as $key=>$item)\n { // cost\n if($item['rate_type']==2 && $item['customer_level_id']==0)\n $rtn['cost']=$item['zone']; \n //contract\n if($item['rate_type']==1 && $item['customer_level_id']==0)\n $rtn['contract']=$item['zone']; \n //customer L0\n if($item['rate_type']==3 && $item['customer_level_id']==1)\n $rtn['1']=$item['zone']; \n //customer L1\n if($item['rate_type']==3 && $item['customer_level_id']==2)\n $rtn['2']=$item['zone']; \n //customer L2\n if($item['rate_type']==3 && $item['customer_level_id']==3)\n $rtn['3']=$item['zone']; \n //customer L3\n if($item['rate_type']==3 && $item['customer_level_id']==4)\n $rtn['4']=$item['zone']; \n //customer L4\n if($item['rate_type']==3 && $item['customer_level_id']==5)\n $rtn['5']=$item['zone']; \n\n\n\n } \n return $rtn;\n }",
"public function getRating();",
"public function getRating();",
"public function fetchRates($currency1, $currency2, Logger $logger);",
"public function calculateRates(ShipmentInterface $shipment);",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getInterestRate()\n {\n return (1 + ((float) $this->_webserviceHelper->getConfigData('interest_rate') / 100));\n }",
"public static function getUSDCurrencyExchangeRates()\n { \n $ch = curl_init(_URL_YAHOOAPI);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\n $html = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($html);\n }",
"public function fetchAllRates(Logger $logger);",
"function GetExchangeRateAPI() {\n $conditions = '?base=JPY';\n $request = EXCHANGE_RATE_API_URL.$conditions;\n $response = file_get_contents($request);\n\n return json_decode($response, true);\n }",
"function getInterestFactor($interest)\n{\n $rate = $interest / 365.25;\n return $rate;\n}",
"public function rate()\n {\n\n }",
"protected function number_to_rate($row) {\n\t\tif ($row['record_type'] == \"e\") {\n\t\t\treturn NULL;\n\t\t} else if (($row['record_type'] == \"9\") && isset($row['called_number'])) {\n\t\t\treturn $row->get('called_number');\n\t\t} else if (($row['record_type'] == \"a\") && isset($row['calling_number'])) {\n\t\t\treturn $row->get('calling_number');\n\t\t} else {\n\t\t\tBillrun_Factory::log(\"Couldn't find rateable number for line : {$row['stamp']}\");\n\t\t}\n\t}",
"public function getBaseToOrderRate();",
"abstract public function getExchangeRate($fromCurrency, $toCurrency);",
"private function findRecommendation(){\n $placeModel = new Place();\n $places = $placeModel->getAllCategorized();\n $bestScore = PHP_INT_MAX;\n $idBest = 0;\n\n foreach($places as $place){\n $currScore = 0;\n $currScore += abs($place->heritage - $this->score['heritage'] );\n $currScore += abs($place->relax - $this->score['relax'] );\n $currScore += abs($place->sightseeing - $this->score['sightseeing']);\n $currScore += abs($place->weather - $this->score['weather']) ;\n $currScore += abs($place->populated - $this->score['populated'] );\n\n if($currScore < $bestScore){\n $bestScore = $currScore;\n $idBest = $place->id_plc;\n }\n\n }\n\n return $idBest;\n }",
"function getSolarTerm($dayNumber, $timeZone) {\n\treturn INT(SunLongitude($dayNumber - 0.5 - $timeZone/24.0) / PI * 12);\n}",
"function getCurrencyRates() {\n\t// If you change these, make sure to also update any JS validation scripts\n\t// For now I'm not rounding numbers under 1 because I don't think that's a big issue and could cause issues with the max check.\n\t$currencyRates = array(\n\t\t'AED' => '4',\n\t\t'ARS' => '4',\n\t\t'AUD' => '1',\n\t\t'BBD' => '2',\n\t\t'BDT' => '76',\n\t\t'BGN' => '1',\n\t\t'BHD' => '0.4',\n\t\t'BMD' => '1',\n\t\t'BND' => '1',\n\t\t'BOB' => '7',\n\t\t'BRL' => '2',\n\t\t'BSD' => '1',\n\t\t'BZD' => '2',\n\t\t'CAD' => '1',\n\t\t'CHF' => '0.9',\n\t\t'CLP' => '494',\n\t\t'CNY' => '6',\n\t\t'COP' => '1910',\n\t\t'CRC' => '512',\n\t\t'CZK' => '18',\n\t\t'DKK' => '5',\n\t\t'DOP' => '38',\n\t\t'DZD' => '73',\n\t\t'EEK' => '11',\n\t\t'EGP' => '6',\n\t\t'EUR' => '0.7',\n\t\t'GBP' => '0.6',\n\t\t'GTQ' => '8',\n\t\t'HKD' => '8',\n\t\t'HNL' => '19',\n\t\t'HRK' => '5',\n\t\t'HUF' => '219',\n\t\t'IDR' => '8960',\n\t\t'ILS' => '4',\n\t\t'INR' => '49',\n\t\t'JMD' => '85',\n\t\t'JOD' => '0.7',\n\t\t'JPY' => '78',\n\t\t'KES' => '97',\n\t\t'KRW' => '1127',\n\t\t'KYD' => '0.8',\n\t\t'KZT' => '147',\n\t\t'LBP' => '1500',\n\t\t'LKR' => '110',\n\t\t'LTL' => '2',\n\t\t'LVL' => '0.5',\n\t\t'MAD' => '8',\n\t\t'MKD' => '45',\n\t\t'MUR' => '29',\n\t\t'MVR' => '15',\n\t\t'MXN' => '13',\n\t\t'MYR' => '3',\n\t\t'NOK' => '5',\n\t\t'NZD' => '1',\n\t\t'OMR' => '0.3',\n\t\t'PAB' => '1',\n\t\t'PEN' => '3',\n\t\t'PHP' => '43',\n\t\t'PKR' => '86',\n\t\t'PLN' => '3',\n\t\t'PYG' => '4190',\n\t\t'QAR' => '4',\n\t\t'RON' => '3',\n\t\t'RUB' => '30',\n\t\t'SAR' => '4',\n\t\t'SEK' => '6',\n\t\t'SGD' => '1',\n\t\t'SVC' => '9',\n\t\t'THB' => '30',\n\t\t'TJS' => '5',\n\t\t'TND' => '1',\n\t\t'TRY' => '2',\n\t\t'TTD' => '6',\n\t\t'TWD' => '30',\n\t\t'UAH' => '8',\n\t\t'USD' => '1',\n\t\t'UYU' => '19',\n\t\t'UZS' => '1760',\n\t\t'VND' => '21000',\n\t\t'XAF' => '470',\n\t\t'XCD' => '3',\n\t\t'XOF' => '476',\n\t\t'ZAR' => '8',\n\t);\n\t\n\treturn $currencyRates;\n}",
"public function getRateByCourseId($id)\n {\n $rate = DB::table('courses_rate')\n ->where('course_id','=',$id)\n ->get();\n if(count($rate)>0)\n return $rate;\n }",
"protected static function requestUpdatedRate( $from_iso_code, $to_iso_code ){\n \n $from_iso_code = \\Altumo\\Validation\\Strings::assertNonEmptyString(\n $from_iso_code,\n '$from_iso_code expects non-empty string'\n ); \n \n $to_iso_code = \\Altumo\\Validation\\Strings::assertNonEmptyString(\n $to_iso_code,\n '$to_iso_code expects non-empty string'\n );\n \n // Get exchange rate from yahoo finance.\n $query = \"{$from_iso_code}{$to_iso_code}=X\";\n\n $url = 'http://download.finance.yahoo.com/d/quotes.csv?s=' . $query . '&f=l1&e=.cs';\n\n $http_request = new \\Altumo\\Http\\OutgoingHttpRequest( $url );\n $http_request->setHeaders(\n array( \n 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.60 Safari/537.11', \n 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-Requested-With' => 'XMLHttpRequest'\n )\n );\n\n $response = \\Altumo\\Validation\\Numerics::assertPositiveDouble(\n trim($http_request->sendAndGetResponseMessage()->getRawMessageBody()),\n 'Unable to update currency exchange rate. Invalid response received.'\n ); \n \n \n return (float)$response;\n \n // Google implementation (unsupported by google, likely unreliable).\n /* $query = \"1{$from_iso_code}=?{$to_iso_code}\";\n\n $url = 'http://www.google.com/ig/calculator?hl=en&q=' . urlencode($query);\n\n $http_request = new \\Altumo\\Http\\OutgoingHttpRequest( $url );\n $http_request->setHeaders(\n array( \n 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.60 Safari/537.11', \n 'Content-Type' => 'application/x-www-form-urlencoded; charset=UTF-8',\n 'X-Requested-With' => 'XMLHttpRequest'\n )\n );\n $response = $http_request->sendAndGetResponseMessage()->getRawMessageBody();\n\n if( preg_match('/^.*?rhs\\\\:.*?([-+]?\\\\b[0-9]+(\\\\.[0-9]+)?\\\\b)/m', $response, $matches) ){\n $rate = $matches[1];\n } else {\n throw new \\Exception( 'Error retrieving an updated currency conversion rate. (unexpected format)' );\n }*/\n\n }",
"public function extractRates(\\stdClass $data): \\stdClass\n {\n if (!property_exists($data, 'rates')) {\n throw new \\Exception('Smth went wrong');\n }\n if (!property_exists($data, 'base')) {\n throw new \\Exception('Smth went wrong');\n }\n\n $rates = [];\n foreach ($this->currencies as $currency) {\n if (property_exists($data->rates, $currency)) {\n $rates[$currency] = $data->rates->$currency;\n } else if ($data->base == $currency) {\n $rates[$currency] = 1;\n } else {\n throw new \\Exception('Requested currency (' . $currency . ') doesn\\'t exist');\n }\n }\n\n return (object) $rates;\n }",
"public function getRate() {\n return $this->rate;\n }"
] | [
"0.6051194",
"0.6046116",
"0.60363394",
"0.5929003",
"0.59093875",
"0.58738256",
"0.5805983",
"0.56745636",
"0.548379",
"0.5468481",
"0.540387",
"0.53973675",
"0.53865564",
"0.5377251",
"0.5269662",
"0.52636456",
"0.5255585",
"0.52458566",
"0.5197948",
"0.51747507",
"0.5171492",
"0.5171492",
"0.5167617",
"0.51132524",
"0.50757456",
"0.5067644",
"0.5036326",
"0.49779704",
"0.492121",
"0.4918965",
"0.49116954",
"0.48946366",
"0.4880509",
"0.48608068",
"0.48415726",
"0.48142847",
"0.48115912",
"0.48104325",
"0.48098215",
"0.48055592",
"0.47967035",
"0.47946948",
"0.4793993",
"0.47898108",
"0.47846222",
"0.47814146",
"0.47712186",
"0.47677547",
"0.4766703",
"0.47573137",
"0.47524706",
"0.47279653",
"0.47219908",
"0.4712404",
"0.47030836",
"0.46999484",
"0.4698709",
"0.4698469",
"0.46897408",
"0.46893433",
"0.46827483",
"0.46774787",
"0.4676008",
"0.4671274",
"0.46685076",
"0.4666756",
"0.4666659",
"0.466245",
"0.4659731",
"0.46556586",
"0.46499068",
"0.46488813",
"0.46472535",
"0.46472535",
"0.46456492",
"0.46435946",
"0.46434298",
"0.46434298",
"0.464267",
"0.4641753",
"0.46326151",
"0.46326151",
"0.46326151",
"0.46326151",
"0.46326151",
"0.46244335",
"0.46190235",
"0.4614929",
"0.46121767",
"0.4609664",
"0.46022567",
"0.45942608",
"0.45914117",
"0.4591221",
"0.4583697",
"0.45828575",
"0.4582066",
"0.4579",
"0.4573153",
"0.45677018",
"0.45605108"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
\DB::table('surat_korespondensi')->insert(array (
0 =>
array(
'name'=>'Surat Pernyataan',
'location'=>'uploads/suratkorespondensi/surat-pernyataan.doc',
),
1=>
array(
'name'=>'Pakta Integritas',
'location'=>'uploads/suratkorespondensi/pakta-integritas.doc',
),
2 =>
array(
'name'=>'Surat Kuasa',
'location'=>'uploads/suratkorespondensi/surat-kuasa.doc',
),
3=>
array(
'name'=>'Surat Kuasa 2',
'location'=>'uploads/suratkorespondensi/surat-kuasa-2.doc',
),
4 =>
array(
'name'=>'Surat Permohonan referensi Bank',
'location'=>'uploads/suratkorespondensi/surat-permohonan-referensi-bank.doc',
),
5=>
array(
'name'=>'Surat Pernyataan Kebenaran Dokumen',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-kebenaran-dokumen.doc',
),
6 =>
array(
'name'=>'Surat Pernyataan Memiliki Kemampuan Sesuai Bidang',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-memiliki-kemampuan-sesuai-bidang.doc',
),
7=>
array(
'name'=>'Surat Pernyataan Memiliki Tenaga Ahli Sesuai Tugas',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-memiliki-tenaga-ahli-sesuai-tugas.doc',
),
8 =>
array(
'name'=>'Surat Pernyataan Mengahadirkan Tenaga Ahli saat Negosiasi',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-menghadirkan-tenaga-ahli-saat-negosiasi.doc',
),
9=>
array(
'name'=>'Surat Pernyataan Menyediakan Fasilitas',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-menyediakan-fasilitas.doc',
),
10 =>
array(
'name'=>'Surat Pernyataan Menyediakan Tenaga Ahli',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-menyediakan-tenaga-ahli.doc',
),
11=>
array(
'name'=>'Surat Pernyataan Minat',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-minat.doc',
),
12 =>
array(
'name'=>'Surat Pernyataan Patuh Pada Peraturan',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-patuh-pada-peraturan.doc',
),
13=>
array(
'name'=>'Surat Pernyataan Sanggup Menyelesaikan Sesuai Jadwal',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-sanggup-menyelesaikan-sesuai-jadwal.doc',
),
14=>
array(
'name'=>'Surat Pernyataan Tidak Masuk Daftar Hitam',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-tidak-masuk-daftar-hitam.doc',
),
15=>
array(
'name'=>'Surat Pernyataan Tidak Menuntut',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-tidak-menuntut.doc',
),
16=>
array(
'name'=>'Surat Pernyataan Tidak Pailit',
'location'=>'uploads/suratkorespondensi/surat-pernyataan-tidak-pailit.doc',
),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
DB::table('empresas')->insert([
'nome' => 'EMPRESA A',
'cnpj' => '11122233344455566699',
'email' => '[email protected]',
'telefone' => '2222-3333',
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\n };\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }",
"public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\n\n ]\n );\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
hasMany association via Containable. Should still work when Linkable is loaded | public function testHasMany()
{
$arrayExpected = array(
'User' => array('id' => 1, 'username' => 'CakePHP'),
'Comment' => array(
0 => array(
'id' => 1,
'user_id' => 1,
'body' => 'Text'
),
1 => array(
'id' => 2,
'user_id' => 1,
'body' => 'Text'
),
)
);
$arrayResult = $this->User->find('first', array(
'contain' => array(
'Comment'
),
'order' => 'User.id ASC'
));
$this->assertTrue(isset($arrayResult['Comment']), 'hasMany association via Containable: %s');
$this->assertEqual($arrayResult, $arrayExpected, 'hasMany association via Containable: %s');
// Same association, but this time with Linkable
$arrayExpected = array(
'User' => array('id' => 1, 'username' => 'CakePHP'),
'Comment' => array(
'id' => 1,
'user_id' => 1,
'body' => 'Text'
)
);
$arrayResult = $this->User->find('first', array(
'fields' => array(
'id',
'username'
),
'contain' => false,
'link' => array(
'Comment' => array(
'fields' => array(
'id',
'user_id',
'body'
)
)
),
'order' => 'User.id ASC',
'group' => 'User.id'
));
$this->assertEqual($arrayResult, $arrayExpected, 'hasMany association via Linkable: %s');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHasMany()\n {\n return $this->hasMany;\n }",
"public function hasMany($class, $foreignKey = null, $localKey = null);",
"public function setupAssociations() \n {\n \n }",
"public function testGetModelAssociation()\n {\n $user = new User();\n $assoc = $user->reflectOnAssociation('Articles');\n $this->assertTrue($assoc instanceof Mad_Model_Association_HasMany);\n }",
"public function isRelated();",
"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 }",
"public function loadRelated()\n {\n return;\n }",
"public function getLinks(){\n return $this->hasMany('App\\LinkCircular','id_circular');\n }",
"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}",
"public function link()\n {\n return $this->belongsTo(Link::class);\n }",
"public function links(): BelongsToMany\n {\n return $this->belongsToMany(Link::class);\n }",
"protected static function _relations() {\n\n\t}",
"public function setRelations() {}",
"private function hasMany($table, $foreignTableName) {\n $foreignTableName = strtolower($foreignTableName);\n assert('!empty($table->primaryKey); // table needs to have primary key defined for table join');\n\n // can we load the foreign table?\n if (class_exists(ucfirst($foreignTableName))) {\n // capitalize\n $foreignTableName = ucfirst($foreignTableName);\n // note the foreign table might have relationships of its own...\n $foreignTable = new $foreignTableName();\n assert('!empty($foreignTable->primaryKey); // foreign table needs to have primary key defined');\n\n // create the join where \"ourTable.ourId=foreignTable.ourTable_ourId\"\n $table->join($foreignTable->tableName, array(\n \"{$table->tableName}.{$table->primaryKey}\"\n => \"{$foreignTable->tableName}.{$table->tableName}_{$table->primaryKey}\"\n ));\n // as an added bonus, we might have a relationship in the foreign table, add it...\n $table->join .= $foreignTable->join;\n } else {\n // we will have to rely on our primary key\n // create the join where \"ourTable.ourId=foreignTable.ourTable_ourId\"\n $table->join($foreignTableName->tableName, array(\n \"{$table->tableName}.{$table->primaryKey}\"\n => \"{$foreignTableName->tableName}.{$table->tableName}_{$table->primaryKey}\"\n ));\n }\n }",
"public function testSaveAssociatedOnlyEntitiesAppend(): void\n {\n $connection = ConnectionManager::get('test');\n $table = $this->getMockBuilder(MockedTable::class)\n ->setConstructorArgs([['table' => 'tags', 'connection' => $connection]])\n ->getMock();\n $table->setPrimaryKey('id');\n\n $config = [\n 'sourceTable' => $this->article,\n 'targetTable' => $table,\n 'saveStrategy' => BelongsToMany::SAVE_APPEND,\n ];\n\n $entity = new Entity([\n 'id' => 1,\n 'title' => 'First Post',\n 'tags' => [\n ['tag' => 'nope'],\n new Entity(['tag' => 'cakephp']),\n ],\n ]);\n\n $table->expects($this->never())\n ->method('saveAssociated');\n\n $association = new BelongsToMany('Tags', $config);\n $association->saveAssociated($entity);\n }",
"public function testGetAssociationNotDirtyBelongsTo(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n /** @var \\Cake\\ORM\\Table|\\Cake\\ORM\\Behavior\\TranslateBehavior $authors */\n $authors = $table->belongsTo('Authors')->getTarget();\n $authors->addBehavior('Translate', ['fields' => ['name']]);\n\n $authors->setLocale('eng');\n\n $entity = $table->get(1);\n $this->assertNotEmpty($entity);\n $entity = $table->loadInto($entity, ['Authors']);\n $this->assertFalse($entity->isDirty());\n $this->assertNotEmpty($entity->author);\n $this->assertFalse($entity->author->isDirty());\n\n $entity = $table->get(1, ...['contain' => ['Authors']]);\n $this->assertNotEmpty($entity);\n $this->assertFalse($entity->isDirty());\n $this->assertNotEmpty($entity->author);\n $this->assertFalse($entity->author->isDirty());\n }",
"public function link()\n {\n return $this->belongsTo('App\\Models\\MenuLink');\n }",
"public function buildRelations()\n {\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('idbanco' => 'idbanco', ), 'CASCADE', 'CASCADE');\n }",
"public function buildRelations()\n {\n $this->addRelation('RemoteApp', 'Slashworks\\\\AppBundle\\\\Model\\\\RemoteApp', RelationMap::MANY_TO_ONE, array('remote_app_id' => 'id', ), 'CASCADE', 'CASCADE');\n }",
"public function getQueueableRelations();",
"public function getQueueableRelations();",
"public function hasMany()\n {\n if ($this->relationship === null)\n {\n $this->relationship = DataModel_Relationship::HAS_MANY;\n return $this;\n }\n else\n {\n \treturn $this->relationship & DataModel_Relationship::HAS_MANY;\n }\n }",
"public function order(): BelongsTo;",
"public function referencedEntities();",
"public function getWithRelations();",
"public function linkable()\n {\n \treturn $this->morphTo();\n }",
"public function product(): BelongsTo\n {\n return $this->belongsTo(ProductProxy::modelClass());\n }",
"public function contract_has_many_invoices()\n {\n $this->assertEquals(self::$contract->invoice(), self::$contract->hasMany('App\\Invoice', 'contract_id'));\n }",
"public function belongsToRelation()\n {\n return $this->belongsTo(Relations::class)\n ->foreignKey('on_table_id');\n }",
"public function complex()\n\t{ \n\t\treturn $this->belongsToThrough(HafizComplex::class, HafizBuilding::class, null, '', [\n\t\t\tHafizComplex::class => 'complex_id', \n\t\t\tHafizBuilding::class=> 'building_id' \n\t\t]);\n\t}",
"public function defineRelations()\n\t{\n\t\treturn array();\n\t}",
"public function testGetAssociation()\n {\n $this->fixtures('users', 'articles');\n\n $user = User::find($this->users('derek')->id);\n $this->assertTrue($user->articles instanceof Mad_Model_Collection);\n $this->assertTrue($user->articles[0] instanceof Article);\n }",
"public function Link()\n {\n return $this->belongsTo('CommunityLink');\n }",
"public function isReferencingCollection(): bool;",
"abstract function relations();",
"public function initialize()\n {\n $this->hasMany('informacion_id', 'Informacionadicional', 'informacion_id', array('alias' => 'Informacionadicional'));\n $this->belongsTo('informacion_adicionalId', 'Adicional', 'adicional_id', array('alias' => 'Adicional'));\n }",
"public function testAddLinkToIncludedShowLinkMembers()\n {\n $this->document->addToIncluded($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl'), // self url\n [], // links for resource\n ['this meta' => 'wont be shown'], // meta when primary resource\n [LinkInterface::SELF => new Link('peopleSelfUrl')], // links for included resource\n false, // show 'relationships' in 'included'\n ['some' => 'author meta'] // meta when resource within 'included'\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('selfUrlWillBeHidden/'),\n [LinkInterface::SELF => new Link('selfUrlWillBeHidden/')], // links for resource\n ['this meta' => 'wont be shown'], // meta when resource is primary\n [], // links for included resource\n false, // show relationships in 'included'\n ['this meta' => 'wont be shown'], // meta when resource within 'included'\n ['some' => 'comment meta'] // meta when resource is in relationship\n ), new stdClass(), false);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [\n LinkInterface::SELF => new Link('selfSubUrl'),\n LinkInterface::RELATED => new Link('relatedSubUrl'),\n ],\n ['some' => 'relationship meta'], // relationship meta\n true, // show data\n false // is root\n );\n\n $this->document->addRelationshipToIncluded($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : null,\n \"included\" : [{\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : {\"some\" : \"comment meta\"} },\n \"meta\" : { \"some\" : \"relationship meta\" },\n \"links\" : {\n \"self\" : \"selfSubUrl\",\n \"related\" : \"relatedSubUrl\"\n }\n }\n },\n \"links\" : {\n \"self\" : \"peopleSelfUrl\"\n },\n \"meta\" : {\n \"some\" : \"author meta\"\n }\n }]\n }\nEOL;\n $this->check($expected);\n }",
"public function buildRelations()\n {\n $this->addRelation('Marca', 'Marca', RelationMap::MANY_TO_ONE, array('idmarca' => 'idmarca', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Proveedor', 'Proveedor', RelationMap::MANY_TO_ONE, array('idproveedor' => 'idproveedor', ), 'CASCADE', 'CASCADE');\n }",
"public function getAssociation()\n {\n\n }",
"public function testGetAssociationNotDirtyHasOne(): void\n {\n $table = $this->getTableLocator()->get('Authors');\n $table->hasOne('Articles');\n $table->Articles->addBehavior('Translate', ['fields' => ['title']]);\n\n $entity = $table->get(1);\n $this->assertNotEmpty($entity);\n $entity = $table->loadInto($entity, ['Articles']);\n $this->assertFalse($entity->isDirty());\n $this->assertNotEmpty($entity->article);\n $this->assertFalse($entity->article->isDirty());\n\n $entity = $table->get(1, ...['contain' => 'Articles']);\n $this->assertNotEmpty($entity);\n $this->assertFalse($entity->isDirty());\n $this->assertNotEmpty($entity->article);\n $this->assertFalse($entity->article->isDirty());\n }",
"public function testDeletingModelBelongsToManyWithWhereHasRelation()\n {\n $user = User::create(['uuid' => '54556', 'name' => 'Creepy Dude']);\n $master = Role::create(['title' => 'Master']);\n $admin = Role::create(['title' => 'Admin']);\n $editor = Role::create(['title' => 'Editor']);\n\n $edges = $user->roles()->attach([$master, $admin, $editor]);\n\n $fetched = User::find($user->getKey());\n $this->assertEquals(3, count($user->roles), 'relations created successfully');\n\n $deleted = $fetched->whereHas('roles', function ($q) {\n $q->where('title', 'Master');\n })->delete();\n\n $this->assertTrue((bool) $deleted);\n\n $again = User::find($user->getKey());\n $this->assertNull($again);\n\n // roles should've been deleted too.\n $masterDeleted = Role::find($master->getKey());\n $this->assertEquals($master->toArray(), $masterDeleted->toArray());\n\n $adminDeleted = Role::find($admin->getKey());\n $this->assertEquals($admin->toArray(), $adminDeleted->toArray());\n\n $editorDeleted = Role::find($editor->getKey());\n $this->assertEquals($editor->toArray(), $editorDeleted->toArray());\n }",
"public function buildRelations()\n {\n $this->addRelation('ArtRequest', 'ArtRequestORM\\\\ArtRequest', RelationMap::ONE_TO_MANY, array('event_id' => 'event_id', ), 'CASCADE', 'CASCADE', 'ArtRequests');\n }",
"protected function relations()\n {\n $this->belongsTo(\n 'language_iso',\n ModelLanguage::class,\n 'iso',\n [\n 'alias' => 'Language',\n 'foreignKey' => true\n ]\n );\n }",
"public function user(): BelongsTo;",
"public function initialize()\n {\n $this->hasMany(\"members_id\", \"\\Event\\Model\\Events\", \"members_id\", ['alias' => 'Events']);\n }",
"public function hasRelation($model, $foreignKey, $localKey);",
"public function addAssociationTarget($target)\n {\n }",
"public static function workflowRelations();",
"public function links()\n {\n return $this->hasMany(Link::class);\n }",
"public function hasAssociationTarget($target)\n {\n }",
"public function buildRelations()\n\t{\n $this->addRelation('Aviso', 'Aviso', RelationMap::MANY_TO_ONE, array('aviso_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n\t}",
"protected function withRelationships()\n {\n if ($this->resource instanceof Model) {\n $this->attachRelations($this->resource);\n }\n }",
"public function get_associated() {\n\t\t// convert relationships to associative arrays for faster access\n\t\t$belongs_to_assoc = array();\n\t\t$has_one_assoc = array();\n\t\t$has_many_assoc = array();\n\n\t\tforeach ($this->belongs_to as $v)\n\t\t\t$belongs_to_assoc[$v] = true;\n\t\tforeach ($this->has_one as $v)\n\t\t\t$has_one_assoc[$v] = true;\n\t\tforeach ($this->has_many as $v)\n\t\t\t$has_many_assoc[$v] = true;\n\n\t\t$args = func_get_args();\n\n\t\t// no argument, so get all associations\n\t\tif (empty($args))\n\t\t\t$fetch = array_merge($this->belongs_to, $this->has_one, $this->has_many);\n\n\t\t// array argument, so use that list\n\t\telse if (is_array($args[0]))\n\t\t\t$fetch = $args[0];\n\n\t\t// string argument, so construct array\n\t\telse\n\t\t\t$fetch = array($args[0]);\n\n\t\t// load each association\n\t\tforeach ($fetch as $association) {\n\t\t\tif (isset($belongs_to_assoc[$association]) || isset($has_one_assoc[$association])) {\n\t\t\t\t$key = strtolower($association);\n\t\t\t\t$value = $this->{$key};\n\t\t\t}\n\n\t\t\telse if (isset($has_many_assoc[$association])) {\n\t\t\t\t$key = strtolower($association) . 's';\n\t\t\t\t$value = $this->{$key};\n\t\t\t}\n\t\t}\n\n\t\t// allow method chaining\n\t\treturn $this;\n\t}",
"public function belongsTo($class, $foreignKey = null, $otherKey = null);",
"public function hasRelationship() {\n return $this->_has(1);\n }",
"public function relationLoaded( $key );",
"protected function relationship() {\n \n $this->message(__METHOD__);\n\n $t = $this->peek();\n if ($t != EPL_T_HAS && $t != EPL_T_COMPOSED_OF) {\n $this->syntax_error(\"'has' or 'composed_of' is expected\");\n return false;\n }\n $this->next();\n\n // fix bug 179: allow date type keywords to be class names\n $this->_lexer->toggleDataTypeTokens();\n\n // get type\n $type = epFieldMap::DT_HAS;\n if ($t == EPL_T_COMPOSED_OF) {\n $type = epFieldMap::DT_COMPOSED_OF;\n }\n\n // create a relationship field map\n $this->map['type'] = $type;\n $this->map['params'] = array();\n\n // one?\n $this->map['params']['is_many'] = false;\n if ($this->peek() == EPL_T_ONE) {\n $this->next();\n } \n // many?\n else if ($this->peek() == EPL_T_MANY) {\n $this->next();\n $this->map['params']['is_many'] = true;\n }\n\n // class\n $this->map['params']['class'] = false;\n if ($this->peek() == EPL_T_IDENTIFIER) {\n $this->next();\n $this->map['params']['class'] = $this->t->value;\n } else {\n $this->syntax_error(\"Class name is expected\");\n return false;\n }\n \n // toggle data types back\n $this->_lexer->toggleDataTypeTokens();\n\n // inverse\n $this->map['params']['inverse'] = false;\n if ($this->peek() == EPL_T_INVERSE) {\n \n // consume inverse\n $this->next();\n \n // get inverse parameters\n $params = $this->params();\n if (!$params || count($params) != 1) {\n $this->syntax_error(\"Invalid parameters for inverse\");\n return false;\n }\n $this->map['params']['inverse'] = $params[0];\n }\n\n return true;\n }",
"public function houses(){\n return $this->belongsToMany(House::class);\n }",
"private function compileHasManyRelations()\n {\n //get all foreign keys\n $foreignKeys = $this->schema->listForeignKeys();\n\n //get all foreign keys, where foreign table is equal to this table\n $filteredForeignKeys = [];\n foreach ($foreignKeys as $foreignKey) {\n if ($foreignKey->getForeignTableName() === $this->tableName) {\n array_push($filteredForeignKeys, $foreignKey);\n }\n }\n\n //get \"has many\" relations and call compiler for each\n $relationsCompiled = '';\n foreach ($filteredForeignKeys as $foreignKey) {\n\n $localTableName = $foreignKey->getLocalTableName();\n\n $modelName = Helper::tableNameToModelName($localTableName, $this->dbTablePrefix);\n\n $relationCompiler = new HasManyRelationCompiler();\n $relationsCompiled .= \"\\n\\n\\t\" . $relationCompiler->compile([\n 'modelName' => $modelName,\n 'foreignKey' => $foreignKey->getColumns()[0],\n 'modelsNamespace' => $this->modelsNamespace,\n ]);\n\n //add new param\n $this->relationTableModelParams[] = new RelationTableModelParamBag(\n str_plural(camel_case($modelName)),\n $localTableName,\n $modelName);\n }\n\n //{{HasManyRelations}}\n $this->replaceInStub(['{{HasManyRelations}}' => $relationsCompiled]);\n }",
"public function getLazyRelationshipsAttribute()\n {\n return ['photo', 'user'];\n }",
"public static function belongsToManyAttaching($callback)\n {\n static::registerModelBelongsToManyEvent('belongsToManyAttaching', $callback);\n }",
"public function belongsToMany($class, $joinTable = null, $localForeignKey = null, $otherForeignKey = null, $localKey = null, $otherKey = null);",
"public function initialize()\n {\n $this->hasMany('id', 'Movie', 'classification_id', array('alias' => 'Movie'));\n }",
"public function items()\n {\n return $this->hasMany(LinklistItem::class, 'linklist_id');\n }",
"public function testOneToMany()\n {\n $contestTable = $this->databaseMap->getTableByPhpName('Propel\\Tests\\BookstoreSchemas\\BookstoreContest');\n $contestToBookstore = $contestTable->getRelation('Bookstore');\n $bookstoreTable = $this->databaseMap->getTableByPhpName('Propel\\Tests\\BookstoreSchemas\\Bookstore');\n $bookstoreToContest = $bookstoreTable->getRelation('BookstoreContest');\n\n $this->markTestIncomplete('The two following tests don\\'t pass');\n $this->assertEquals($bookstoreToContest->getName(), $contestToBookstore->getSymmetricalRelation()->getName());\n $this->assertEquals($contestToBookstore->getName(), $bookstoreToContest->getSymmetricalRelation()->getName());\n }",
"abstract public function included(): ?JsonApiParser\\Collections\\Relations;",
"public function testHasMany()\n {\n $plan = $this->factory(Plan::class)->create();\n\n $this->factory(Member::class, 3)\n ->state(PremiumMember::class)\n ->create(['plan_id' => $plan->id]);\n\n $this->factory(Member::class)\n ->state(RegularMember::class)\n ->create(['plan_id' => $plan->id]);\n\n $this->assertCount(3, $plan->members->filter(function ($member) {\n return $member instanceof PremiumMember;\n }));\n\n $this->assertCount(1, $plan->members->filter(function ($member) {\n return $member instanceof RegularMember;\n }));\n }",
"public function sons(): HasMany\n {\n return $this->hasMany(Article::class, 'parent_id', 'id');\n // ->with(['post'])->orderBy('pos');\n }",
"public function isAddToRelationship();",
"public function buildRelations()\n {\n $this->addRelation('Contrarecibo', 'Contrarecibo', RelationMap::MANY_TO_ONE, array('idcontrarecibo' => 'idcontrarecibo', ), 'CASCADE', 'CASCADE');\n }",
"public function testAddRelationViaObject()\n {\n $resource = new Entry($this->createFakeNode());\n $resource->setEntityType('Foo');\n $resource->addLink('FooSet(123)', 'self');\n\n $entry = new Entry($this->createFakeNode());\n $entry->addRelation($resource);\n\n static::assertEquals(\n '<entry>' .\n '<link type=\"application/atom+xml;type=entry\" ' .\n 'href=\"FooSet(123)\" ' .\n 'rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Foo\" ' .\n 'title=\"Foo\"/>' .\n '</entry>',\n $this->getXML($entry)\n );\n }",
"private function _addHasMany($item, $id, $hasMany=NULL) {\n\t\t// if I'm coming from addSideload, I'll also get hasMany passed in, \n\t\t// if not, take that from the current model, as we are there already\n\t\tif(is_null($hasMany)) {\t\n\t\t\t$hasMany = $this->hasMany;\n\t\t}\n\t\t// if there are still no hasMany to get, just return what you have gotten....\n\t\tif(!($hasMany) || !is_array($hasMany)) {\n\t\t\treturn $item;\n\t\t}\n\t\tforeach ($hasMany as $hmName => $hasManyItem) { \n\t\t\t// echo \"hasManyName: \".$hmName.\"\\n\";\n\t\t\tif ($this->db->tableExists($hmName)) {\n\t\t\t\t// echo \"tableExists\\n\";\n\t\t\t\t$this->db->where($hasManyItem['sourceField'], $id);\n\t\t\t\t$one2many = $this->db->get($hmName, null, Array('id',$hasManyItem['sourceField']));\n\t\t\t\t// echo $this->db->getLastQuery().\"\\n\\n\";\n\t\t\t\t$refIds = Array();\n\t\t\t\tforeach ($one2many as $key => $value) {\n\t\t\t\t\t$refIds[] = $value['id'];\n\t\t\t\t}\n\t\t\t\t$item[$hmName] = $refIds;\n\t\t\t}\n\t\t}\n\t\treturn $item;\n\t}",
"public function getTags()\n{\n return $this->hasMany(Tags::className(), ['id' => 'tag_id'])\n ->viaTable('tag_articles', ['article_id' => 'id']);\n}",
"public function services() \n {\n \treturn $this->hasMany('App\\Service');\n }",
"public function getRelations();",
"public function getRelations();",
"public function associatedBlock () {\n if (!iic_util_current_page_is_node_view())\n return;\n $node = iic_util_current_page_node();\n if ($node && association_check_type($node, $this->name)) {\n association_populate_node_associations($node);\n association_populate_node_associations($node, $this->name);\n $field = $this->name . '_associations';\n $nodes = $node->$field;\n if (count($nodes)) {\n $links = array();\n foreach ($nodes as $n) {\n $links[] = l($n->title, 'node/'. $n->nid, array());\n }\n return array(\n 'subject' => t('Associated !names', array('!names' => $this->displayNamePlural)),\n 'content' => theme( // variables added by MAG 6/3/2008\n 'node_list',\n $links,\n '',\n $node->nid,\n user_access('edit own ' . $this->name),\n $nodes,\n $this->name,\n drupal_get_form('scfnode_form_add_association', $node->nid, $this->name)\n )\n );\n }\n }\n }",
"protected function _checkForeignKeysReverseCascade() {}",
"public function initialize()\n {\n $this->hasMany(\"id\", \"Modules\\Models\\Orders\", \"member_id\", array(\n 'alias' => 'orders'\n ));\n }",
"public function testFindSingleLocaleBelongsToMany(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n /** @var \\Cake\\ORM\\Table|\\Cake\\ORM\\Behavior\\TranslateBehavior $specialTags */\n $specialTags = $this->getTableLocator()->get('SpecialTags');\n $specialTags->addBehavior('Translate', ['fields' => ['extra_info']]);\n\n $table->belongsToMany('Tags', [\n 'through' => $specialTags,\n ]);\n $specialTags->setLocale('eng');\n\n $result = $table->get(2, ...['contain' => 'Tags']);\n $this->assertNotEmpty($result);\n $this->assertNotEmpty($result->tags);\n $this->assertSame('Translated Info', $result->tags[0]->special_tags[0]->extra_info);\n }",
"public function house()\n {\n return $this->belongsToMany(House::class);\n }",
"public function url() {\n return $this->hasMany('App\\URL','id');\n }",
"protected function hasCascadeRelationDefined() {\n\n if ( ! is_array($this->relationships) || empty($this->relationships) ) {\n\n return false;\n }\n\n return true;\n }",
"public function imagenes(){\n return $this->belongsToMany(Imagen::class);\n }",
"public function buildRelations()\n {\n $this->addRelation('Label', '\\\\MediaProperty\\\\Label', RelationMap::MANY_TO_ONE, array('label_id' => 'id', ), null, null);\n $this->addRelation('Album', '\\\\MediaItem\\\\Album', RelationMap::ONE_TO_MANY, array('id' => 'artist_id', ), null, null, 'Albums');\n }"
] | [
"0.6094528",
"0.595812",
"0.59501624",
"0.5852159",
"0.5839466",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.5734061",
"0.57265776",
"0.5725272",
"0.5712776",
"0.5712776",
"0.5712776",
"0.5712776",
"0.5712776",
"0.5712776",
"0.5712776",
"0.5712776",
"0.56579506",
"0.56430644",
"0.5572496",
"0.5496217",
"0.54626644",
"0.54415375",
"0.54375803",
"0.53828156",
"0.5377468",
"0.53748995",
"0.5363773",
"0.5363773",
"0.53575134",
"0.5331991",
"0.5330395",
"0.5323784",
"0.531325",
"0.53110397",
"0.530388",
"0.5303199",
"0.5286617",
"0.52795535",
"0.5268507",
"0.52612567",
"0.5258032",
"0.5242672",
"0.52314454",
"0.5230756",
"0.5223252",
"0.52079564",
"0.51993185",
"0.5198376",
"0.5198198",
"0.5194292",
"0.5192913",
"0.5184575",
"0.5183519",
"0.51825124",
"0.5181033",
"0.51809984",
"0.51684266",
"0.51677644",
"0.5160459",
"0.51482916",
"0.51377666",
"0.51371175",
"0.5134859",
"0.5124199",
"0.5119263",
"0.5117171",
"0.5115873",
"0.5110679",
"0.50975096",
"0.50974727",
"0.50972724",
"0.5096502",
"0.5094402",
"0.50919",
"0.5082133",
"0.50771147",
"0.50740325",
"0.5066785",
"0.50629157",
"0.50538564",
"0.5052914",
"0.50491345",
"0.50491345",
"0.5047603",
"0.5037384",
"0.5025311",
"0.5024379",
"0.50238675",
"0.5010115",
"0.50033045",
"0.5000733",
"0.49994287"
] | 0.7353375 | 0 |
Series of tests that assert if Linkable can adapt to assocations that have aliases different from their standard model names | public function testNonstandardAssociationNames()
{
$this->Tag =& ClassRegistry::init('Tag');
$arrayExpected = array(
'Tag' => array(
'name' => 'Test I'
),
'Parent' => array(
'name' => 'General'
)
);
$arrayResult = $this->Tag->find('first', array(
'fields' => array(
'name'
),
'conditions' => array(
'Tag.id' => 2
),
'link' => array(
'Parent' => array(
'fields' => array(
'name'
)
)
)
));
$this->assertEqual($arrayExpected, $arrayResult, 'Association with non-standard name: %s');
$this->LegacyProduct =& ClassRegistry::init('LegacyProduct');
$arrayExpected = array(
'LegacyProduct' => array(
'name' => 'Velocipede'
),
'Maker' => array(
'company_name' => 'Vintage Stuff Manufactory'
),
'Transporter' => array(
'company_name' => 'Joe & Co Crate Shipping Company'
)
);
$arrayResult = $this->LegacyProduct->find('first', array(
'fields' => array(
'name'
),
'conditions' => array(
'LegacyProduct.product_id' => 1
),
'link' => array(
'Maker' => array(
'fields' => array(
'company_name'
)
),
'Transporter' => array(
'fields' => array(
'company_name'
)
)
)
));
$this->assertEqual($arrayExpected, $arrayResult, 'belongsTo associations with custom foreignKey: %s');
$arrayExpected = array(
'ProductsMade' => array(
'name' => 'Velocipede'
),
'Maker' => array(
'company_name' => 'Vintage Stuff Manufactory'
)
);
$arrayResult = $this->LegacyProduct->Maker->find('first', array(
'fields' => array(
'company_name'
),
'conditions' => array(
'Maker.company_id' => 1
),
'link' => array(
'ProductsMade' => array(
'fields' => array(
'name'
)
)
)
));
$this->assertEqual($arrayExpected, $arrayResult, 'hasMany association with custom foreignKey: %s');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAssociationsSameAliases(): void\n {\n foreach (['Pages', 'Posts'] as $name) {\n /** @var \\MeCms\\Model\\Table\\PagesTable|\\MeCms\\Model\\Table\\PostsTable $Table */\n $Table = $this->getTable('MeCms.' . $name);\n $this->assertBelongsTo($Table->Categories);\n $this->assertSame('Categories', $Table->Categories->getName());\n $this->assertSame('MeCms\\\\Model\\\\Table\\\\' . $name . 'CategoriesTable', $Table->Categories->getClassName());\n $this->assertInstanceOf('\\\\MeCms\\\\Model\\\\Entity\\\\' . $name . 'Category', $Table->Categories->find()->first());\n }\n }",
"public function testAutoReferenceName(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n\n $table->hasMany('OtherComments', ['className' => 'Comments']);\n $table->OtherComments->addBehavior(\n 'Translate',\n ['fields' => ['comment']]\n );\n\n $items = $table->OtherComments->associations();\n $association = $items->getByProperty('comment_translation');\n $this->assertNotEmpty($association, 'Translation association not found');\n\n $found = false;\n foreach ($association->getConditions() as $key => $value) {\n if (strpos($key, 'comment_translation.model') !== false) {\n $found = true;\n $this->assertSame('Comments', $value);\n break;\n }\n }\n\n $this->assertTrue($found, '`referenceName` field condition on a Translation association was not found');\n }",
"protected function its_response_has_the_expected_aliased_attributes()\n {\n foreach ($this->aliases as $alias => $modelAttribute) {\n $this->assertEquals($this->model->$modelAttribute, $this->resourceResponse[$alias],\n 'alias: ' . $alias . ' does not correspond with attribute: ' . $modelAttribute\n );\n }\n }",
"public function testProjectAssignmentsLinkRelation()\n {\n }",
"public function testChangingReferenceName(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->setAlias('FavoritePost');\n $table->addBehavior(\n 'Translate',\n ['fields' => ['body'], 'referenceName' => 'Posts']\n );\n\n $items = $table->associations();\n $association = $items->getByProperty('body_translation');\n $this->assertNotEmpty($association, 'Translation association not found');\n\n $found = false;\n foreach ($association->getConditions() as $key => $value) {\n if (strpos($key, 'body_translation.model') !== false) {\n $found = true;\n $this->assertSame('Posts', $value);\n break;\n }\n }\n\n $this->assertTrue($found, '`referenceName` field condition on a Translation association was not found');\n }",
"public function testGetIdentityLinksForFamily()\n {\n }",
"public function testAliasMethod() {\n\t\t$table = new Table(['alias' => 'Users']);\n\t\t$this->assertEquals('User', $table->alias());\n\n\t\t$table = new Table(['table' => 'stuffs']);\n\t\t$this->assertEquals('stuff', $table->alias());\n\n\t\t$table = new UsersTable;\n\t\t$this->assertEquals('User', $table->alias());\n\n\t\t$table = $this->getMockBuilder('Table')\n\t\t\t\t->setMethods(['find'])\n\t\t\t\t->setMockClassName('SpecialThingTable')\n\t\t\t\t->getMock();\n\t\t$this->assertEquals('SpecialThing', $table->alias());\n\n\t\t$table->alias('AnotherOne');\n\t\t$this->assertEquals('AnotherOne', $table->alias());\n\t}",
"public function testAliasField()\n {\n $endpoint = new Endpoint(['alias' => 'Users']);\n $this->assertEquals('Users.id', $endpoint->aliasField('id'));\n }",
"public function testAroAliases()\n {\n $this->Acl->Aro->map = [\n 'User' => 'User/username',\n 'Role' => 'User/group_id',\n ];\n\n $this->Acl->Aro->aliases = [\n 'Role/1' => 'Role/admin',\n 'Role/24' => 'Role/accounting',\n ];\n\n $user = [\n 'User' => [\n 'username' => 'unknown_user',\n 'group_id' => '1',\n ],\n ];\n // group/1\n $this->assertSame('Role/admin', $this->Acl->Aro->resolve($user));\n // group/24\n $this->assertSame('Role/accounting', $this->Acl->Aro->resolve('Role/24'));\n $this->assertSame('Role/accounting', $this->Acl->Aro->resolve('24'));\n\n // check department\n $user = [\n 'User' => [\n 'username' => 'foo',\n 'group_id' => '25',\n ],\n ];\n\n $this->Acl->Aro->addRole(['Role/IT' => null]);\n $this->Acl->Aro->addAlias(['Role/25' => 'Role/IT']);\n $this->Acl->allow('Role/IT', '/rules/debugging/*');\n\n $this->assertEquals([['Role/IT']], $this->Acl->Aro->roles($user));\n $this->assertTrue($this->Acl->check($user, '/rules/debugging/stats/pageload'));\n $this->assertTrue($this->Acl->check($user, '/rules/debugging/sql/queries'));\n // Role/default is allowed users dashboard, but not Role/IT\n $this->assertFalse($this->Acl->check($user, '/controllers/users/dashboard'));\n\n $this->assertFalse($this->Acl->check($user, '/controllers/invoices/send'));\n // wee add an more specific entry for user foo to also inherit from Role/accounting\n $this->Acl->Aro->addRole(['User/foo' => 'Role/IT, Role/accounting']);\n $this->assertTrue($this->Acl->check($user, '/controllers/invoices/send'));\n }",
"public function testGetAssocName()\n {\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'Articles', array(), new User);\n $this->assertEquals('Articles', $assoc->getAssocName());\n\n $options = array('className' => 'Article');\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'whatever', $options, new User);\n $this->assertEquals('whatever', $assoc->getAssocName());\n }",
"public function testGetAssocModel()\n {\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'Articles', array(), new User);\n $this->assertTrue($assoc->getAssocModel() instanceof Article);\n }",
"public function testProfilePrototypeLinkGroups()\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 testGetUserAlias()\n {\n $alias = $this->la->getAlias('poa32kc');\n $this->assertEquals('Pouyan Azari', $alias);\n }",
"public function testResourceTypeFieldAliasing() {\n $this->assertSame($this->resourceTypeRepository->getByTypeName('node--article')->getPublicName('uid'), 'uid');\n $this->assertSame($this->resourceTypeRepository->getByTypeName('node--page')->getPublicName('uid'), 'uid');\n $resource_type_field_aliases = [\n 'node--article' => [\n 'uid' => 'author',\n ],\n 'node--page' => [\n 'uid' => 'owner',\n ],\n ];\n \\Drupal::state()->set('jsonapi_test_resource_type_builder.resource_type_field_aliases', $resource_type_field_aliases);\n Cache::invalidateTags(['jsonapi_resource_types']);\n $this->assertSame($this->resourceTypeRepository->getByTypeName('node--article')->getPublicName('uid'), 'author');\n $this->assertSame($this->resourceTypeRepository->getByTypeName('node--page')->getPublicName('uid'), 'owner');\n }",
"function testGuessBelongsTo() {\n\t\t$this->assertEqual($this->helper->__guessInputType('Test.foo_id'), 'belongsTo');\n\t}",
"public function testGetAssocTable()\n {\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'Articles', array(), new User);\n $this->assertEquals('articles', $assoc->getAssocTable());\n }",
"public function testGetModelAssociation()\n {\n $user = new User();\n $assoc = $user->reflectOnAssociation('Articles');\n $this->assertTrue($assoc instanceof Mad_Model_Association_HasMany);\n }",
"public function testBuildJoinDefaultWithAliases()\n {\n $query = $this->getQuery()\n ->table('table1')\n ->alias('table1_alias')\n ->join(\n $this->getQuery()\n ->table('table2')\n ->alias('table2_alias')\n ->joinOn('id', 'id')\n )\n ;\n\n $this->assertSame(\n 'LEFT JOIN table2 AS table2_alias ON table1_alias.id = table2_alias.id',\n $query->buildJoin()\n );\n }",
"public function testAddRelationViaObject()\n {\n $resource = new Entry($this->createFakeNode());\n $resource->setEntityType('Foo');\n $resource->addLink('FooSet(123)', 'self');\n\n $entry = new Entry($this->createFakeNode());\n $entry->addRelation($resource);\n\n static::assertEquals(\n '<entry>' .\n '<link type=\"application/atom+xml;type=entry\" ' .\n 'href=\"FooSet(123)\" ' .\n 'rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Foo\" ' .\n 'title=\"Foo\"/>' .\n '</entry>',\n $this->getXML($entry)\n );\n }",
"public function testFindSingleLocaleBelongsto(): void\n {\n /** @var \\Cake\\ORM\\Table|\\Cake\\ORM\\Behavior\\TranslateBehavior $table */\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n /** @var \\Cake\\ORM\\Table|\\Cake\\ORM\\Behavior\\TranslateBehavior $authors */\n $authors = $table->belongsTo('Authors')->getTarget();\n $authors->addBehavior('Translate', ['fields' => ['name']]);\n\n $table->setLocale('eng');\n $authors->setLocale('eng');\n\n $results = $table->find()\n ->select(['title', 'body'])\n ->orderBy(['title' => 'asc'])\n ->contain(['Authors' => function (SelectQuery $q) {\n return $q->select(['id', 'name']);\n }]);\n\n $expected = [\n [\n 'title' => 'Title #1',\n 'body' => 'Content #1',\n 'author' => ['id' => 1, 'name' => 'May-rianoh', '_locale' => 'eng'],\n '_locale' => 'eng',\n ],\n [\n 'title' => 'Title #2',\n 'body' => 'Content #2',\n 'author' => ['id' => 3, 'name' => 'larry', '_locale' => 'eng'],\n '_locale' => 'eng',\n ],\n [\n 'title' => 'Title #3',\n 'body' => 'Content #3',\n 'author' => ['id' => 1, 'name' => 'May-rianoh', '_locale' => 'eng'],\n '_locale' => 'eng',\n ],\n ];\n $results = array_map(function (EntityInterface $r) {\n return $r->toArray();\n }, $results->toArray());\n $this->assertEquals($expected, $results);\n }",
"public function testJoinWithAlias()\n {\n $query = (new Select($this->mockConnection))->join('join', 'j.tableId', '=', 'table.id', 'j');\n $array = $query->toArray();\n\n $this->assertInstanceOf(Select::class, $query);\n $this->assertArrayHasKey('join', $array);\n $this->assertCount(1, $array['join']);\n $this->assertEquals([\n 'type' => 'inner',\n 'table' => 'join',\n 'alias' => 'j',\n 'statement' => [\n 'where' => [\n [\n 'column' => 'j.tableId',\n 'operator' => '=',\n 'value' => 'table.id',\n 'boolean' => 'and',\n ]\n ],\n ]\n ], $array['join'][0]);\n $this->assertInstanceOf(Column::class, $array['join'][0]['statement']['where'][0]['value']);\n }",
"function testInvalidAssociation() {\n\t\t$TestModel =& new ValidationTest();\n\t\t$this->assertNull($TestModel->getAssociated('Foo'));\n\t}",
"public function testGetAdminLinks() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }",
"public function testCreateUnitRelationships()\n {\n }",
"function is_alias($name) {\n\n\tglobal $aliastable;\n\n\treturn isset($aliastable[$name]);\n}",
"function testIsUriAliasDuplicated()\n {\n\n $this->assertTrue($this->da->isUriAliasDuplicated('my_alias', $sectionId = null));\n $this->assertTrue($this->da->isUriAliasDuplicated('my_alias', $sectionId = 32));//non-existant id\n }",
"public function testGetUnitRelationships()\n {\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 testDerivedRelationViaCastedUpModelAttributeThatCastsDownAndSkipsAModelTwo()\n {\n $q = DatabaseCompatibilityUtil::getQuote();\n\n $joinTablesAdapter = new RedBeanModelJoinTablesQueryAdapter('Account');\n $selectQueryAdapter = new RedBeanModelSelectQueryAdapter();\n $builder = new DisplayAttributesReportQueryBuilder($joinTablesAdapter, $selectQueryAdapter);\n $displayAttribute = new DisplayAttributeForReportForm('AccountsModule', 'Account',\n Report::TYPE_ROWS_AND_COLUMNS);\n $displayAttribute->attributeIndexOrDerivedType = 'meetings___name';\n $content = $builder->makeQueryContent(array($displayAttribute));\n $compareContent = \"select {$q}meeting{$q}.{$q}id{$q} meetingid \";\n $this->assertEquals($compareContent, $content);\n $this->assertEquals(3, $joinTablesAdapter->getFromTableJoinCount());\n $this->assertEquals(3, $joinTablesAdapter->getLeftTableJoinCount());\n }",
"public function testShorten()\n {\n $link = $this->getMock('Mremi\\UrlShortener\\Model\\LinkInterface');\n\n $this->provider\n ->expects($this->once())\n ->method('shorten')\n ->with($this->equalTo($link));\n\n $this->providerProxy->shorten($link);\n }",
"public function testGetAlias() {\n\n $obj = new WBWJQueryDataTablesExtension();\n\n $this->assertEquals(WBWJQueryDataTablesExtension::EXTENSION_ALIAS, $obj->getAlias());\n }",
"public function aliases();",
"public function testListSharedLinks()\n {\n }",
"public function test_yourls_link_IDN() {\n yourls_add_filter( 'get_yourls_site', function() {return 'http://xn--hh-bjab.com';} );\n $this->assertEquals( yourls_link('suicidal'), 'http://héhé.com/suicidal' );\n $this->assertEquals( yourls_statlink('angels'), 'http://héhé.com/angels+' );\n }",
"public function testGetModel()\n {\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'Articles', array(), new User);\n $this->assertTrue($assoc->getModel() instanceof User);\n }",
"public function testHasMany()\n\t{\n\t\t$arrayExpected\t= array(\n\t\t\t'User'\t=> array('id' => 1, 'username' => 'CakePHP'),\n\t\t\t'Comment'\t=> array(\n\t\t\t\t0\t=> array(\n\t\t\t\t\t'id'\t\t=> 1,\n\t\t\t\t\t'user_id'\t=> 1,\n\t\t\t\t\t'body'\t\t=> 'Text'\n\t\t\t\t),\n\t\t\t\t1\t=> array(\n\t\t\t\t\t'id'\t\t=> 2,\n\t\t\t\t\t'user_id'\t=> 1,\n\t\t\t\t\t'body'\t\t=> 'Text'\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$arrayResult\t= $this->User->find('first', array(\n\t\t\t'contain'\t=> array(\n\t\t\t\t'Comment'\n\t\t\t),\n\t\t\t'order'\t=> 'User.id ASC'\n\t\t));\n\t\t$this->assertTrue(isset($arrayResult['Comment']), 'hasMany association via Containable: %s');\n\t\t$this->assertEqual($arrayResult, $arrayExpected, 'hasMany association via Containable: %s');\n\n\t\t// Same association, but this time with Linkable\n\t\t$arrayExpected\t= array(\n\t\t\t'User'\t=> array('id' => 1, 'username' => 'CakePHP'),\n\t\t\t'Comment'\t=> array(\n\t\t\t\t'id'\t\t=> 1,\n\t\t\t\t'user_id'\t=> 1,\n\t\t\t\t'body'\t\t=> 'Text'\n\t\t\t)\n\t\t);\n\n\t\t$arrayResult\t= $this->User->find('first', array(\n\t\t\t'fields'\t=> array(\n\t\t\t\t'id',\n\t\t\t\t'username'\n\t\t\t),\n\t\t\t'contain'\t=> false,\n\t\t\t'link'\t\t=> array(\n\t\t\t\t'Comment'\t=> array(\n\t\t\t\t\t'fields'\t=> array(\n\t\t\t\t\t\t'id',\n\t\t\t\t\t\t'user_id',\n\t\t\t\t\t\t'body'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'order'\t\t=> 'User.id ASC',\n\t\t\t'group'\t\t=> 'User.id'\n\t\t));\n\n\t\t$this->assertEqual($arrayResult, $arrayExpected, 'hasMany association via Linkable: %s');\n\t}",
"public function testAddLinkToDataShowLinkMembers()\n {\n $this->document->addToData($parent = $this->schemaFactory->createResourceObject($this->getSchema(\n 'people',\n '123',\n ['firstName' => 'John', 'lastName' => 'Dow'],\n new Link('peopleSelfUrl'), // self url\n [], // links for resource\n null // meta\n ), new stdClass(), false));\n\n $resource = $this->schemaFactory->createResourceObject($this->getSchema(\n 'comments',\n '321',\n null, // attributes\n new Link('commentsSelfUrl/'),\n [LinkInterface::SELF => new Link('commentsSelfUrl/')], // links for resource\n ['this meta' => 'wont be included'],\n [], // links for included resource\n false,\n null,\n ['some' => 'comment meta']\n ), new stdClass(), false);\n\n $link = $this->schemaFactory->createRelationshipObject(\n 'comments-relationship',\n new stdClass(), // in reality it will be a Comment class instance where $resource properties were taken from\n [\n LinkInterface::SELF => $this->createLink('selfSubUrl'),\n LinkInterface::RELATED => $this->createLink('relatedSubUrl'),\n LinkInterface::FIRST => new Link('/first', null, true),\n ],\n ['some' => 'relationship meta'],\n true,\n false // is root\n );\n $this->document->addRelationshipToData($parent, $link, $resource);\n $this->document->setResourceCompleted($parent);\n\n $expected = <<<EOL\n {\n \"data\" : {\n \"type\" : \"people\",\n \"id\" : \"123\",\n \"attributes\" : {\n \"firstName\" : \"John\",\n \"lastName\" : \"Dow\"\n },\n \"relationships\" : {\n \"comments-relationship\" : {\n \"data\" : { \"type\" : \"comments\", \"id\" : \"321\", \"meta\" : { \"some\" : \"comment meta\" } },\n \"meta\" : { \"some\" : \"relationship meta\" },\n \"links\" : {\n \"self\" : \"selfSubUrl\",\n \"related\" : \"relatedSubUrl\",\n \"first\" : \"/first\"\n }\n }\n }\n }\n }\nEOL;\n $this->check($expected);\n }",
"public function testAliasData()\n {\n $output = $this->primer->getPatterns(array('components/test-group/data-autoload~alias'), false);\n\n $this->assertEquals($output, '1.3');\n }",
"public function testProfilePrototypeLinkCommunityRoles()\n {\n\n }",
"public function testListSharedLinkRenditions()\n {\n }",
"public function testConversion(){\n $objects = array(\n 'testUser' => array(\n 'userA',\n 'userB'\n ),\n 'CGroup' => array(\n 'group'\n )\n );\n \n foreach($objects as $type => $arr){\n foreach($arr as $alias){\n $$alias = new $type;\n $this->assertTrue($$alias->save());\n }\n }\n \n $group->alias = 'group';\n $this->assertTrue($group->save());\n \n /**\n * Give B some rights on the group and let userA join that group\n */\n $userB->grant('group', '*');\n $this->assertFalse($userB->may($userA, 'read'));\n \n $userA->beAco();\n $this->assertTrue($userA->join('group'));\n $this->assertTrue($userB->may($userA, 'read'));\n $this->assertTrue($userA->leave('group'));\n $this->assertFalse($userB->may($userA, 'read'));\n \n //And once more, directly\n $userB->grant($userA, 'read');\n $this->assertTrue($userB->may($userA, 'read'));\n \n //Remove all objects\n foreach($objects as $type=> $arr)\n foreach($arr as $obj)\n $this->assertTrue($$obj->delete()); \n }",
"public function testReturnsAValidLink()\n {\n $id = $this->faker->randomNumber();\n $item = $this->createItem($id);\n $this->assertStringEndsWith((string)$id, $item->getLink());\n }",
"public function testProfilePrototypeLinkOwnedGroups()\n {\n\n }",
"public function testGetForeignWhereMods()\n {\n $this->todo('stub');\n }",
"public function isAlias( $name );",
"public function linkLinkProviderGetLinksByRel(UnitTester $I)\n {\n $I->wantToTest('Html\\Link\\LinkProvider - getLinksByRel()');\n\n $links = [\n new Link('canonical', 'https://dev.phalcon.ld'),\n new Link('cite-as', 'https://test.phalcon.ld'),\n ];\n $link = new LinkProvider($links);\n\n $expected = [\n $links[1],\n ];\n\n $I->assertSame($expected, $link->getLinksByRel('cite-as'));\n $I->assertSame([], $link->getLinksByRel('unknown'));\n }",
"public function testCreateLinkShouldReturnNativeLink( ) {\n $db = $this->_createDb($this->_cut->createLink());\n }",
"public function testQueryWithCustomAlias() {\n\t\t$model = 'lithium\\tests\\mocks\\data\\model\\MockQueryComment';\n\n\t\t$query = new Query([\n\t\t\t'type' => 'read',\n\t\t\t'model' => $model,\n\t\t\t'source' => 'my_custom_table',\n\t\t\t'alias' => 'MyCustomAlias'\n\t\t]);\n\t\t$result = $query->export($this->_db);\n\t\t$this->assertEqual('{my_custom_table}', $result['source']);\n\t\t$this->assertEqual('AS {MyCustomAlias}', $result['alias']);\n\t}",
"public function testRelationWithOwner()\n {\n $lot = FactoryMuff::create('Lot');\n $this->assertEquals($lot->owner_id, $lot->owners->id);\n }",
"public function testMappingAlias()\n {\n $container = $this->createMockDefaultApp();\n\n $container->register(new DoctrineOrmServiceProvider);\n\n $alias = 'Foo';\n $namespace = 'Foo\\Entities';\n\n $container['orm.em.options'] = array(\n 'mappings' => array(\n array(\n 'type' => 'annotation',\n 'namespace' => $namespace,\n 'path' => __DIR__.'/src/Foo/Entities',\n 'alias' => $alias\n )\n ),\n );\n\n $this->assertEquals($namespace, $container['orm.em.config']->getEntityNameSpace($alias));\n }",
"public function testCrossDatabaseJoins() {\n\t\t$config = ConnectionManager::enumConnectionObjects();\n\n\t\t$skip = (!isset($config['test']) || !isset($config['test2']));\n\t\tif ($skip) {\n\t\t\t$this->markTestSkipped('Primary and secondary test databases not configured, skipping cross-database\n\t\t\t\tjoin tests. To run theses tests defined $test and $test2 in your database configuration.'\n\t\t\t);\n\t\t}\n\n\t\t$this->loadFixtures('Article', 'Tag', 'ArticlesTag', 'User', 'Comment');\n\t\t$TestModel = new Article();\n\n\t\t$expected = array(\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'User' => array(\n\t\t\t\t\t'id' => '1',\n\t\t\t\t\t'user' => 'mariano',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:16:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:18:31'\n\t\t\t\t),\n\t\t\t\t'Comment' => 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'user_id' => '2',\n\t\t\t\t\t\t'comment' => 'First Comment for First Article',\n\t\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t\t'created' => '2007-03-18 10:45:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 10:47:31'\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'user_id' => '4',\n\t\t\t\t\t\t'comment' => 'Second Comment for First Article',\n\t\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t\t'created' => '2007-03-18 10:47:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 10:49:31'\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'user_id' => '1',\n\t\t\t\t\t\t'comment' => 'Third Comment for First Article',\n\t\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t\t'created' => '2007-03-18 10:49:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 10:51:31'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '4',\n\t\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t\t'comment' => 'Fourth Comment for First Article',\n\t\t\t\t\t\t'published' => 'N',\n\t\t\t\t\t\t'created' => '2007-03-18 10:51:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 10:53:31'\n\t\t\t\t)),\n\t\t\t\t'Tag' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '1',\n\t\t\t\t\t\t'tag' => 'tag1',\n\t\t\t\t\t\t'created' => '2007-03-18 12:22:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 12:24:31'\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'tag' => 'tag2',\n\t\t\t\t\t\t'created' => '2007-03-18 12:24:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 12:26:31'\n\t\t\t))),\n\t\t\tarray(\n\t\t\t\t'Article' => array(\n\t\t\t\t\t'id' => '2',\n\t\t\t\t\t'user_id' => '3',\n\t\t\t\t\t'title' => 'Second Article',\n\t\t\t\t\t'body' => 'Second Article Body',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:41:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:43:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '3',\n\t\t\t\t\t'user' => 'larry',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:20:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:22:31'\n\t\t\t\t),\n\t\t\t\t'Comment' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '5',\n\t\t\t\t\t\t'article_id' => '2',\n\t\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t\t'comment' => 'First Comment for Second Article',\n\t\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t\t'created' => '2007-03-18 10:53:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 10:55:31'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '6',\n\t\t\t\t\t\t'article_id' => '2',\n\t\t\t\t\t\t'user_id' => '2',\n\t\t\t\t\t\t'comment' => 'Second Comment for Second Article',\n\t\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t\t'created' => '2007-03-18 10:55:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 10:57:31'\n\t\t\t\t)),\n\t\t\t\t'Tag' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => '1',\n\t\t\t\t\t\t'tag' => 'tag1',\n\t\t\t\t\t\t'created' => '2007-03-18 12:22:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 12:24:31'\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'tag' => 'tag3',\n\t\t\t\t\t\t'created' => '2007-03-18 12:26:23',\n\t\t\t\t\t\t'updated' => '2007-03-18 12:28:31'\n\t\t\t))),\n\t\t\tarray(\n\t\t\t\t'Article' => array(\n\t\t\t\t\t'id' => '3',\n\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t'title' => 'Third Article',\n\t\t\t\t\t'body' => 'Third Article Body',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:43:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:45:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '1',\n\t\t\t\t\t'user' => 'mariano',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:16:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:18:31'\n\t\t\t\t),\n\t\t\t\t'Comment' => array(),\n\t\t\t\t'Tag' => array()\n\t\t));\n\t\t$this->assertEquals($expected, $TestModel->find('all'));\n\n\t\t$db2 = ConnectionManager::getDataSource('test2');\n\t\t$this->fixtureManager->loadSingle('User', $db2);\n\t\t$this->fixtureManager->loadSingle('Comment', $db2);\n\t\t$this->assertEquals(3, $TestModel->find('count'));\n\n\t\t$TestModel->User->setDataSource('test2');\n\t\t$TestModel->Comment->setDataSource('test2');\n\n\t\tforeach ($expected as $key => $value) {\n\t\t\tunset($value['Comment'], $value['Tag']);\n\t\t\t$expected[$key] = $value;\n\t\t}\n\n\t\t$TestModel->recursive = 0;\n\t\t$result = $TestModel->find('all');\n\t\t$this->assertEquals($expected, $result);\n\n\t\tforeach ($expected as $key => $value) {\n\t\t\tunset($value['Comment'], $value['Tag']);\n\t\t\t$expected[$key] = $value;\n\t\t}\n\n\t\t$TestModel->recursive = 0;\n\t\t$result = $TestModel->find('all');\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = Hash::extract($TestModel->User->find('all'), '{n}.User.id');\n\t\t$this->assertEquals(array('1', '2', '3', '4'), $result);\n\t\t$this->assertEquals($expected, $TestModel->find('all'));\n\n\t\t$TestModel->Comment->unbindModel(array('hasOne' => array('Attachment')));\n\t\t$expected = array(\n\t\t\tarray(\n\t\t\t\t'Comment' => array(\n\t\t\t\t\t'id' => '1',\n\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t'user_id' => '2',\n\t\t\t\t\t'comment' => 'First Comment for First Article',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:45:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:47:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '2',\n\t\t\t\t\t'user' => 'nate',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:18:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:20:31'\n\t\t\t\t),\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)),\n\t\t\tarray(\n\t\t\t\t'Comment' => array(\n\t\t\t\t\t'id' => '2',\n\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t'user_id' => '4',\n\t\t\t\t\t'comment' => 'Second Comment for First Article',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:47:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:49:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '4',\n\t\t\t\t\t'user' => 'garrett',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:22:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:24:31'\n\t\t\t\t),\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)),\n\t\t\tarray(\n\t\t\t\t'Comment' => array(\n\t\t\t\t\t'id' => '3',\n\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t'comment' => 'Third Comment for First Article',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:49:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:51:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '1',\n\t\t\t\t\t'user' => 'mariano',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:16:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:18:31'\n\t\t\t\t),\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)),\n\t\t\tarray(\n\t\t\t\t'Comment' => array(\n\t\t\t\t\t'id' => '4',\n\t\t\t\t\t'article_id' => '1',\n\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t'comment' => 'Fourth Comment for First Article',\n\t\t\t\t\t'published' => 'N',\n\t\t\t\t\t'created' => '2007-03-18 10:51:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:53:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '1',\n\t\t\t\t\t'user' => 'mariano',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:16:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:18:31'\n\t\t\t\t),\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)),\n\t\t\tarray(\n\t\t\t\t'Comment' => array(\n\t\t\t\t\t'id' => '5',\n\t\t\t\t\t'article_id' => '2',\n\t\t\t\t\t'user_id' => '1',\n\t\t\t\t\t'comment' => 'First Comment for Second Article',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:53:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:55:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '1',\n\t\t\t\t\t'user' => 'mariano',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:16:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:18:31'\n\t\t\t\t),\n\t\t\t\t'Article' => array(\n\t\t\t\t\t'id' => '2',\n\t\t\t\t\t'user_id' => '3',\n\t\t\t\t\t'title' => 'Second Article',\n\t\t\t\t\t'body' => 'Second Article Body',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:41:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:43:31'\n\t\t\t)),\n\t\t\tarray(\n\t\t\t\t'Comment' => array(\n\t\t\t\t\t'id' => '6',\n\t\t\t\t\t'article_id' => '2',\n\t\t\t\t\t'user_id' => '2',\n\t\t\t\t\t'comment' => 'Second Comment for Second Article',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:55:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:57:31'\n\t\t\t\t),\n\t\t\t\t'User' => array(\n\t\t\t\t\t'id' => '2',\n\t\t\t\t\t'user' => 'nate',\n\t\t\t\t\t'password' => '5f4dcc3b5aa765d61d8327deb882cf99',\n\t\t\t\t\t'created' => '2007-03-17 01:18:23',\n\t\t\t\t\t'updated' => '2007-03-17 01:20:31'\n\t\t\t\t),\n\t\t\t\t'Article' => array(\n\t\t\t\t\t'id' => '2',\n\t\t\t\t\t'user_id' => '3',\n\t\t\t\t\t'title' => 'Second Article',\n\t\t\t\t\t'body' => 'Second Article Body',\n\t\t\t\t\t'published' => 'Y',\n\t\t\t\t\t'created' => '2007-03-18 10:41:23',\n\t\t\t\t\t'updated' => '2007-03-18 10:43:31'\n\t\t)));\n\t\t$this->assertEquals($expected, $TestModel->Comment->find('all'));\n\t}",
"public function testGetTagAliasing() {\n $this->assertEquals([\n 'tag' => 'aliasBase',\n 'htmlTag' => 'aliasBase',\n 'template' => '',\n 'displayType' => Decoda::TYPE_BLOCK,\n 'allowedTypes' => Decoda::TYPE_BOTH,\n 'aliasFor' => '',\n 'attributes' => [\n 'foo' => Filter::WILDCARD,\n 'bar' => Filter::WILDCARD\n ],\n 'mapAttributes' => [],\n 'htmlAttributes' => [],\n 'aliasAttributes' => [],\n 'escapeAttributes' => true,\n 'lineBreaks' => Decoda::NL_CONVERT,\n 'autoClose' => false,\n 'preserveTags' => false,\n 'onlyTags' => false,\n 'contentPattern' => '',\n 'stripContent' => false,\n 'parent' => [],\n 'childrenWhitelist' => [],\n 'childrenBlacklist' => [],\n 'maxChildDepth' => -1,\n 'persistContent' => true\n ], $this->object->getTag('aliasBase'));\n\n $this->assertEquals([\n 'tag' => 'aliased',\n 'htmlTag' => 'aliasBase',\n 'template' => '',\n 'displayType' => Decoda::TYPE_BLOCK,\n 'allowedTypes' => Decoda::TYPE_BOTH,\n 'aliasFor' => 'aliasBase',\n 'attributes' => [\n 'baz' => Filter::NUMERIC, // NEW\n 'foo' => Filter::WILDCARD,\n 'bar' => Filter::WILDCARD\n ],\n 'mapAttributes' => [],\n 'htmlAttributes' => [],\n 'aliasAttributes' => [],\n 'escapeAttributes' => true,\n 'lineBreaks' => Decoda::NL_CONVERT,\n 'autoClose' => false,\n 'preserveTags' => false,\n 'onlyTags' => false,\n 'contentPattern' => '',\n 'stripContent' => false,\n 'parent' => [],\n 'childrenWhitelist' => [],\n 'childrenBlacklist' => [],\n 'maxChildDepth' => -1,\n 'persistContent' => true\n ], $this->object->getTag('aliased'));\n }",
"public function testBasics() {\n\t\t$behavior = new ASolrSearchable();\n\t\t$model = ExampleSolrActiveRecord::model()->find();\n\t\t$model->attachBehavior(\"ASolrSearchable\",$behavior);\n\t\t$attributeNames = array(\"id\",\"name\",\"author\",\"popularity\",\"description\");\n\t\t$this->assertEquals($attributeNames,$behavior->getAttributes());\n\n\t\t$solrDocument = $behavior->getSolrDocument();\n\t\t$this->assertTrue($solrDocument instanceof ASolrDocument);\n\t\tforeach($attributeNames as $attribute) {\n\t\t\t$this->assertTrue(isset($solrDocument->{$attribute}));\n\t\t\t$this->assertEquals($model->{$attribute},$solrDocument->{$attribute});\n\t\t}\n\t\t$this->assertTrue($model->index());\n\n\n\t}",
"public function test_2_3()\n {\n $out = SetupTestData::hasmany_save_2();\n\n // get all items to avoid losing them when the clean() is executed over the collection\n $addresses = $out['person']->get_addresses()->all();\n\n $out['person']->clean_addresses();\n\n $out['person']->save();\n\n\n // tests\n $this->assert($out['person']->size_addresses() === 0, 'Has many has 0 objects');\n\n foreach ($addresses as $i => $address)\n {\n $this->assert($address->person_addresses_back === NULL, \"Backlink of item $i object is NULL\");\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}",
"function test_longAlias()\n {\n // for this library, but it's here for completeness.\n $alias = str_repeat('x', Auth_OpenID_AX_MINIMUM_SUPPORTED_ALIAS_LENGTH);\n\n $msg = new Auth_OpenID_AX_KeyValueMessage();\n $result = $msg->parseExtensionArgs(\n array('type.' . $alias => 'urn:foo',\n 'count.' . $alias => '1',\n 'value.'.$alias.'.1' => 'first')\n );\n $this->assertFalse(Auth_OpenID_AX::isError($result));\n }",
"public function testTableName()\n {\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'Articles', array(), new User);\n $this->assertEquals('users', $assoc->tableName());\n }",
"public function testGetSharedLinkRendition()\n {\n }",
"public function canPopulateRelationTest()\n {\n $relationTest = new Relation(['test' => 'super']);\n\n $this->assertArrayHasKey('test', $relationTest->getData());\n }",
"private function makeRelationBetweenCategoryAndDummyTable() {}",
"public function testProjectAssignmentsUnlinkRelation()\n {\n }",
"public function testProfilePrototypeLinkComments()\n {\n\n }",
"public function testSearchModelSets()\n {\n }",
"public function testModelUseTrait()\n {\n $use = array_key_exists(\n VirtualAttribute::class,\n class_uses_recursive(Post::class)\n );\n\n $notUse = array_key_exists(\n VirtualAttribute::class,\n class_uses_recursive(User::class)\n );\n\n // has\n $this->assertTrue($use);\n\n // not has\n $this->assertNotTrue($notUse);\n }",
"public function testLinkAttributesToCertificate()\n {\n }",
"public function testFindSingleLocaleAssociatedEnv(): void\n {\n I18n::setLocale('eng');\n\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n\n $table->hasMany('Comments');\n $table->Comments->addBehavior('Translate', ['fields' => ['comment']]);\n\n $results = $table->find()\n ->select(['id', 'title', 'body'])\n ->contain(['Comments' => ['fields' => ['article_id', 'comment']]])\n ->enableHydration(false)\n ->toArray();\n\n $expected = [\n [\n 'id' => 1,\n 'title' => 'Title #1',\n 'body' => 'Content #1',\n 'comments' => [\n ['article_id' => 1, 'comment' => 'Comment #1', '_locale' => 'eng'],\n ['article_id' => 1, 'comment' => 'Comment #2', '_locale' => 'eng'],\n ['article_id' => 1, 'comment' => 'Comment #3', '_locale' => 'eng'],\n ['article_id' => 1, 'comment' => 'Comment #4', '_locale' => 'eng'],\n ],\n '_locale' => 'eng',\n ],\n [\n 'id' => 2,\n 'title' => 'Title #2',\n 'body' => 'Content #2',\n 'comments' => [\n ['article_id' => 2, 'comment' => 'First Comment for Second Article', '_locale' => 'eng'],\n ['article_id' => 2, 'comment' => 'Second Comment for Second Article', '_locale' => 'eng'],\n ],\n '_locale' => 'eng',\n ],\n [\n 'id' => 3,\n 'title' => 'Title #3',\n 'body' => 'Content #3',\n 'comments' => [],\n '_locale' => 'eng',\n ],\n ];\n $this->assertSame($expected, $results);\n\n I18n::setLocale('spa');\n\n $results = $table->find()\n ->select(['id', 'title', 'body'])\n ->contain([\n 'Comments' => [\n 'fields' => ['article_id', 'comment'],\n 'sort' => ['Comments.id' => 'ASC'],\n ],\n ])\n ->enableHydration(false)\n ->orderByAsc('Articles.id')\n ->toArray();\n\n $expected = [\n [\n 'id' => 1,\n 'title' => 'First Article',\n 'body' => 'Contenido #1',\n 'comments' => [\n ['article_id' => 1, 'comment' => 'First Comment for First Article', '_locale' => 'spa'],\n ['article_id' => 1, 'comment' => 'Second Comment for First Article', '_locale' => 'spa'],\n ['article_id' => 1, 'comment' => 'Third Comment for First Article', '_locale' => 'spa'],\n ['article_id' => 1, 'comment' => 'Comentario #4', '_locale' => 'spa'],\n ],\n '_locale' => 'spa',\n ],\n [\n 'id' => 2,\n 'title' => 'Second Article',\n 'body' => 'Second Article Body',\n 'comments' => [\n ['article_id' => 2, 'comment' => 'First Comment for Second Article', '_locale' => 'spa'],\n ['article_id' => 2, 'comment' => 'Second Comment for Second Article', '_locale' => 'spa'],\n ],\n '_locale' => 'spa',\n ],\n [\n 'id' => 3,\n 'title' => 'Third Article',\n 'body' => 'Third Article Body',\n 'comments' => [],\n '_locale' => 'spa',\n ],\n ];\n $this->assertSame($expected, $results);\n }",
"public function testGetWithConventions()\n {\n $table = TableRegistry::get('articles');\n $this->assertInstanceOf('TestApp\\Model\\Table\\ArticlesTable', $table);\n $table = TableRegistry::get('Articles');\n $this->assertInstanceOf('TestApp\\Model\\Table\\ArticlesTable', $table);\n\n $table = TableRegistry::get('authors');\n $this->assertInstanceOf('TestApp\\Model\\Table\\AuthorsTable', $table);\n $table = TableRegistry::get('Authors');\n $this->assertInstanceOf('TestApp\\Model\\Table\\AuthorsTable', $table);\n }",
"public function testEmailSharedLink()\n {\n }",
"public function testRelationships() {\n\n // Create the relationship type terms.\n $names = ['Duplicate', 'Article/Editorial', 'Other'];\n $types = [];\n $id = 1;\n foreach ($names as $name) {\n $values = [\n 'vid' => 'relationship_types',\n 'field_text_id' => str_replace('/', '_', strtolower($name)),\n 'name' => $name,\n 'status' => TRUE,\n 'description' => \"Yada yada $name relationship.\",\n ];\n $term = Term::create($values);\n $term->save();\n $types[$name] = $term->id();\n }\n\n // Create a user and some article entities.\n $account = $this->drupalCreateUser(['manage articles', 'perform full search']);\n for ($i = 0; $i < 3; $i++) {\n $values = [\n 'id' => $i + 500001,\n 'imported_by' => $account->id(),\n 'import_date' => date('Y-m-d H:i:s'),\n 'title' => 'Article ' . substr('ABC', $i, 1),\n 'source_id' => 10000001 + $i,\n ];\n Article::create($values)->save();\n }\n\n // Navigate to the full history page for the first article.\n $this->drupalLogin($account);\n $this->drupalGet('articles/500001');\n $assert_session = $this->assertSession();\n $assert_session->statusCodeEquals(200);\n $assert_session->pageTextContains('Article A');\n\n // Bring up the form to link this article to others.\n $this->clickLink('Related');\n $assert_session->statusCodeEquals(200);\n\n // Fill in the form and submit it.\n $form = $this->getSession()->getPage();\n $form->fillField('related', '500002, 500003');\n $form->selectFieldOption('type', $types['Article/Editorial']);\n $form->fillField('comments', 'Yadissimo!');\n $form->checkField('edit-options-suppress');\n $form->pressButton('Submit');\n\n // Confirm that the relationships appear on the first article's page.\n $assert_session->statusCodeEquals(200);\n $assert_session->pageTextContains('Article A');\n $assert_session->pageTextMatches('#Article/Editorial.+Yadissimo!.+Article/Editorial.+Yadissimo!#');\n $assert_session->linkExists('500002');\n $assert_session->linkExists('500003');\n $assert_session->linkExists('10000002');\n $assert_session->linkExists('10000003');\n }",
"public function testGetAssociation()\n {\n $this->fixtures('users', 'articles');\n\n $user = User::find($this->users('derek')->id);\n $this->assertTrue($user->articles instanceof Mad_Model_Collection);\n $this->assertTrue($user->articles[0] instanceof Article);\n }",
"public function testInvalidAssociation() {\n\t\t$TestModel = new ValidationTest1();\n\t\t$this->assertNull($TestModel->getAssociated('Foo'));\n\t}",
"protected function isLink() {}",
"public function testCustomTableLocator(): void\n {\n $locator = new TableLocator();\n\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', [\n 'fields' => ['title', 'body'],\n 'validator' => 'custom',\n 'tableLocator' => $locator,\n ]);\n\n $behaviorLocator = $table->behaviors()->get('Translate')->getTableLocator();\n\n $this->assertSame($locator, $behaviorLocator);\n $this->assertNotSame($table->associations()->getTableLocator(), $behaviorLocator);\n $this->assertNotSame($this->getTableLocator(), $behaviorLocator);\n }",
"public function testAssociateAppearance()\n {\n }",
"public function testCreateSharedLink()\n {\n }",
"public function testResolverResource()\n {\n $model = new \\stdClass;\n $model->schema = array(\n \"fields\" => array(\n \t \"id\"\n \t),\n \t\"needs\" => array(\n \t \"id\"\t\n )\n );\n $model->loads = new \\stdClass;\n $model->loads->init = \"\";\n $model->loads->primary = \"GET\";\n $model->loads->id = \"id\";\n \n // TODO test resolver resource here\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 testAliasManagerSharedState() {\n /** @var \\Drupal\\Core\\Path\\AliasManager $legacy_alias_manager */\n $legacy_alias_manager = $this->container->get('path.alias_manager');\n /** @var \\Drupal\\path_alias\\AliasManager $alias_manager */\n $alias_manager = $this->container->get('path_alias.manager');\n\n $cache_key = $this->randomMachineName();\n $alias_manager->setCacheKey($cache_key);\n $this->assertSharedProperty('preload-paths:' . $cache_key, $legacy_alias_manager, 'cacheKey');\n\n $invalid_alias = '/' . $this->randomMachineName();\n $alias_manager->getPathByAlias($invalid_alias);\n $this->assertSharedProperty(['en' => [$invalid_alias => TRUE]], $legacy_alias_manager, 'noPath');\n\n $this->assertSharedProperty(FALSE, $legacy_alias_manager, 'preloadedPathLookups');\n\n /** @var \\Drupal\\path_alias\\Entity\\PathAlias $alias */\n $alias = PathAlias::create([\n 'path' => '/' . $this->randomMachineName(),\n 'alias' => $invalid_alias . '2',\n ]);\n $alias->save();\n\n $this->assertSharedProperty([], $legacy_alias_manager, 'preloadedPathLookups');\n\n /** @var \\Drupal\\Core\\State\\StateInterface $state */\n $state = $this->container->get('state');\n $state->set('router.path_roots', [ltrim($alias->getPath(), '/')]);\n\n $alias_manager->getAliasByPath($alias->getPath());\n $this->assertSharedProperty(['en' => [$alias->getPath() => $alias->getAlias()]], $legacy_alias_manager, 'lookupMap');\n\n $invalid_path = $alias->getPath() . '/' . $this->randomMachineName();\n $alias_manager->getAliasByPath($invalid_path);\n $this->assertSharedProperty(['en' => [$invalid_path => TRUE]], $legacy_alias_manager, 'noAlias');\n }",
"public function testSaveTranslationWithAssociationWhitelist(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->hasMany('Comments');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $table->setLocale('fra');\n\n $article = $table->find()->first();\n $this->assertSame(1, $article->get('id'));\n $article->set('title', 'Le titre');\n $table->save($article, ['associated' => ['Comments']]);\n $this->assertNull($article->get('_i18n'));\n\n $article = $table->find()->first();\n $this->assertSame('Le titre', $article->get('title'));\n }",
"public function testContactAnonymization() {\n $anonymizer = new Anonymizer(false);\n $anonymizer->anonymize($this->contact, false);\n $anonymizer->deleteOldRevisions($this->contact);\n\n $contact = entity_load_single('redhen_contact', $this->contact->contact_id);\n $old_contact = $this->contact;\n\n // Is a contact record still there?\n $this->assertNotEmpty($contact);\n // Did the first name change to \"Anonymous\" as specified in the Anonymizer?\n $this->assertEqual($contact->first_name, \"Anonymous\");\n // Did the revision change?\n $this->assertNotEquals($contact->revision_id, $old_contact->revision_id);\n // Was the old revision deleted?\n $this->assertFalse(entity_revision_load('redhen_contact', $old_contact->revision_id));\n }",
"public function setupAssociations() \n {\n \n }",
"public function testAddRelatedLabel()\n {\n $label = 'Twitter main account';\n $this->intent->addRelated('twitter', $label);\n\n $related = self::getProperty($this->intent, 'related');\n $related = array_values($related);\n $related = reset($related);\n $this->assertEquals($label, $related, 'Failed to set a related screen_name label');\n }",
"public function testDeepMatchingDoesNotCreateAssociationProperty(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->hasMany('Comments');\n $table->Comments->belongsTo('Authors')->setForeignKey('user_id');\n\n $table->Comments->addBehavior('Translate', ['fields' => ['comment']]);\n $table->Comments->setLocale('abc');\n\n $table->Comments->Authors->addBehavior('Translate', ['fields' => ['name']]);\n $table->Comments->Authors->setLocale('xyz');\n\n $this->assertNotEquals($table->Comments->getLocale(), I18n::getLocale());\n $this->assertNotEquals($table->Comments->Authors->getLocale(), I18n::getLocale());\n\n $result = $table\n ->find()\n ->contain('Comments')\n ->matching('Comments.Authors')\n ->first();\n\n $this->assertArrayNotHasKey('author', $result->comments);\n }",
"public function test_1_3()\n {\n $out = SetupTestData::hasmany_save_1();\n\n // get all items to avoid losing them when the clean() is executed over the collection\n $addresses = $out['person']->get_addresses()->all();\n\n $out['person']->clean_addresses();\n\n $out['person']->save();\n\n\n // tests\n $this->assert($out['person']->size_addresses() === 0, 'Has many has 0 objects');\n\n foreach ($addresses as $i => $address)\n {\n $this->assert($address->person_addresses_back === NULL, \"Backlink of item $i object is NULL\");\n }\n }",
"public function testReplaceAssociationsByObjects()\n {\n $this->fixtures('users', 'articles');\n\n $user = User::find($this->users('derek')->id);\n $this->assertTrue(count($user->articles) > 0);\n\n $article1 = Article::find($this->articles('testing_js')->id);\n $article2 = Article::find($this->articles('xml_rpc')->id);\n $user->replaceArticles(array($article1, $article2));\n\n $this->assertEquals($article1, $user->articles[0]);\n $this->assertEquals($article2, $user->articles[1]);\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 \n $this->assertEquals(2, count($user->articles));\n\n $article1 = Article::find($this->articles('testing_js')->id);\n $article2 = Article::find($this->articles('xml_rpc')->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 }",
"public function testGetSharedLink()\n {\n }",
"public function testExpand()\n {\n $link = $this->getMock('Mremi\\UrlShortener\\Model\\LinkInterface');\n\n $this->provider\n ->expects($this->once())\n ->method('expand')\n ->with($this->equalTo($link));\n\n $this->providerProxy->expand($link);\n }",
"public function test_1_2()\n {\n global $Address;\n\n $out = SetupTestData::hasmany_save_1();\n\n $address = $out['person']->get_addresses()[1];\n\n $is_removed = $out['person']->remove_from_addresses($address);\n\n $out['person']->save();\n\n\n // tests\n $this->assert($is_removed, 'Removed OK');\n\n $this->assert($out['person']->size_addresses() === 2, 'Has many has 2 objects');\n\n $this->assert($address->person_addresses_back === NULL, 'Backlink of removed object is NULL');\n }",
"public function testGetUnitRelationshipTypes()\n {\n }",
"function alias_make_table() {\n\n\tglobal $config, $g, $aliastable;\n\n\t$aliastable = array();\n\n\tif (is_array($config['aliases']['alias'])) {\n\t\tforeach ($config['aliases']['alias'] as $alias) {\n\t\t\tif ($alias['name'])\n\t\t\t$aliastable[$alias['name']] = $alias['address'];\n\t\t}\n\t}\n}",
"public function testGetSharedLinkRenditionContent()\n {\n }",
"public function checkAndSetAlias() {}",
"public function testGetMacro()\n {\n $assoc = Mad_Model_Association_Base::factory('hasMany', 'Articles', array(), new User);\n $this->assertEquals('hasMany', $assoc->getMacro());\n }",
"public function testAliasFieldRouteException() {\n $this->assertSame('uid', $this->resourceTypeRepository->getByTypeName('node--article')->getPublicName('uid'));\n $this->assertSame('roles', $this->resourceTypeRepository->getByTypeName('user--user')->getPublicName('roles'));\n $resource_type_field_aliases = [\n 'node--article' => [\n 'uid' => 'author',\n ],\n 'user--user' => [\n 'roles' => 'user_roles',\n ],\n ];\n \\Drupal::state()->set('jsonapi_test_resource_type_builder.resource_type_field_aliases', $resource_type_field_aliases);\n Cache::invalidateTags(['jsonapi_resource_types']);\n $this->assertSame('author', $this->resourceTypeRepository->getByTypeName('node--article')->getPublicName('uid'));\n $this->assertSame('user_roles', $this->resourceTypeRepository->getByTypeName('user--user')->getPublicName('roles'));\n\n // Create the request to fetch the articles and fetch included user.\n [$request, $resource_type] = $this->generateProphecies('node', 'article');\n $user = User::load($this->node->getOwnerId());\n\n $resource_object = ResourceObject::createFromEntity($resource_type, $this->node);\n [$request, $user_resource_type] = $this->generateProphecies('user', 'user');\n $resource_object_user = LabelOnlyResourceObject::createFromEntity($user_resource_type, $user);\n $includes = $this->includeResolver->resolve($resource_object_user, 'user_roles');\n\n /** @var \\Drupal\\jsonapi\\Normalizer\\Value\\CacheableNormalization $jsonapi_doc_object */\n $jsonapi_doc_object = $this\n ->getNormalizer()\n ->normalize(\n new JsonApiDocumentTopLevel(new ResourceObjectData([$resource_object, $resource_object_user], 2), $includes, new LinkCollection([])),\n 'api_json',\n [\n 'resource_type' => $resource_type,\n 'account' => NULL,\n 'sparse_fieldset' => [\n 'node--article' => [\n 'title',\n 'node_type',\n 'uid',\n ],\n 'user--user' => [\n 'user_roles',\n ],\n ],\n 'include' => [\n 'user_roles',\n ],\n ],\n )->getNormalization();\n $this->assertNotEmpty($jsonapi_doc_object['meta']['omitted']);\n foreach ($jsonapi_doc_object['meta']['omitted']['links'] as $key => $link) {\n if (strpos($key, 'item--') === 0) {\n // Ensure that resource link contains url with the alias field.\n $resource_link = Url::fromUri('internal:/jsonapi/user/user/' . $user->uuid() . '/user_roles')->setAbsolute()->toString(TRUE);\n $this->assertEquals($resource_link->getGeneratedUrl(), $link['href']);\n $this->assertEquals(\"The current user is not allowed to view this relationship. The user only has authorization for the 'view label' operation.\", $link['meta']['detail']);\n }\n }\n }",
"public function testAddRelationViaURI()\n {\n $uri = new Uri();\n $uri->collection('FooSet')->item(123);\n\n $entry = new Entry($this->createFakeNode());\n $entry->addRelation($uri, 'Foo');\n\n static::assertEquals(\n '<entry>' .\n '<link type=\"application/atom+xml;type=entry\" ' .\n 'href=\"FooSet(123)\" ' .\n 'rel=\"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Foo\" ' .\n 'title=\"Foo\"/>' .\n '</entry>',\n $this->getXML($entry)\n );\n }",
"public function testBuildFromWithAlias()\n {\n $query = $this->getQuery()\n ->table('test')\n ->alias('test_alias')\n ;\n\n $this->assertSame(\n 'FROM test AS test_alias',\n $query->buildFrom()\n );\n }",
"public function test_model_relation_handler_update()\n {\n $model = Individual::create([\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n ]);\n QueryableRelations::new($model)->create(['member'], [\n 'firstname' => 'David',\n 'lastname' => 'P. Thompson',\n 'address' => '1237 McDonald Avenue',\n 'sex' => 'M',\n 'member' => [\n 'phonenumber' => '407-925-1076',\n 'email' => '[email protected]',\n ],\n ]);\n QueryableRelations::new($model)->update(['member'], [\n 'member' => [\n 'email' => '[email protected]',\n ],\n ], true);\n $member = Member::where('email', '[email protected]')->get()->first();\n $this->assertNotNull($member);\n $this->assertSame($model->getKey(), $member->distinctable_id);\n }",
"public function testGetSharedLinkContent()\n {\n }",
"public function testLocalePropertyIsSetInMatchingDataWhenUsingContainedMatching(): void\n {\n $table = $this->getTableLocator()->get('Authors');\n $table->hasMany('Articles');\n $table->Articles->belongsToMany('Tags');\n\n $table->Articles->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $table->Articles->setLocale('abc');\n\n $table->Articles->Tags->addBehavior('Translate', ['fields' => ['name']]);\n $table->Articles->Tags->setLocale('xyz');\n\n $this->assertNotEquals($table->Articles->getLocale(), I18n::getLocale());\n $this->assertNotEquals($table->Articles->Tags->getLocale(), I18n::getLocale());\n\n $result = $table\n ->find()\n ->contain([\n 'Articles' => function ($query) {\n return $query->matching('Tags');\n },\n 'Articles.Tags',\n ])\n ->first();\n\n $this->assertArrayNotHasKey('_locale', $result->articles);\n $this->assertArrayNotHasKey('_locale', $result->articles[0]->tags);\n $this->assertSame('abc', $result->articles[0]->_locale);\n $this->assertSame('xyz', $result->articles[0]->_matchingData['Tags']->_locale);\n }"
] | [
"0.676927",
"0.6089807",
"0.60741633",
"0.59750825",
"0.5933333",
"0.5844251",
"0.5828566",
"0.58260363",
"0.5812981",
"0.57350504",
"0.5729496",
"0.5690536",
"0.5611303",
"0.5581695",
"0.5544663",
"0.5539207",
"0.55224174",
"0.5512869",
"0.54575145",
"0.5445433",
"0.5391807",
"0.5384978",
"0.5373692",
"0.5351602",
"0.53509533",
"0.5339531",
"0.5304327",
"0.52838975",
"0.5281786",
"0.52761704",
"0.5275203",
"0.52630895",
"0.5256205",
"0.5247101",
"0.52353156",
"0.523376",
"0.52274925",
"0.52093065",
"0.5203583",
"0.5200979",
"0.51994014",
"0.5194503",
"0.51902926",
"0.5189279",
"0.5189246",
"0.5183037",
"0.51733994",
"0.5165107",
"0.5160554",
"0.51490426",
"0.51428473",
"0.51410234",
"0.5138288",
"0.5133766",
"0.51324177",
"0.5127813",
"0.5127223",
"0.512666",
"0.5122999",
"0.5122375",
"0.5115229",
"0.5107042",
"0.51009667",
"0.509863",
"0.5080877",
"0.50798804",
"0.507942",
"0.50578487",
"0.5057796",
"0.505763",
"0.50424016",
"0.5036603",
"0.5022047",
"0.50177103",
"0.50167274",
"0.5015597",
"0.5009374",
"0.49956176",
"0.49950147",
"0.49944878",
"0.49894094",
"0.4988823",
"0.49831197",
"0.49741137",
"0.49734208",
"0.49695906",
"0.4968787",
"0.49681494",
"0.49667582",
"0.49646756",
"0.49638852",
"0.49601007",
"0.49562427",
"0.49561003",
"0.49534547",
"0.4951254",
"0.49437824",
"0.49340206",
"0.49339303",
"0.49313906"
] | 0.63849884 | 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 authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
] | [
"0.8399559",
"0.8375976",
"0.8375976",
"0.8342963",
"0.825244",
"0.824597",
"0.82116634",
"0.81456405",
"0.81095356",
"0.80819404",
"0.79899764",
"0.7988185",
"0.79821676",
"0.7959435",
"0.79494536",
"0.79476935",
"0.7925",
"0.7913219",
"0.78985447",
"0.7892049",
"0.7888783",
"0.78885525",
"0.7860001",
"0.7839742",
"0.7839742",
"0.7836824",
"0.7823007",
"0.7810926",
"0.7806934",
"0.77903354",
"0.7786534",
"0.7781346",
"0.77802587",
"0.7761786",
"0.7752098",
"0.77181315",
"0.77181315",
"0.77142626",
"0.7711265",
"0.77023965",
"0.76929665",
"0.7690725",
"0.76904184",
"0.76890206",
"0.76723206",
"0.7665594",
"0.7664652",
"0.7654854",
"0.7648983",
"0.76413405",
"0.76408315",
"0.7639785",
"0.763341",
"0.76287645",
"0.762751",
"0.76264757",
"0.7619986",
"0.7619986",
"0.761193",
"0.76025206",
"0.7601517",
"0.7601157",
"0.7601157",
"0.7600066",
"0.75978255",
"0.75942534",
"0.7586907",
"0.7584423",
"0.7578891",
"0.75615716",
"0.75516856",
"0.75510263",
"0.7550412",
"0.7542515",
"0.75408965",
"0.7537727",
"0.75362265",
"0.7527483",
"0.7514947",
"0.75127167",
"0.7498631",
"0.749526",
"0.7493661",
"0.7490471",
"0.74865395",
"0.7486299",
"0.7478914",
"0.74754286",
"0.74708784",
"0.7470241",
"0.7463862",
"0.74629074",
"0.74623996",
"0.74613595",
"0.74610263",
"0.7447454",
"0.74386954",
"0.7435271",
"0.7432479",
"0.7431103",
"0.742201"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
$types = TypeService::get();
$codes = $types->pluck('code')->toArray();
return [
'service_type' => Rule::in($codes),
'start_date' => 'date_format:Y-m-d',
'end_date' => 'date_format:Y-m-d',
'page_number' => 'integer|min:1',
'page_size' => 'integer|min:1',
];
} | {
"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 |
Get custom attributes for validator errors. | public function attributes()
{
return [
'service_type' => 'tipo del servicio',
'start_date' => 'fecha de inicio',
'end_date' => 'fecha final',
'page_number' => 'número de página',
'page_size' => 'cantidad de registros',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getErrors() {\n return @$this->attributes['errors'];\n }",
"public function getValidationErrors();",
"public function getValidationErrors();",
"public function getErrors(): array {\n return $this->validationError;\n }",
"public function getErrors($attr){\n return $this->errors[$attr][0] ?? false;\n }",
"public function _getValidationErrors(): array\n\t{\n\t\t$errs = parent::_getValidationErrors();\n\t\t$validationRules = $this->_getValidationRules();\n\t\tif (null !== ($v = $this->getUrl())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_URL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getIdentifier())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getName())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_NAME] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDisplay())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DISPLAY] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getStatus())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_STATUS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getExperimental())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getPublisher())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_PUBLISHER] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContact())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDate())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DATE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDescription())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DESCRIPTION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getUseContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getRequirements())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getCopyright())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_COPYRIGHT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getCode())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getFhirVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getMapping())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getKind())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_KIND] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getConstrainedType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getAbstract())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_ABSTRACT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getContextType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getBase())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_BASE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getSnapshot())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_SNAPSHOT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDifferential())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_URL])) {\n\t\t\t$v = $this->getUrl();\n\t\t\tforeach ($validationRules[self::FIELD_URL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_URL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_URL])) {\n\t\t\t\t\t\t$errs[self::FIELD_URL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_URL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IDENTIFIER])) {\n\t\t\t$v = $this->getIdentifier();\n\t\t\tforeach ($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_IDENTIFIER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IDENTIFIER])) {\n\t\t\t\t\t\t$errs[self::FIELD_IDENTIFIER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IDENTIFIER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_VERSION])) {\n\t\t\t$v = $this->getVersion();\n\t\t\tforeach ($validationRules[self::FIELD_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_NAME])) {\n\t\t\t$v = $this->getName();\n\t\t\tforeach ($validationRules[self::FIELD_NAME] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_NAME,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_NAME])) {\n\t\t\t\t\t\t$errs[self::FIELD_NAME] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_NAME][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DISPLAY])) {\n\t\t\t$v = $this->getDisplay();\n\t\t\tforeach ($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DISPLAY,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DISPLAY])) {\n\t\t\t\t\t\t$errs[self::FIELD_DISPLAY] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DISPLAY][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_STATUS])) {\n\t\t\t$v = $this->getStatus();\n\t\t\tforeach ($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_STATUS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_STATUS])) {\n\t\t\t\t\t\t$errs[self::FIELD_STATUS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_STATUS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXPERIMENTAL])) {\n\t\t\t$v = $this->getExperimental();\n\t\t\tforeach ($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_EXPERIMENTAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXPERIMENTAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_PUBLISHER])) {\n\t\t\t$v = $this->getPublisher();\n\t\t\tforeach ($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_PUBLISHER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_PUBLISHER])) {\n\t\t\t\t\t\t$errs[self::FIELD_PUBLISHER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_PUBLISHER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTACT])) {\n\t\t\t$v = $this->getContact();\n\t\t\tforeach ($validationRules[self::FIELD_CONTACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DATE])) {\n\t\t\t$v = $this->getDate();\n\t\t\tforeach ($validationRules[self::FIELD_DATE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DATE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DATE])) {\n\t\t\t\t\t\t$errs[self::FIELD_DATE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DATE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DESCRIPTION])) {\n\t\t\t$v = $this->getDescription();\n\t\t\tforeach ($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DESCRIPTION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DESCRIPTION])) {\n\t\t\t\t\t\t$errs[self::FIELD_DESCRIPTION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DESCRIPTION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_USE_CONTEXT])) {\n\t\t\t$v = $this->getUseContext();\n\t\t\tforeach ($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_USE_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_USE_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_REQUIREMENTS])) {\n\t\t\t$v = $this->getRequirements();\n\t\t\tforeach ($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_REQUIREMENTS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_REQUIREMENTS])) {\n\t\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_COPYRIGHT])) {\n\t\t\t$v = $this->getCopyright();\n\t\t\tforeach ($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_COPYRIGHT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_COPYRIGHT])) {\n\t\t\t\t\t\t$errs[self::FIELD_COPYRIGHT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_COPYRIGHT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CODE])) {\n\t\t\t$v = $this->getCode();\n\t\t\tforeach ($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CODE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CODE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CODE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CODE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_FHIR_VERSION])) {\n\t\t\t$v = $this->getFhirVersion();\n\t\t\tforeach ($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_FHIR_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_FHIR_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MAPPING])) {\n\t\t\t$v = $this->getMapping();\n\t\t\tforeach ($validationRules[self::FIELD_MAPPING] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_MAPPING,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MAPPING])) {\n\t\t\t\t\t\t$errs[self::FIELD_MAPPING] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MAPPING][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_KIND])) {\n\t\t\t$v = $this->getKind();\n\t\t\tforeach ($validationRules[self::FIELD_KIND] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_KIND,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_KIND])) {\n\t\t\t\t\t\t$errs[self::FIELD_KIND] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_KIND][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t$v = $this->getConstrainedType();\n\t\t\tforeach ($validationRules[self::FIELD_CONSTRAINED_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONSTRAINED_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ABSTRACT])) {\n\t\t\t$v = $this->getAbstract();\n\t\t\tforeach ($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_ABSTRACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ABSTRACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_ABSTRACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ABSTRACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t$v = $this->getContextType();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT])) {\n\t\t\t$v = $this->getContext();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_BASE])) {\n\t\t\t$v = $this->getBase();\n\t\t\tforeach ($validationRules[self::FIELD_BASE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_BASE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_BASE])) {\n\t\t\t\t\t\t$errs[self::FIELD_BASE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_BASE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_SNAPSHOT])) {\n\t\t\t$v = $this->getSnapshot();\n\t\t\tforeach ($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_SNAPSHOT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_SNAPSHOT])) {\n\t\t\t\t\t\t$errs[self::FIELD_SNAPSHOT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_SNAPSHOT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DIFFERENTIAL])) {\n\t\t\t$v = $this->getDifferential();\n\t\t\tforeach ($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DIFFERENTIAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DIFFERENTIAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_TEXT])) {\n\t\t\t$v = $this->getText();\n\t\t\tforeach ($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_TEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_TEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_TEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_TEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTAINED])) {\n\t\t\t$v = $this->getContained();\n\t\t\tforeach ($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_CONTAINED,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTAINED])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTAINED] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTAINED][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXTENSION])) {\n\t\t\t$v = $this->getExtension();\n\t\t\tforeach ($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t$v = $this->getModifierExtension();\n\t\t\tforeach ($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_MODIFIER_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ID])) {\n\t\t\t$v = $this->getId();\n\t\t\tforeach ($validationRules[self::FIELD_ID] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_ID,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ID])) {\n\t\t\t\t\t\t$errs[self::FIELD_ID] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ID][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_META])) {\n\t\t\t$v = $this->getMeta();\n\t\t\tforeach ($validationRules[self::FIELD_META] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_META,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_META])) {\n\t\t\t\t\t\t$errs[self::FIELD_META] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_META][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t$v = $this->getImplicitRules();\n\t\t\tforeach ($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_IMPLICIT_RULES,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_LANGUAGE])) {\n\t\t\t$v = $this->getLanguage();\n\t\t\tforeach ($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_LANGUAGE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_LANGUAGE])) {\n\t\t\t\t\t\t$errs[self::FIELD_LANGUAGE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_LANGUAGE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $errs;\n\t}",
"public function getValidationErrors()\n\t{\n\t\treturn $this->validationErrors;\n\t}",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getAccident())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAccidentType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT_TYPE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getAdditionalMaterials())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_MATERIALS, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCondition())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCoverage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getCreated())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CREATED] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getDiagnosis())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEnterer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENTERER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getFacility())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FACILITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getFundsReserve())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getInterventionException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_INTERVENTION_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getItem())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getMissingTeeth())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_MISSING_TEETH, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOrganization())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORGANIZATION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPatient())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PATIENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPayee())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PAYEE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPriority())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRIORITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getProvider())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PROVIDER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getReferral())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REFERRAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSchool())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SCHOOL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getTarget())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TARGET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TYPE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getUse())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_USE] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT])) {\n $v = $this->getAccident();\n foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT])) {\n $errs[self::FIELD_ACCIDENT] = [];\n }\n $errs[self::FIELD_ACCIDENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT_TYPE])) {\n $v = $this->getAccidentType();\n foreach($validationRules[self::FIELD_ACCIDENT_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT_TYPE])) {\n $errs[self::FIELD_ACCIDENT_TYPE] = [];\n }\n $errs[self::FIELD_ACCIDENT_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ADDITIONAL_MATERIALS])) {\n $v = $this->getAdditionalMaterials();\n foreach($validationRules[self::FIELD_ADDITIONAL_MATERIALS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ADDITIONAL_MATERIALS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ADDITIONAL_MATERIALS])) {\n $errs[self::FIELD_ADDITIONAL_MATERIALS] = [];\n }\n $errs[self::FIELD_ADDITIONAL_MATERIALS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONDITION])) {\n $v = $this->getCondition();\n foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CONDITION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONDITION])) {\n $errs[self::FIELD_CONDITION] = [];\n }\n $errs[self::FIELD_CONDITION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_COVERAGE])) {\n $v = $this->getCoverage();\n foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_COVERAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COVERAGE])) {\n $errs[self::FIELD_COVERAGE] = [];\n }\n $errs[self::FIELD_COVERAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CREATED])) {\n $v = $this->getCreated();\n foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CREATED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CREATED])) {\n $errs[self::FIELD_CREATED] = [];\n }\n $errs[self::FIELD_CREATED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DIAGNOSIS])) {\n $v = $this->getDiagnosis();\n foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DIAGNOSIS])) {\n $errs[self::FIELD_DIAGNOSIS] = [];\n }\n $errs[self::FIELD_DIAGNOSIS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENTERER])) {\n $v = $this->getEnterer();\n foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ENTERER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENTERER])) {\n $errs[self::FIELD_ENTERER] = [];\n }\n $errs[self::FIELD_ENTERER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXCEPTION])) {\n $v = $this->getException();\n foreach($validationRules[self::FIELD_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXCEPTION])) {\n $errs[self::FIELD_EXCEPTION] = [];\n }\n $errs[self::FIELD_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FACILITY])) {\n $v = $this->getFacility();\n foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FACILITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FACILITY])) {\n $errs[self::FIELD_FACILITY] = [];\n }\n $errs[self::FIELD_FACILITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) {\n $v = $this->getFundsReserve();\n foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FUNDS_RESERVE])) {\n $errs[self::FIELD_FUNDS_RESERVE] = [];\n }\n $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INTERVENTION_EXCEPTION])) {\n $v = $this->getInterventionException();\n foreach($validationRules[self::FIELD_INTERVENTION_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INTERVENTION_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INTERVENTION_EXCEPTION])) {\n $errs[self::FIELD_INTERVENTION_EXCEPTION] = [];\n }\n $errs[self::FIELD_INTERVENTION_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ITEM])) {\n $v = $this->getItem();\n foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ITEM, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ITEM])) {\n $errs[self::FIELD_ITEM] = [];\n }\n $errs[self::FIELD_ITEM][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MISSING_TEETH])) {\n $v = $this->getMissingTeeth();\n foreach($validationRules[self::FIELD_MISSING_TEETH] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_MISSING_TEETH, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MISSING_TEETH])) {\n $errs[self::FIELD_MISSING_TEETH] = [];\n }\n $errs[self::FIELD_MISSING_TEETH][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORGANIZATION])) {\n $v = $this->getOrganization();\n foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORGANIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORGANIZATION])) {\n $errs[self::FIELD_ORGANIZATION] = [];\n }\n $errs[self::FIELD_ORGANIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $v = $this->getOriginalPrescription();\n foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) {\n $v = $this->getOriginalRuleset();\n foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) {\n $errs[self::FIELD_ORIGINAL_RULESET] = [];\n }\n $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PATIENT])) {\n $v = $this->getPatient();\n foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PATIENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PATIENT])) {\n $errs[self::FIELD_PATIENT] = [];\n }\n $errs[self::FIELD_PATIENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PAYEE])) {\n $v = $this->getPayee();\n foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PAYEE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PAYEE])) {\n $errs[self::FIELD_PAYEE] = [];\n }\n $errs[self::FIELD_PAYEE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRESCRIPTION])) {\n $v = $this->getPrescription();\n foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRESCRIPTION])) {\n $errs[self::FIELD_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRIORITY])) {\n $v = $this->getPriority();\n foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRIORITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRIORITY])) {\n $errs[self::FIELD_PRIORITY] = [];\n }\n $errs[self::FIELD_PRIORITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROVIDER])) {\n $v = $this->getProvider();\n foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROVIDER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROVIDER])) {\n $errs[self::FIELD_PROVIDER] = [];\n }\n $errs[self::FIELD_PROVIDER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REFERRAL])) {\n $v = $this->getReferral();\n foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_REFERRAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REFERRAL])) {\n $errs[self::FIELD_REFERRAL] = [];\n }\n $errs[self::FIELD_REFERRAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RULESET])) {\n $v = $this->getRuleset();\n foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RULESET])) {\n $errs[self::FIELD_RULESET] = [];\n }\n $errs[self::FIELD_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SCHOOL])) {\n $v = $this->getSchool();\n foreach($validationRules[self::FIELD_SCHOOL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SCHOOL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SCHOOL])) {\n $errs[self::FIELD_SCHOOL] = [];\n }\n $errs[self::FIELD_SCHOOL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TARGET])) {\n $v = $this->getTarget();\n foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TARGET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TARGET])) {\n $errs[self::FIELD_TARGET] = [];\n }\n $errs[self::FIELD_TARGET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TYPE])) {\n $v = $this->getType();\n foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TYPE])) {\n $errs[self::FIELD_TYPE] = [];\n }\n $errs[self::FIELD_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_USE])) {\n $v = $this->getUse();\n foreach($validationRules[self::FIELD_USE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_USE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_USE])) {\n $errs[self::FIELD_USE] = [];\n }\n $errs[self::FIELD_USE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"public function getValidationErrors() {\n\t\treturn $this->_validationErrors;\n\t}",
"public function getAttributes()\n {\n $attributes = parent::getAttributes();\n $validator = $this->getValidator();\n $attributes['value'] = $validator->getHash();\n return $attributes;\n }",
"private function customErrorFormat()\n {\n static::$errorFormatter = function ($validator) {\n $arr = [];\n foreach ($validator->errors()->toArray() as $key => $value) {\n $arr[$key] = $value[0];\n }\n return [\n 'errors' => $arr,\n 'status' => 'failed',\n ];\n };\n }",
"public function customValidationMessages()\n {\n return [\n 'role_id.required' => 'The role ID is required.',\n 'role_id.exists' => 'The role ID provided does not exist.',\n 'staff_code.required' => 'The staff code is required.',\n 'name.required' => 'The name field is required.',\n 'name.max' => 'The name field exceeds the maximum length of 255.',\n 'email.email' => 'Please provide an email address.',\n ];\n }",
"public function getErrors( $attribute=null ) {\n return is_null($attribute) \n ? $this->errors \n : $this->errors[$attribute];\n }",
"public function getFieldValidationErrors()\n {\n return $this->_aInputValidationErrors;\n }",
"public function getErrors()\n {\n return $this->_arrValidationErrors;\n }",
"abstract protected function setValidationCustomAttributes(): array;",
"public function messages()\n {\n $items = [];\n foreach (static::attributes() as $key => $val) {\n $items[$key . '.required'] = t('common.form.errors.required', [\n 'attribute' => $val,\n ]);\n }\n \n return $items;\n }",
"public function getValidationErrors() {\n\t\treturn (array)$this -> _errors;\n\t}",
"protected function validationErrorMessages()\n {\n return [];\n }",
"protected function validationErrorMessages()\n {\n return [];\n }",
"public function getErrorMessage()\n {\n return $this->validator->errors()->all();\n }",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getDataRequirement())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEncounter())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENCOUNTER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getEvaluationMessage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EVALUATION_MESSAGE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getModuleCanonical())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CANONICAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleCodeableConcept())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleUri())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_URI] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getNote())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOccurrenceDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOutputParameters())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPerformer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERFORMER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getReasonCode())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getReasonReference())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getRequestIdentifier())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getResult())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RESULT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) {\n $v = $this->getDataRequirement();\n foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) {\n $errs[self::FIELD_DATA_REQUIREMENT] = [];\n }\n $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENCOUNTER])) {\n $v = $this->getEncounter();\n foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_ENCOUNTER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENCOUNTER])) {\n $errs[self::FIELD_ENCOUNTER] = [];\n }\n $errs[self::FIELD_ENCOUNTER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EVALUATION_MESSAGE])) {\n $v = $this->getEvaluationMessage();\n foreach($validationRules[self::FIELD_EVALUATION_MESSAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_EVALUATION_MESSAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EVALUATION_MESSAGE])) {\n $errs[self::FIELD_EVALUATION_MESSAGE] = [];\n }\n $errs[self::FIELD_EVALUATION_MESSAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CANONICAL])) {\n $v = $this->getModuleCanonical();\n foreach($validationRules[self::FIELD_MODULE_CANONICAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CANONICAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CANONICAL])) {\n $errs[self::FIELD_MODULE_CANONICAL] = [];\n }\n $errs[self::FIELD_MODULE_CANONICAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $v = $this->getModuleCodeableConcept();\n foreach($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CODEABLE_CONCEPT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = [];\n }\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_URI])) {\n $v = $this->getModuleUri();\n foreach($validationRules[self::FIELD_MODULE_URI] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_URI, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_URI])) {\n $errs[self::FIELD_MODULE_URI] = [];\n }\n $errs[self::FIELD_MODULE_URI][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NOTE])) {\n $v = $this->getNote();\n foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_NOTE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NOTE])) {\n $errs[self::FIELD_NOTE] = [];\n }\n $errs[self::FIELD_NOTE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $v = $this->getOccurrenceDateTime();\n foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = [];\n }\n $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OUTPUT_PARAMETERS])) {\n $v = $this->getOutputParameters();\n foreach($validationRules[self::FIELD_OUTPUT_PARAMETERS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OUTPUT_PARAMETERS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OUTPUT_PARAMETERS])) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = [];\n }\n $errs[self::FIELD_OUTPUT_PARAMETERS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERFORMER])) {\n $v = $this->getPerformer();\n foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_PERFORMER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERFORMER])) {\n $errs[self::FIELD_PERFORMER] = [];\n }\n $errs[self::FIELD_PERFORMER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_CODE])) {\n $v = $this->getReasonCode();\n foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_CODE])) {\n $errs[self::FIELD_REASON_CODE] = [];\n }\n $errs[self::FIELD_REASON_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_REFERENCE])) {\n $v = $this->getReasonReference();\n foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_REFERENCE])) {\n $errs[self::FIELD_REASON_REFERENCE] = [];\n }\n $errs[self::FIELD_REASON_REFERENCE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REQUEST_IDENTIFIER])) {\n $v = $this->getRequestIdentifier();\n foreach($validationRules[self::FIELD_REQUEST_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REQUEST_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REQUEST_IDENTIFIER])) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = [];\n }\n $errs[self::FIELD_REQUEST_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESULT])) {\n $v = $this->getResult();\n foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_RESULT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESULT])) {\n $errs[self::FIELD_RESULT] = [];\n }\n $errs[self::FIELD_RESULT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"protected function _getValidationErrors()\n {\n if (is_null($this->validationErrors)) {\n return array();\n }\n\n return $this->validationErrors;\n }",
"public function getValidationMessages();",
"public function getValidationErrorMessages() {}",
"protected function messages()\n {\n return [\n 'id.required' => HttpAttributeInvalidCode::ID_REQUIRED,\n 'password.required' => HttpAttributeInvalidCode::PASSWORD_REQUIRED,\n 'password.same' => HttpAttributeInvalidCode::CONFIRM_PASSWORD_NOT_SAME,\n 'display_name.required' => HttpAttributeInvalidCode::DISPLAY_NAME_REQUIRED,\n 'role_id.required' => HttpAttributeInvalidCode::ROLE_REQUIRED,\n 'status.required' => HttpAttributeInvalidCode::STATUS_REQUIRE\n ];\n }",
"protected function getValidationErrors()\n {\n return $this->validation->errors();\n }",
"public function stringifyAttributeErrors()\n {\n $o = array('fixed' => array(), 'lang' => array());\n $lang = Language::getTitle($this->language_id, false);\n $fixedAttr = $this->fixedAttributes();\n foreach($this->getErrors() as $attr => $errors)\n {\n $isFixed = in_array($attr, $fixedAttr);\n\n $label = $this->getAttributeLabel($attr);\n if(count($errors) > 1)\n $tmp = '<ul><li>'.implode('</li><li>', $errors).'</li></ul>';\n else\n $tmp = is_array($errors) ? $errors[0] : $errors;\n\n if($isFixed)\n $o['fixed'][$label] = $tmp;\n else\n $o['lang'][$lang][$label] = $tmp;\n }\n\n return $o;\n }",
"public function validationErrors() {\n\t\t$return = array();\n\n\t\t$models = ClassRegistry::keys();\n\t\tforeach ($models as $currentModel) {\n\t\t\t$currentObject = ClassRegistry::getObject($currentModel);\n\t\t\tif ($currentObject instanceof Model) {\n\t\t\t\t$return[$currentObject->alias] = $currentObject->validationErrors;\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}",
"public function getErrors($attribute=null)\n\t{\n\t\tif($attribute===null)\n\t\t\treturn $this->_errors;\n\t\telse\n\t\t\treturn isset($this->_errors[$attribute]) ? $this->_errors[$attribute] : array();\n\t}",
"public function getValidationFailed();",
"public function getAttributes()\n {\n return array_merge(\n parent::getAttributes(),\n array(\n 'size' => $this->maxLength,\n 'class' => 'text colorField'\n )\n );\n }",
"public function getValidationErrors()\n\t{\n\t\tif(is_array($this->validation_errors) && \n\t\t\tsizeof($this->validation_errors))\n\t\t{\n\t\t\treturn array_unique($this->validation_errors);\n\t\t}\n\t\treturn array();\n\t}",
"public function getValidationErrors()\n {\n $fields = $this->getFields();\n if (!$fields) {\n return [];\n }\n\n $result = [];\n foreach ($fields as $field) {\n if ($field instanceof AbstractFormField) {\n if (!$field->isValid()) {\n $result = array_merge($result, $field->getErrorMessages());\n }\n }\n }\n\n return $result;\n }",
"protected function messages()\n {\n return [\n 'id.required' => HttpAttributeInvalidCode::ID_REQUIRED\n ];\n }",
"protected function validationErrorMessages()\n {\n return [\n 'password.required' => trans('strings.request_password_required'),\n 'password.confirmed' => trans('strings.request_password_confirmed'),\n 'password.min' => trans('strings.request_password_min', ['chars' => config('db_limits.users.minPasswordLength')]),\n ];\n }",
"public function errorMessages() : array\n {\n return [\n self::RULE_REQUIRED => 'Required.',\n self::RULE_EMAIL => 'Must be a valid email address.',\n self::RULE_MIN => 'Must be at least {min} characters.',\n self::RULE_MAX => 'Must be less than {max} characters.',\n self::RULE_MATCH => 'Must match {match}.',\n self::RULE_UNIQUE => '{column} is already in use.'\n ];\n }",
"protected function getAttr()\r\n\t{\r\n\t\treturn array( 'maxLength', 'width', 'searchMethod', 'searchRangeValues' );\r\n\t}",
"public function getValidationErrors() {\n if (true == ($this->validation instanceof Validation)) {\n return $this->validation->getErrors();\n }\n\n return array();\n }",
"public function getValidationErrors() {\n\t\t$out = array();\n\t\t$this->loadFields();\n\t\tforeach($this->fields as $field) {\n\t\t\t$out = array_merge($out, $field->getValidationErrors());\n\t\t}\n\t\tif ((!$this->lat || !$this->lng) && !$this->feature_id) {\n\t\t\t$out[] = \"You must set a location!\";\n\t\t}\n\t\treturn $out;\n\t}",
"public static function validators() {\n return [\n 'application_id' => 'validateApplicationId',\n 'is_default' => 'validateIsDefault',\n 'role' => 'validateRole',\n 'type' => 'validateType',\n '_issues' => 'validateIssues'\n ];\n }",
"protected function getAttributeRules()\n {\n return $this->attributes;\n }",
"public function getValidationMessages()\n {\n return $this->validationMessages;\n }",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getCountry())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_COUNTRY, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getDataExclusivityPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDateOfFirstAuthorization())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getHolder())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_HOLDER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getInternationalBirthDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getJurisdiction())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getJurisdictionalAuthorization())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_JURISDICTIONAL_AUTHORIZATION, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getLegalBasis())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_LEGAL_BASIS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getProcedure())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PROCEDURE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRegulator())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REGULATOR] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRestoreDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RESTORE_DATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatusDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS_DATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getValidityPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_COUNTRY])) {\n $v = $this->getCountry();\n foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_COUNTRY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COUNTRY])) {\n $errs[self::FIELD_COUNTRY] = [];\n }\n $errs[self::FIELD_COUNTRY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DATA_EXCLUSIVITY_PERIOD])) {\n $v = $this->getDataExclusivityPeriod();\n foreach($validationRules[self::FIELD_DATA_EXCLUSIVITY_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_DATA_EXCLUSIVITY_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD])) {\n $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD] = [];\n }\n $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) {\n $v = $this->getDateOfFirstAuthorization();\n foreach($validationRules[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_DATE_OF_FIRST_AUTHORIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) {\n $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] = [];\n }\n $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_HOLDER])) {\n $v = $this->getHolder();\n foreach($validationRules[self::FIELD_HOLDER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_HOLDER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_HOLDER])) {\n $errs[self::FIELD_HOLDER] = [];\n }\n $errs[self::FIELD_HOLDER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INTERNATIONAL_BIRTH_DATE])) {\n $v = $this->getInternationalBirthDate();\n foreach($validationRules[self::FIELD_INTERNATIONAL_BIRTH_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_INTERNATIONAL_BIRTH_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INTERNATIONAL_BIRTH_DATE])) {\n $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE] = [];\n }\n $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_JURISDICTION])) {\n $v = $this->getJurisdiction();\n foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_JURISDICTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_JURISDICTION])) {\n $errs[self::FIELD_JURISDICTION] = [];\n }\n $errs[self::FIELD_JURISDICTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_JURISDICTIONAL_AUTHORIZATION])) {\n $v = $this->getJurisdictionalAuthorization();\n foreach($validationRules[self::FIELD_JURISDICTIONAL_AUTHORIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_JURISDICTIONAL_AUTHORIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION])) {\n $errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION] = [];\n }\n $errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LEGAL_BASIS])) {\n $v = $this->getLegalBasis();\n foreach($validationRules[self::FIELD_LEGAL_BASIS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_LEGAL_BASIS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LEGAL_BASIS])) {\n $errs[self::FIELD_LEGAL_BASIS] = [];\n }\n $errs[self::FIELD_LEGAL_BASIS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROCEDURE])) {\n $v = $this->getProcedure();\n foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_PROCEDURE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROCEDURE])) {\n $errs[self::FIELD_PROCEDURE] = [];\n }\n $errs[self::FIELD_PROCEDURE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REGULATOR])) {\n $v = $this->getRegulator();\n foreach($validationRules[self::FIELD_REGULATOR] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_REGULATOR, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REGULATOR])) {\n $errs[self::FIELD_REGULATOR] = [];\n }\n $errs[self::FIELD_REGULATOR][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESTORE_DATE])) {\n $v = $this->getRestoreDate();\n foreach($validationRules[self::FIELD_RESTORE_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_RESTORE_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESTORE_DATE])) {\n $errs[self::FIELD_RESTORE_DATE] = [];\n }\n $errs[self::FIELD_RESTORE_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS_DATE])) {\n $v = $this->getStatusDate();\n foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_STATUS_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS_DATE])) {\n $errs[self::FIELD_STATUS_DATE] = [];\n }\n $errs[self::FIELD_STATUS_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) {\n $v = $this->getValidityPeriod();\n foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) {\n $errs[self::FIELD_VALIDITY_PERIOD] = [];\n }\n $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"public function getErrorsAsArray() {\n return $this->validation_errors;\n }",
"public function getError(): array\n {\n return $this->errorMessages;\n }",
"public function getErrors(){\r\n return $this->_errors['error'];\r\n }",
"public function getValidationErrors() {\n\t\tif ($this->_errors === null) {\n\t\t\treturn array();\n\t\t}\n\n\t\treturn $this->_errors->toArray();\n\t}",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getCity())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getCountry())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_COUNTRY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDistrict())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DISTRICT] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getLine())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_LINE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPostalCode())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_POSTAL_CODE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getState())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getText())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TEXT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TYPE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getUse())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_USE] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_CITY])) {\n $v = $this->getCity();\n foreach($validationRules[self::FIELD_CITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_CITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CITY])) {\n $errs[self::FIELD_CITY] = [];\n }\n $errs[self::FIELD_CITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_COUNTRY])) {\n $v = $this->getCountry();\n foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_COUNTRY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COUNTRY])) {\n $errs[self::FIELD_COUNTRY] = [];\n }\n $errs[self::FIELD_COUNTRY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DISTRICT])) {\n $v = $this->getDistrict();\n foreach($validationRules[self::FIELD_DISTRICT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_DISTRICT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DISTRICT])) {\n $errs[self::FIELD_DISTRICT] = [];\n }\n $errs[self::FIELD_DISTRICT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LINE])) {\n $v = $this->getLine();\n foreach($validationRules[self::FIELD_LINE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_LINE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LINE])) {\n $errs[self::FIELD_LINE] = [];\n }\n $errs[self::FIELD_LINE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERIOD])) {\n $v = $this->getPeriod();\n foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERIOD])) {\n $errs[self::FIELD_PERIOD] = [];\n }\n $errs[self::FIELD_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_POSTAL_CODE])) {\n $v = $this->getPostalCode();\n foreach($validationRules[self::FIELD_POSTAL_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_POSTAL_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_POSTAL_CODE])) {\n $errs[self::FIELD_POSTAL_CODE] = [];\n }\n $errs[self::FIELD_POSTAL_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATE])) {\n $v = $this->getState();\n foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_STATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATE])) {\n $errs[self::FIELD_STATE] = [];\n }\n $errs[self::FIELD_STATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TYPE])) {\n $v = $this->getType();\n foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TYPE])) {\n $errs[self::FIELD_TYPE] = [];\n }\n $errs[self::FIELD_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_USE])) {\n $v = $this->getUse();\n foreach($validationRules[self::FIELD_USE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_USE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_USE])) {\n $errs[self::FIELD_USE] = [];\n }\n $errs[self::FIELD_USE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"protected function getErrorData()\n {\n $error = [\n 'message' => $this->getErrorMessage(),\n ];\n\n if ($this->debug && \\is_object($this->error)) {\n $error['exception'] = \\get_class($this->error);\n $error['file'] = $this->error->getFile();\n $error['line'] = $this->error->getLine();\n $error['trace'] = \\collect($this->error->getTrace())->map(function ($trace) {\n return Arr::except($trace, ['args']);\n })->all();\n }\n\n if ($this->error instanceof ValidationException && $this->error->validator) {\n if ($this->error->validator) {\n $error['errors'] = $this->error->validator->errors();\n } else {\n $error['errors'] = [];\n }\n } elseif ($this->error instanceof MessageBag) {\n $error['errors'] = $this->error->getMessages();\n }\n\n return $error;\n }",
"public function getErrors(): array\n {\n return $this->getInputFilter()->getMessages();\n }",
"public function errorMessages()\n {\n return [\n self::RULE_REQUIRED => 'This field is required',\n self::RULE_EMAIL => 'This field must be a valid email address',\n self::RULE_MIN => 'Min length of this field must be {min}',\n self::RULE_MAX => 'Max length of this field must be {max}',\n self::RULE_MATCH => 'This field must be the same as {match}',\n self::RULE_UNIQUE => 'Record with this {field} already exists'\n ];\n }",
"public function getErrors()\n {\n $errors = $this->getValue('klarna_validation_errors');\n return $errors ? $errors : array();\n }",
"public function getErrors()\n {\n return $this->errors; // core.validation.Errors\n }",
"static public function getErrors()\n\t{\n\t\treturn static::$aErrors;\n\t}",
"public function getErrors()\n {\n return $this->getInputFilter()->getMessages();\n }",
"public function getErrors();",
"public function getErrors();",
"public function getErrors();",
"public function getErrors();",
"public function getErrors(): array\n {\n return $this->errors;\n }",
"public function getErrors(): array\n {\n return $this->errors;\n }",
"public function getErrors(): array\n {\n return $this->errors;\n }",
"public function getErrors(): array\n {\n return $this->errors;\n }",
"public function getErrors(): array\n {\n return $this->errors;\n }",
"public function getErrors(): array\n {\n return $this->errors;\n }",
"public function getErrors(): array\n {\n return $this->errors;\n }",
"public function messages()\n {\n return [\n 'required' => ':attribute field must be filled',\n 'email' => ':attribute field must be an email',\n 'unique' => ':attribute field already registered',\n ];\n }",
"protected function formatValidationErrors(Validator $validator)\n {\n return $validator->errors()->getMessages();\n }",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getAdditionalAttributes() {}",
"public function getItemErrors()\n {\n return $this->itemErrors;\n }",
"public function get_errors() {\n\t\treturn $this->errors->get_error_messages();\n\t}",
"private function getPasswordResetValidationAttribs()\n {\n $attribs = [\n 'password' => [\n 'required' => true, \n 'matchAny' => false, \n 'default' => null, \n 'missing' => 'This password field is missing', \n 'noFilter' => false,\n 'rules' => [\n 'Minimum Length' => [\n 'constraint' => \"LenMin:7\",\n 'error' => 'Your password must be at last 7 characters long',\n 'skipEmpty' => false,\n 'sufficient' => false\n ],\n 'Password Match' => [\n 'constraint' => function($in) {\n return ($in == INPUT::post(\"password_repeat\"));\n },\n 'error' => 'Your passwords do not match. Please reenter your passwords and try again.',\n 'skipEmpty' => false,\n 'sufficient' => false\n ] \n ]\n ], \n ];\n \n return $attribs;\n }",
"public function get_errors() {\n $res = array();\n foreach($this->errors as $error) {\n $res[] = $error->errormsg;\n }\n return $res;\n }",
"public static function getErrors(): array\n {\n return self::$errors;\n }",
"private function getValidation() {\n return [\n 'title' => 'required|min:4|max:50',\n 'poster' => 'required|max:255',\n 'price' => 'required',\n 'start_date' => 'required',\n ];\n }",
"public function getErrors()\n {\n return $this->validator->errors();\n }",
"protected function validationErrorMessages()\n {\n return [\n 'password.regex' => 'Password must contain at least 1 uppercase letter and 1 number.',\n ];\n }",
"public function getFormErrors(): array\n {\n return $this->formErrors;\n }",
"final public function getError():array\n {\n return $this->errors;\n }",
"public function getErrorMessageAttribute($value){\n return $value;\n }",
"public function getErrors()\n {\n return $this->_getChildrenByName('error');\n }",
"public function validation_errors()\n\t{\n\t\t$errors = array();\n\n\t\tforeach ($this->validators as $fld=>$arr)\n\t\t{\n\t\t\tforeach ($arr as $vl)\n\t\t\t{\n\t\t\t\t$vl->page = $this;\n\n\t\t\t\tif (!$vl->validate($fld, $this->vars))\n\t\t\t\t{\n\t\t\t\t\t$errors[$fld] = $vl->error_message($fld, $this->vars);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}",
"public function getCustomValidators() { return $this->_customValidators; }",
"public function attributes()\n {\n $rules_labels = User::$labels;\n return $rules_labels;\n }",
"function get_errors() {\n\t\treturn $this->errors;\n\t}",
"public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }",
"public function get_errors()\n {\n return $this->errors;\n }",
"public function get_errors()\n {\n return $this->errors;\n }",
"public function get_errors()\n {\n return $this->errors;\n }",
"public function getErrors()\n {\n if (array_key_exists(\"errors\", $this->_propDict)) {\n return $this->_propDict[\"errors\"];\n } else {\n return null;\n }\n }",
"public function get_errors() {\n return $this->errors;\n }",
"public function get_errors() {\n return $this->errors;\n }",
"protected function formatErrors(Validator $validator)\n {\n return $validator->getMessageBag()->toArray();\n }"
] | [
"0.6837745",
"0.67689437",
"0.67689437",
"0.6511477",
"0.6446034",
"0.6429277",
"0.6383794",
"0.6322668",
"0.63129574",
"0.6303574",
"0.630143",
"0.6273141",
"0.6257446",
"0.6247686",
"0.62254447",
"0.62107867",
"0.6203077",
"0.6186894",
"0.61815155",
"0.61815155",
"0.615586",
"0.614908",
"0.61057115",
"0.61034375",
"0.60984457",
"0.60923606",
"0.6057291",
"0.6045216",
"0.60266984",
"0.6026255",
"0.6005072",
"0.60006875",
"0.5997952",
"0.5991434",
"0.59877795",
"0.59733576",
"0.595711",
"0.594977",
"0.59479344",
"0.59474903",
"0.59473747",
"0.5945342",
"0.5944878",
"0.594472",
"0.59389704",
"0.59343314",
"0.5922558",
"0.5905941",
"0.5905214",
"0.5896612",
"0.5896046",
"0.5887066",
"0.5884795",
"0.58775264",
"0.58742994",
"0.58671534",
"0.584188",
"0.584188",
"0.584188",
"0.584188",
"0.58288205",
"0.58288205",
"0.58288205",
"0.58288205",
"0.58288205",
"0.58288205",
"0.58288205",
"0.58269423",
"0.5824737",
"0.58174",
"0.5816578",
"0.5816544",
"0.5816544",
"0.58157706",
"0.58157706",
"0.58157706",
"0.58157706",
"0.58017296",
"0.57849234",
"0.5782301",
"0.5781944",
"0.578113",
"0.578018",
"0.57708305",
"0.57704943",
"0.5765039",
"0.57452846",
"0.5730217",
"0.57193357",
"0.5716055",
"0.5711518",
"0.57074124",
"0.57053274",
"0.57018644",
"0.5691015",
"0.5691015",
"0.5691015",
"0.5690953",
"0.5689663",
"0.5689663",
"0.5688995"
] | 0.0 | -1 |
Get the error messages for the defined validation rules. | public function messages()
{
return [
'service_type.in' => 'El :attribute seleccionado no existe',
'start_date.date_format' => 'La :attribute es inválida',
'end_date.date_format' => 'La :attribute es inválida',
'page_number.integer' => 'El :attribute debe ser un número entero',
'page_number.min' => 'El :attribute debe ser :value como mínimo',
'page_size.integer' => 'La :attribute debe ser un número entero',
'page_size.min' => 'La :attribute debe ser :value como mínimo',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getValidationMessages();",
"public function errorMessages()\n {\n return [\n self::RULE_REQUIRED => 'This field is required',\n self::RULE_EMAIL => 'This field must be a valid email address',\n self::RULE_MIN => 'Min length of this field must be {min}',\n self::RULE_MAX => 'Max length of this field must be {max}',\n self::RULE_MATCH => 'This field must be the same as {match}',\n self::RULE_UNIQUE => 'Record with this {field} already exists'\n ];\n }",
"public function getValidationErrorMessages() {}",
"public function getValidationMessages()\n {\n return $this->validationMessages;\n }",
"public function errorMessages() : array\n {\n return [\n self::RULE_REQUIRED => 'Required.',\n self::RULE_EMAIL => 'Must be a valid email address.',\n self::RULE_MIN => 'Must be at least {min} characters.',\n self::RULE_MAX => 'Must be less than {max} characters.',\n self::RULE_MATCH => 'Must match {match}.',\n self::RULE_UNIQUE => '{column} is already in use.'\n ];\n }",
"protected function validationErrorMessages()\n {\n return [];\n }",
"protected function validationErrorMessages()\n {\n return [];\n }",
"public function getErrorMessages() {}",
"public function getValidatorMessages()\n {\n $messages = [];\n \n foreach ($this->owner->getValidatorRules() as $rule) {\n \n if ($rule->hasMessage()) {\n $messages[$rule->getType()] = $rule->getMessage();\n }\n \n }\n \n return $messages;\n }",
"public function messages()\n {\n return VALIDATION_MESSAGE;\n }",
"public function messages()\n {\n return VALIDATION_MESSAGE;\n }",
"public function errors()\n {\n return $this->getRules()->getMessageBag()->all();\n }",
"public function get_validation_messages() {\n\t\t$field = $this->field;\n\t\t$id = $this->get_id( $field );\n\t\t$is_required = $this->is_required( $field );\n\t\t$messages = '';\n\n\t\t$post_title = self::get_property( 'post_title', $field, '' );\n\t\t$post_content = self::get_property( 'post_content', $field, '' );\n\t\t$post_excerpt = self::get_property( 'post_excerpt', $field, '' );\n\t\t$post_image = self::get_property( 'post_image', $field, '' );\n\t\t$setting_required_message = self::get_property( 'required_message', $field, '' );\n\t\t$post_type = self::get_property( 'post_type', $field, 'post' );\n\n\t\t$post_title_enabled = ! empty( $post_title );\n\t\t$post_content_enabled = ! empty( $post_content );\n\t\t$post_excerpt_enabled = ! empty( $post_excerpt );\n\t\t$post_image_enabled = ! empty( $post_image );\n\t\t$category_list = forminator_post_categories( $post_type );\n\n\t\tif ( $is_required ) {\n\t\t\tif ( $post_title_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-title\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_title_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please enter the post title', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif ( $post_content_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-content\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_content_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please enter the post content', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif ( $post_excerpt_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-excerpt\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_excerpt_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please enter the post excerpt', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif ( $post_image_enabled ) {\n\t\t\t\t$messages .= '\"' . $id . '-post-image\": {' . \"\\n\";\n\n\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t'forminator_postdata_field_post_image_validation_message',\n\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please upload a post image', Forminator::DOMAIN ) ),\n\t\t\t\t\t$id,\n\t\t\t\t\t$field\n\t\t\t\t);\n\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t}\n\t\t\tif( ! empty( $category_list ) ) {\n\t\t\t\tforeach ( $category_list as $category ) {\n\t\t\t\t\t$post_category_enabled = self::get_property( $category['value'], $field, '' );\n\t\t\t\t\tif ( $post_category_enabled ) {\n\t\t\t\t\t\t$post_category_multiple = self::get_property( $category['value'].'_multiple', $field, '' );\n\t\t\t\t\t\tif( $post_category_multiple ){\n\t\t\t\t\t\t\t$messages .= '\"' . $id . '-' . $category['value'] . '[]\": {' . \"\\n\";\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$messages .= '\"' . $id . '-' . $category['value'] . '\": {' . \"\\n\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$required_message = apply_filters(\n\t\t\t\t\t\t\t'forminator_postdata_field_' . $category['value'] . '_validation_message',\n\t\t\t\t\t\t\t( ! empty( $setting_required_message ) ? $setting_required_message : __( 'This field is required. Please select a '. $category['singular'], Forminator::DOMAIN ) ),\n\t\t\t\t\t\t\t$id,\n\t\t\t\t\t\t\t$field\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$messages = $messages . '\"required\": \"' . forminator_addcslashes( $required_message ) . '\",' . \"\\n\";\n\n\t\t\t\t\t\t$messages .= '},' . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $messages;\n\t}",
"public function validation_errors()\n\t{\n\t\t$errors = array();\n\n\t\tforeach ($this->validators as $fld=>$arr)\n\t\t{\n\t\t\tforeach ($arr as $vl)\n\t\t\t{\n\t\t\t\t$vl->page = $this;\n\n\t\t\t\tif (!$vl->validate($fld, $this->vars))\n\t\t\t\t{\n\t\t\t\t\t$errors[$fld] = $vl->error_message($fld, $this->vars);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}",
"public function errors()\n {\n return $this->validation->messages()->messages();\n }",
"public function getErrors()\n {\n return $this->getInputFilter()->getMessages();\n }",
"public function getErrorMessages() {\n\t\t$errorMessages = '';\n\t\tforeach ($this->errorMessages as $index => $error) {\n\t\t\t$errorMessages .= \"[Error:\" . $index . '] ' . $error . \"\\n<br />\";\n\t\t}\n\t\treturn $errorMessages;\n\t}",
"public static function getMessageRule(){\n return [\n 'title.required' => 'Please input the title',\n 'cat_id.required' => 'Please chose a category',\n 'country_id.required' => 'Please chose a country',\n ];\n }",
"public function getValidationErrors();",
"public function getValidationErrors();",
"public function getErrorMessages()\n {\n return $this->errorMessages;\n }",
"public function messages()\n {\n return [\n 'started_at.required_if' => __('validation.required'),\n 'ended_at.required_if' => __('validation.required'),\n 'subject_id.required_if' => __('validation.required'),\n 'competency.required_if' => __('validation.required'),\n 'learning_goals.required_if' => __('validation.required'),\n 'behavior.required_if' => __('validation.required'),\n ];\n }",
"public function get_error_messages();",
"function getMessages() {\n\t\t$fields = $this->getFields();\n\t\t$allMessages = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldMessages = $field->getValidationMessages();\n\t\t\tif ($fieldMessages) {\n\t\t\t\t$allMessages[$field->getName()] = $fieldMessages;\n\t\t\t}\n\n\t\t}\n\n\t\treturn $allMessages;\n\t}",
"public function getErrorMessage()\n {\n return $this->validator->errors()->all();\n }",
"public function getErrorMessages()\n {\n $errors = [];\n foreach ($this->fields as $field) {\n if ($field instanceof AbstractFormField && !$field->isValid()) {\n $fldErrors = $field->getErrorMessages();\n $errors = array_merge($errors, $fldErrors);\n }\n }\n\n return $errors;\n }",
"public function errors()\n {\n return $this->validator->errors()->messages();\n }",
"public function getErrorMessages() : array\n {\n return $this->errors_messages;\n }",
"public function getMessages()\n {\n return $this->_errorMessages;\n }",
"public function getMandatoryValidationMessages() {}",
"public function getValidationErrors()\n {\n $fields = $this->getFields();\n if (!$fields) {\n return [];\n }\n\n $result = [];\n foreach ($fields as $field) {\n if ($field instanceof AbstractFormField) {\n if (!$field->isValid()) {\n $result = array_merge($result, $field->getErrorMessages());\n }\n }\n }\n\n return $result;\n }",
"protected function validationErrorMessages()\n {\n return [\n 'password.required' => trans('strings.request_password_required'),\n 'password.confirmed' => trans('strings.request_password_confirmed'),\n 'password.min' => trans('strings.request_password_min', ['chars' => config('db_limits.users.minPasswordLength')]),\n ];\n }",
"protected function getValidationErrors()\n {\n return $this->validation->errors();\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function messages()\n {\n return [\n 'file.required' => trans('validation.downloadable_required'),\n 'category_list.required' => trans('validation.category_list_required'),\n ];\n }",
"public function getMessages()\n {\n foreach (parent::getMessages() as $message) {\n switch ($message->getType()) {\n case 'PresenceOf':\n $message->setMessage('The field ' . $message->getField() . ' is required');\n break;\n case 'Uniqueness':\n $message->setMessage('The field ' . $message->getField() . ' must be unique');\n break;\n case 'Email':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid email');\n break;\n case 'Url':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid url');\n break;\n case 'InclusionIn':\n $message->setMessage('The field ' . $message->getField() . ' must contain a value in [' . implode(',', $message->getDomain()) . ']');\n break;\n case 'DateValidator':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid date.');\n break;\n case 'TimestampValidator':\n $message->setMessage('The field ' . $message->getField() . ' must contain a valid timestamps.');\n break;\n }\n }\n\n return parent::getMessages();\n }",
"public function getValidationErrors() {\n if (true == ($this->validation instanceof Validation)) {\n return $this->validation->getErrors();\n }\n\n return array();\n }",
"public function getErrorMessagesList(){\n \t$errors = $this->getMessages();\n \tif(count($errors)){\n \t\t$result = [];\n \t\tforeach ($errors as $elementName => $elementErrors){\n \t\t\tforeach ($elementErrors as $errorMsg){\n \t\t\t\t$result[] = $errorMsg;\n \t\t\t}\n \t\t}\n \t\treturn $result;\n \t}\n \treturn null;\n }",
"protected function get_errors_description() {\n $errors = array();\n if ($this->options->is_check_errors == true) {\n\n $i = 0;\n $rules_names = $this->get_error_hints_names();\n\n foreach($rules_names as $rule_name) {\n $rule = new $rule_name($this->get_dst_root());\n $rhr = $rule->check_hint();\n\n if (count($rhr->problem_ids) > 0) {\n $errors[$i] = array();\n\n $errors[$i][\"problem\"] = $rhr->problem;\n $errors[$i][\"solve\"] = $rhr->solve;\n $errors[$i][\"problem_ids\"] = $rhr->problem_ids;\n $errors[$i][\"problem_type\"] = $rhr->problem_type;\n $errors[$i][\"problem_indfirst\"] = $rhr->problem_indfirst;\n $errors[$i][\"problem_indlast\"] = $rhr->problem_indlast;\n\n ++$i;\n }\n }\n }\n return $errors;\n }",
"protected function validationErrorMessages()\n {\n return [\n 'password.regex' => 'Password must contain at least 1 uppercase letter and 1 number.',\n ];\n }",
"public function customValidationMessages()\n {\n return [\n 'role_id.required' => 'The role ID is required.',\n 'role_id.exists' => 'The role ID provided does not exist.',\n 'staff_code.required' => 'The staff code is required.',\n 'name.required' => 'The name field is required.',\n 'name.max' => 'The name field exceeds the maximum length of 255.',\n 'email.email' => 'Please provide an email address.',\n ];\n }",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getDataRequirement())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DATA_REQUIREMENT, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEncounter())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENCOUNTER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getEvaluationMessage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EVALUATION_MESSAGE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getModuleCanonical())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CANONICAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleCodeableConcept())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getModuleUri())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_MODULE_URI] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getNote())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_NOTE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOccurrenceDateTime())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOutputParameters())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPerformer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERFORMER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getReasonCode())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_CODE, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getReasonReference())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_REASON_REFERENCE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getRequestIdentifier())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getResult())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RESULT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_DATA_REQUIREMENT])) {\n $v = $this->getDataRequirement();\n foreach($validationRules[self::FIELD_DATA_REQUIREMENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_DATA_REQUIREMENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATA_REQUIREMENT])) {\n $errs[self::FIELD_DATA_REQUIREMENT] = [];\n }\n $errs[self::FIELD_DATA_REQUIREMENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENCOUNTER])) {\n $v = $this->getEncounter();\n foreach($validationRules[self::FIELD_ENCOUNTER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_ENCOUNTER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENCOUNTER])) {\n $errs[self::FIELD_ENCOUNTER] = [];\n }\n $errs[self::FIELD_ENCOUNTER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EVALUATION_MESSAGE])) {\n $v = $this->getEvaluationMessage();\n foreach($validationRules[self::FIELD_EVALUATION_MESSAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_EVALUATION_MESSAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EVALUATION_MESSAGE])) {\n $errs[self::FIELD_EVALUATION_MESSAGE] = [];\n }\n $errs[self::FIELD_EVALUATION_MESSAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CANONICAL])) {\n $v = $this->getModuleCanonical();\n foreach($validationRules[self::FIELD_MODULE_CANONICAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CANONICAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CANONICAL])) {\n $errs[self::FIELD_MODULE_CANONICAL] = [];\n }\n $errs[self::FIELD_MODULE_CANONICAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $v = $this->getModuleCodeableConcept();\n foreach($validationRules[self::FIELD_MODULE_CODEABLE_CONCEPT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_CODEABLE_CONCEPT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_CODEABLE_CONCEPT])) {\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT] = [];\n }\n $errs[self::FIELD_MODULE_CODEABLE_CONCEPT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODULE_URI])) {\n $v = $this->getModuleUri();\n foreach($validationRules[self::FIELD_MODULE_URI] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_MODULE_URI, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODULE_URI])) {\n $errs[self::FIELD_MODULE_URI] = [];\n }\n $errs[self::FIELD_MODULE_URI][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_NOTE])) {\n $v = $this->getNote();\n foreach($validationRules[self::FIELD_NOTE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_NOTE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_NOTE])) {\n $errs[self::FIELD_NOTE] = [];\n }\n $errs[self::FIELD_NOTE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $v = $this->getOccurrenceDateTime();\n foreach($validationRules[self::FIELD_OCCURRENCE_DATE_TIME] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OCCURRENCE_DATE_TIME, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OCCURRENCE_DATE_TIME])) {\n $errs[self::FIELD_OCCURRENCE_DATE_TIME] = [];\n }\n $errs[self::FIELD_OCCURRENCE_DATE_TIME][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_OUTPUT_PARAMETERS])) {\n $v = $this->getOutputParameters();\n foreach($validationRules[self::FIELD_OUTPUT_PARAMETERS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_OUTPUT_PARAMETERS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_OUTPUT_PARAMETERS])) {\n $errs[self::FIELD_OUTPUT_PARAMETERS] = [];\n }\n $errs[self::FIELD_OUTPUT_PARAMETERS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERFORMER])) {\n $v = $this->getPerformer();\n foreach($validationRules[self::FIELD_PERFORMER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_PERFORMER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERFORMER])) {\n $errs[self::FIELD_PERFORMER] = [];\n }\n $errs[self::FIELD_PERFORMER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_CODE])) {\n $v = $this->getReasonCode();\n foreach($validationRules[self::FIELD_REASON_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_CODE])) {\n $errs[self::FIELD_REASON_CODE] = [];\n }\n $errs[self::FIELD_REASON_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REASON_REFERENCE])) {\n $v = $this->getReasonReference();\n foreach($validationRules[self::FIELD_REASON_REFERENCE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REASON_REFERENCE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REASON_REFERENCE])) {\n $errs[self::FIELD_REASON_REFERENCE] = [];\n }\n $errs[self::FIELD_REASON_REFERENCE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REQUEST_IDENTIFIER])) {\n $v = $this->getRequestIdentifier();\n foreach($validationRules[self::FIELD_REQUEST_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_REQUEST_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REQUEST_IDENTIFIER])) {\n $errs[self::FIELD_REQUEST_IDENTIFIER] = [];\n }\n $errs[self::FIELD_REQUEST_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESULT])) {\n $v = $this->getResult();\n foreach($validationRules[self::FIELD_RESULT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_RESULT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESULT])) {\n $errs[self::FIELD_RESULT] = [];\n }\n $errs[self::FIELD_RESULT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_GUIDANCE_RESPONSE, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"public function getErrors()\n {\n $errors = $this->getValue('klarna_validation_errors');\n return $errors ? $errors : array();\n }",
"public function getMessage(): array\n {\n return [\n self::RULE_REQUIRED => 'This Field is required',\n self::RULE_EMAIL => 'Please input valid email address',\n self::RULE_MATCH => 'The Passwords must match',\n self::RULE_UNIQUE => 'This record exists in the database',\n self::RULE_VALID_START_DATE => 'Project start date cannot be before today',\n self::RULE_VALID_END_DATE => 'Project end date cannot be before start date'\n\n ];\n }",
"public function getErrorMessages()\n {\n $translator = Mage::helper('importexport');\n $messages = array();\n\n foreach ($this->_errors as $errorCode => $errorRows) {\n if (isset($this->_messageTemplates[$errorCode])) {\n $errorCode = $translator->__($this->_messageTemplates[$errorCode]);\n }\n foreach ($errorRows as $errorRowData) {\n $key = $errorRowData[1] ? sprintf($errorCode, $errorRowData[1]) : $errorCode;\n $messages[$key][] = $errorRowData[0];\n }\n }\n return $messages;\n }",
"public function getErrors(): array\n {\n return $this->getInputFilter()->getMessages();\n }",
"protected function _getValidationErrors()\n {\n if (is_null($this->validationErrors)) {\n return array();\n }\n\n return $this->validationErrors;\n }",
"public function _getValidationErrors(): array\n\t{\n\t\t$errs = parent::_getValidationErrors();\n\t\t$validationRules = $this->_getValidationRules();\n\t\tif (null !== ($v = $this->getUrl())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_URL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getIdentifier())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getName())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_NAME] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDisplay())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DISPLAY] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getStatus())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_STATUS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getExperimental())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getPublisher())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_PUBLISHER] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContact())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTACT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDate())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DATE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDescription())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DESCRIPTION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getUseContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_USE_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getRequirements())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getCopyright())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_COPYRIGHT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getCode())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CODE, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getFhirVersion())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getMapping())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_MAPPING, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getKind())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_KIND] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getConstrainedType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getAbstract())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_ABSTRACT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getContextType())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif ([] !== ($vs = $this->getContext())) {\n\t\t\tforeach ($vs as $i => $v) {\n\t\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t\t$errs[sprintf('%s.%d', self::FIELD_CONTEXT, $i)] = $fieldErrs;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getBase())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_BASE] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getSnapshot())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_SNAPSHOT] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (null !== ($v = $this->getDifferential())) {\n\t\t\tif ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = $fieldErrs;\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_URL])) {\n\t\t\t$v = $this->getUrl();\n\t\t\tforeach ($validationRules[self::FIELD_URL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_URL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_URL])) {\n\t\t\t\t\t\t$errs[self::FIELD_URL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_URL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IDENTIFIER])) {\n\t\t\t$v = $this->getIdentifier();\n\t\t\tforeach ($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_IDENTIFIER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IDENTIFIER])) {\n\t\t\t\t\t\t$errs[self::FIELD_IDENTIFIER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IDENTIFIER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_VERSION])) {\n\t\t\t$v = $this->getVersion();\n\t\t\tforeach ($validationRules[self::FIELD_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_NAME])) {\n\t\t\t$v = $this->getName();\n\t\t\tforeach ($validationRules[self::FIELD_NAME] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_NAME,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_NAME])) {\n\t\t\t\t\t\t$errs[self::FIELD_NAME] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_NAME][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DISPLAY])) {\n\t\t\t$v = $this->getDisplay();\n\t\t\tforeach ($validationRules[self::FIELD_DISPLAY] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DISPLAY,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DISPLAY])) {\n\t\t\t\t\t\t$errs[self::FIELD_DISPLAY] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DISPLAY][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_STATUS])) {\n\t\t\t$v = $this->getStatus();\n\t\t\tforeach ($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_STATUS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_STATUS])) {\n\t\t\t\t\t\t$errs[self::FIELD_STATUS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_STATUS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXPERIMENTAL])) {\n\t\t\t$v = $this->getExperimental();\n\t\t\tforeach ($validationRules[self::FIELD_EXPERIMENTAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_EXPERIMENTAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXPERIMENTAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXPERIMENTAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_PUBLISHER])) {\n\t\t\t$v = $this->getPublisher();\n\t\t\tforeach ($validationRules[self::FIELD_PUBLISHER] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_PUBLISHER,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_PUBLISHER])) {\n\t\t\t\t\t\t$errs[self::FIELD_PUBLISHER] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_PUBLISHER][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTACT])) {\n\t\t\t$v = $this->getContact();\n\t\t\tforeach ($validationRules[self::FIELD_CONTACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DATE])) {\n\t\t\t$v = $this->getDate();\n\t\t\tforeach ($validationRules[self::FIELD_DATE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DATE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DATE])) {\n\t\t\t\t\t\t$errs[self::FIELD_DATE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DATE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DESCRIPTION])) {\n\t\t\t$v = $this->getDescription();\n\t\t\tforeach ($validationRules[self::FIELD_DESCRIPTION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DESCRIPTION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DESCRIPTION])) {\n\t\t\t\t\t\t$errs[self::FIELD_DESCRIPTION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DESCRIPTION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_USE_CONTEXT])) {\n\t\t\t$v = $this->getUseContext();\n\t\t\tforeach ($validationRules[self::FIELD_USE_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_USE_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_USE_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_USE_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_REQUIREMENTS])) {\n\t\t\t$v = $this->getRequirements();\n\t\t\tforeach ($validationRules[self::FIELD_REQUIREMENTS] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_REQUIREMENTS,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_REQUIREMENTS])) {\n\t\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_REQUIREMENTS][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_COPYRIGHT])) {\n\t\t\t$v = $this->getCopyright();\n\t\t\tforeach ($validationRules[self::FIELD_COPYRIGHT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_COPYRIGHT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_COPYRIGHT])) {\n\t\t\t\t\t\t$errs[self::FIELD_COPYRIGHT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_COPYRIGHT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CODE])) {\n\t\t\t$v = $this->getCode();\n\t\t\tforeach ($validationRules[self::FIELD_CODE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CODE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CODE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CODE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CODE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_FHIR_VERSION])) {\n\t\t\t$v = $this->getFhirVersion();\n\t\t\tforeach ($validationRules[self::FIELD_FHIR_VERSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_FHIR_VERSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_FHIR_VERSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_FHIR_VERSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MAPPING])) {\n\t\t\t$v = $this->getMapping();\n\t\t\tforeach ($validationRules[self::FIELD_MAPPING] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_MAPPING,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MAPPING])) {\n\t\t\t\t\t\t$errs[self::FIELD_MAPPING] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MAPPING][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_KIND])) {\n\t\t\t$v = $this->getKind();\n\t\t\tforeach ($validationRules[self::FIELD_KIND] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_KIND,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_KIND])) {\n\t\t\t\t\t\t$errs[self::FIELD_KIND] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_KIND][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t$v = $this->getConstrainedType();\n\t\t\tforeach ($validationRules[self::FIELD_CONSTRAINED_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONSTRAINED_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONSTRAINED_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONSTRAINED_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ABSTRACT])) {\n\t\t\t$v = $this->getAbstract();\n\t\t\tforeach ($validationRules[self::FIELD_ABSTRACT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_ABSTRACT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ABSTRACT])) {\n\t\t\t\t\t\t$errs[self::FIELD_ABSTRACT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ABSTRACT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t$v = $this->getContextType();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT_TYPE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT_TYPE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT_TYPE])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT_TYPE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTEXT])) {\n\t\t\t$v = $this->getContext();\n\t\t\tforeach ($validationRules[self::FIELD_CONTEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_CONTEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_BASE])) {\n\t\t\t$v = $this->getBase();\n\t\t\tforeach ($validationRules[self::FIELD_BASE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_BASE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_BASE])) {\n\t\t\t\t\t\t$errs[self::FIELD_BASE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_BASE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_SNAPSHOT])) {\n\t\t\t$v = $this->getSnapshot();\n\t\t\tforeach ($validationRules[self::FIELD_SNAPSHOT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_SNAPSHOT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_SNAPSHOT])) {\n\t\t\t\t\t\t$errs[self::FIELD_SNAPSHOT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_SNAPSHOT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_DIFFERENTIAL])) {\n\t\t\t$v = $this->getDifferential();\n\t\t\tforeach ($validationRules[self::FIELD_DIFFERENTIAL] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_STRUCTURE_DEFINITION,\n\t\t\t\t\tself::FIELD_DIFFERENTIAL,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_DIFFERENTIAL])) {\n\t\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_DIFFERENTIAL][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_TEXT])) {\n\t\t\t$v = $this->getText();\n\t\t\tforeach ($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_TEXT,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_TEXT])) {\n\t\t\t\t\t\t$errs[self::FIELD_TEXT] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_TEXT][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_CONTAINED])) {\n\t\t\t$v = $this->getContained();\n\t\t\tforeach ($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_CONTAINED,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_CONTAINED])) {\n\t\t\t\t\t\t$errs[self::FIELD_CONTAINED] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_CONTAINED][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_EXTENSION])) {\n\t\t\t$v = $this->getExtension();\n\t\t\tforeach ($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t$v = $this->getModifierExtension();\n\t\t\tforeach ($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE,\n\t\t\t\t\tself::FIELD_MODIFIER_EXTENSION,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n\t\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_ID])) {\n\t\t\t$v = $this->getId();\n\t\t\tforeach ($validationRules[self::FIELD_ID] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_ID,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_ID])) {\n\t\t\t\t\t\t$errs[self::FIELD_ID] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_ID][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_META])) {\n\t\t\t$v = $this->getMeta();\n\t\t\tforeach ($validationRules[self::FIELD_META] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_META,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_META])) {\n\t\t\t\t\t\t$errs[self::FIELD_META] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_META][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t$v = $this->getImplicitRules();\n\t\t\tforeach ($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_IMPLICIT_RULES,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n\t\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($validationRules[self::FIELD_LANGUAGE])) {\n\t\t\t$v = $this->getLanguage();\n\t\t\tforeach ($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n\t\t\t\t$err = $this->_performValidation(\n\t\t\t\t\tPHPFHIRConstants::TYPE_NAME_RESOURCE,\n\t\t\t\t\tself::FIELD_LANGUAGE,\n\t\t\t\t\t$rule,\n\t\t\t\t\t$constraint,\n\t\t\t\t\t$v,\n\t\t\t\t);\n\t\t\t\tif (null !== $err) {\n\t\t\t\t\tif (!isset($errs[self::FIELD_LANGUAGE])) {\n\t\t\t\t\t\t$errs[self::FIELD_LANGUAGE] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$errs[self::FIELD_LANGUAGE][$rule] = $err;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $errs;\n\t}",
"public function get_errors() {\n\t\treturn $this->errors->get_error_messages();\n\t}",
"public function getValidationErrors()\n\t{\n\t\treturn $this->validationErrors;\n\t}",
"public function messages() \n {\n return[\n 'name.required' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity'],\n 'price.required' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity'],\n 'price.numeric' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity'],\n 'price.major' => ['code' => 'ERROR-1', 'title' => 'Unprocessable Entity']\n ];\n }",
"public function get_clear_error_msgs()\n {\n $msgs = array();\n foreach ($this->errors as $e) {\n $msgs[$e['field']][$e['rule']] = $this->get_validation_error_msg($e['field'], $e['rule'], $e['value']);\n\n }\n return $msgs;\n }",
"public function messages()\n {\n $items = [];\n foreach (static::attributes() as $key => $val) {\n $items[$key . '.required'] = t('common.form.errors.required', [\n 'attribute' => $val,\n ]);\n }\n \n return $items;\n }",
"public function messages()\n {\n return [\n 'name.required' => 'A Team Name is required',\n 'filename.required' => 'A Team Logo is required',\n 'club_state.required' => 'A Club state is required',\n ];\n }",
"public function messages()\n {\n return [\n 'code_day.required' => 'Code day must required!',\n 'name.required' => 'Name must required!',\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'Email is required!',\n 'year.required' => 'Year is required!',\n 'artist_id.required' => 'Artist is required!'\n ];\n }",
"public function messages()\n {\n return [\n 'required' => ':attribute field must be filled',\n 'email' => ':attribute field must be an email',\n 'unique' => ':attribute field already registered',\n ];\n }",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getAccident())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getAccidentType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ACCIDENT_TYPE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getAdditionalMaterials())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ADDITIONAL_MATERIALS, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCondition())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_CONDITION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getCoverage())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_COVERAGE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getCreated())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CREATED] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getDiagnosis())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_DIAGNOSIS, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getEnterer())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ENTERER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getFacility())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FACILITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getFundsReserve())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_FUNDS_RESERVE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getInterventionException())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_INTERVENTION_EXCEPTION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getItem())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_ITEM, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getMissingTeeth())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_MISSING_TEETH, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getOrganization())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORGANIZATION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getOriginalRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_ORIGINAL_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPatient())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PATIENT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPayee())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PAYEE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPrescription())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRESCRIPTION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPriority())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PRIORITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getProvider())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PROVIDER] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getReferral())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REFERRAL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRuleset())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RULESET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSchool())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SCHOOL] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getTarget())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TARGET] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TYPE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getUse())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_USE] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT])) {\n $v = $this->getAccident();\n foreach($validationRules[self::FIELD_ACCIDENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT])) {\n $errs[self::FIELD_ACCIDENT] = [];\n }\n $errs[self::FIELD_ACCIDENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ACCIDENT_TYPE])) {\n $v = $this->getAccidentType();\n foreach($validationRules[self::FIELD_ACCIDENT_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ACCIDENT_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ACCIDENT_TYPE])) {\n $errs[self::FIELD_ACCIDENT_TYPE] = [];\n }\n $errs[self::FIELD_ACCIDENT_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ADDITIONAL_MATERIALS])) {\n $v = $this->getAdditionalMaterials();\n foreach($validationRules[self::FIELD_ADDITIONAL_MATERIALS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ADDITIONAL_MATERIALS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ADDITIONAL_MATERIALS])) {\n $errs[self::FIELD_ADDITIONAL_MATERIALS] = [];\n }\n $errs[self::FIELD_ADDITIONAL_MATERIALS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONDITION])) {\n $v = $this->getCondition();\n foreach($validationRules[self::FIELD_CONDITION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CONDITION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONDITION])) {\n $errs[self::FIELD_CONDITION] = [];\n }\n $errs[self::FIELD_CONDITION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_COVERAGE])) {\n $v = $this->getCoverage();\n foreach($validationRules[self::FIELD_COVERAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_COVERAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COVERAGE])) {\n $errs[self::FIELD_COVERAGE] = [];\n }\n $errs[self::FIELD_COVERAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CREATED])) {\n $v = $this->getCreated();\n foreach($validationRules[self::FIELD_CREATED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_CREATED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CREATED])) {\n $errs[self::FIELD_CREATED] = [];\n }\n $errs[self::FIELD_CREATED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DIAGNOSIS])) {\n $v = $this->getDiagnosis();\n foreach($validationRules[self::FIELD_DIAGNOSIS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_DIAGNOSIS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DIAGNOSIS])) {\n $errs[self::FIELD_DIAGNOSIS] = [];\n }\n $errs[self::FIELD_DIAGNOSIS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ENTERER])) {\n $v = $this->getEnterer();\n foreach($validationRules[self::FIELD_ENTERER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ENTERER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ENTERER])) {\n $errs[self::FIELD_ENTERER] = [];\n }\n $errs[self::FIELD_ENTERER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXCEPTION])) {\n $v = $this->getException();\n foreach($validationRules[self::FIELD_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXCEPTION])) {\n $errs[self::FIELD_EXCEPTION] = [];\n }\n $errs[self::FIELD_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FACILITY])) {\n $v = $this->getFacility();\n foreach($validationRules[self::FIELD_FACILITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FACILITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FACILITY])) {\n $errs[self::FIELD_FACILITY] = [];\n }\n $errs[self::FIELD_FACILITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_FUNDS_RESERVE])) {\n $v = $this->getFundsReserve();\n foreach($validationRules[self::FIELD_FUNDS_RESERVE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_FUNDS_RESERVE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_FUNDS_RESERVE])) {\n $errs[self::FIELD_FUNDS_RESERVE] = [];\n }\n $errs[self::FIELD_FUNDS_RESERVE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INTERVENTION_EXCEPTION])) {\n $v = $this->getInterventionException();\n foreach($validationRules[self::FIELD_INTERVENTION_EXCEPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_INTERVENTION_EXCEPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INTERVENTION_EXCEPTION])) {\n $errs[self::FIELD_INTERVENTION_EXCEPTION] = [];\n }\n $errs[self::FIELD_INTERVENTION_EXCEPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ITEM])) {\n $v = $this->getItem();\n foreach($validationRules[self::FIELD_ITEM] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ITEM, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ITEM])) {\n $errs[self::FIELD_ITEM] = [];\n }\n $errs[self::FIELD_ITEM][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MISSING_TEETH])) {\n $v = $this->getMissingTeeth();\n foreach($validationRules[self::FIELD_MISSING_TEETH] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_MISSING_TEETH, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MISSING_TEETH])) {\n $errs[self::FIELD_MISSING_TEETH] = [];\n }\n $errs[self::FIELD_MISSING_TEETH][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORGANIZATION])) {\n $v = $this->getOrganization();\n foreach($validationRules[self::FIELD_ORGANIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORGANIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORGANIZATION])) {\n $errs[self::FIELD_ORGANIZATION] = [];\n }\n $errs[self::FIELD_ORGANIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $v = $this->getOriginalPrescription();\n foreach($validationRules[self::FIELD_ORIGINAL_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_PRESCRIPTION])) {\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_ORIGINAL_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ORIGINAL_RULESET])) {\n $v = $this->getOriginalRuleset();\n foreach($validationRules[self::FIELD_ORIGINAL_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_ORIGINAL_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ORIGINAL_RULESET])) {\n $errs[self::FIELD_ORIGINAL_RULESET] = [];\n }\n $errs[self::FIELD_ORIGINAL_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PATIENT])) {\n $v = $this->getPatient();\n foreach($validationRules[self::FIELD_PATIENT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PATIENT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PATIENT])) {\n $errs[self::FIELD_PATIENT] = [];\n }\n $errs[self::FIELD_PATIENT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PAYEE])) {\n $v = $this->getPayee();\n foreach($validationRules[self::FIELD_PAYEE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PAYEE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PAYEE])) {\n $errs[self::FIELD_PAYEE] = [];\n }\n $errs[self::FIELD_PAYEE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRESCRIPTION])) {\n $v = $this->getPrescription();\n foreach($validationRules[self::FIELD_PRESCRIPTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRESCRIPTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRESCRIPTION])) {\n $errs[self::FIELD_PRESCRIPTION] = [];\n }\n $errs[self::FIELD_PRESCRIPTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PRIORITY])) {\n $v = $this->getPriority();\n foreach($validationRules[self::FIELD_PRIORITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PRIORITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PRIORITY])) {\n $errs[self::FIELD_PRIORITY] = [];\n }\n $errs[self::FIELD_PRIORITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROVIDER])) {\n $v = $this->getProvider();\n foreach($validationRules[self::FIELD_PROVIDER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_PROVIDER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROVIDER])) {\n $errs[self::FIELD_PROVIDER] = [];\n }\n $errs[self::FIELD_PROVIDER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REFERRAL])) {\n $v = $this->getReferral();\n foreach($validationRules[self::FIELD_REFERRAL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_REFERRAL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REFERRAL])) {\n $errs[self::FIELD_REFERRAL] = [];\n }\n $errs[self::FIELD_REFERRAL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RULESET])) {\n $v = $this->getRuleset();\n foreach($validationRules[self::FIELD_RULESET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_RULESET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RULESET])) {\n $errs[self::FIELD_RULESET] = [];\n }\n $errs[self::FIELD_RULESET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SCHOOL])) {\n $v = $this->getSchool();\n foreach($validationRules[self::FIELD_SCHOOL] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_SCHOOL, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SCHOOL])) {\n $errs[self::FIELD_SCHOOL] = [];\n }\n $errs[self::FIELD_SCHOOL][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TARGET])) {\n $v = $this->getTarget();\n foreach($validationRules[self::FIELD_TARGET] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TARGET, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TARGET])) {\n $errs[self::FIELD_TARGET] = [];\n }\n $errs[self::FIELD_TARGET][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TYPE])) {\n $v = $this->getType();\n foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TYPE])) {\n $errs[self::FIELD_TYPE] = [];\n }\n $errs[self::FIELD_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_USE])) {\n $v = $this->getUse();\n foreach($validationRules[self::FIELD_USE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_CLAIM, self::FIELD_USE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_USE])) {\n $errs[self::FIELD_USE] = [];\n }\n $errs[self::FIELD_USE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"public function messages()\n {\n return [\n 'baskets.required' => trans('validation.recipe baskets'),\n 'steps.required' => trans('validation.recipe steps'),\n 'ingredients.required' => trans('validation.recipe ingredients'),\n ];\n }",
"public function getValidationErrors() {\n\t\t$out = array();\n\t\t$this->loadFields();\n\t\tforeach($this->fields as $field) {\n\t\t\t$out = array_merge($out, $field->getValidationErrors());\n\t\t}\n\t\tif ((!$this->lat || !$this->lng) && !$this->feature_id) {\n\t\t\t$out[] = \"You must set a location!\";\n\t\t}\n\t\treturn $out;\n\t}",
"public function errors() {\n $errors = array();\n foreach ($this->properties as $property) {\n if (!$property->rulesPassed()) {\n $errors[$property->getName()] = $property->getErrors();\n }\n }\n return $errors;\n }",
"public function messages()\n {\n return [\n 'curp.required' => 'Falta la C.U.R.P.',\n 'curp.unique' => 'Esta C.U.R.P. ya existe',\n 'curp.min' => 'C.U.R.P. incorrecta',\n 'curp.max' => 'C.U.R.P. incorrecta',\n 'nombre1.required' => 'Falta el nombre',\n 'nombre1.min' => 'Nombre incorrecto',\n 'nombre1.max' => 'Nombre incorrecto',\n 'apellido1.required' => 'Falta el apellido',\n 'apellido1.min' => 'Apellido incorrecto',\n 'apellido1.max' => 'Apellido incorrecto',\n 'fechanacimiento.required' => 'Falta la fecha de nac.',\n 'genero.required' => 'Obligatorio'\n ];\n }",
"public function getValidationErrors() {\n\t\treturn $this->_validationErrors;\n\t}",
"private function getErrorMessages(): array\n {\n return [\n 'notEmpty' => 'Campo {{name}} obligatorio',\n 'date' => '{{name}} debe tener una fecha valida. Ejemplo de formato: {{format}}\\'',\n 'intVal' => '',\n 'between' => '',\n 'in' => '',\n 'floatVal' => '',\n 'length' => '',\n 'stringType' => '',\n 'objectType' => '',\n 'cantidadRegistros' => 'dsfsdfsd',\n 'periodo.notEmpty' => 'Campo Periodo: es obligatorio',\n 'periodo' => 'Campo Periodo: Debe tener el formato AAAAMM, donde AAAA indica el año y MM el mes en números',\n 'orden.notEmpty' => 'Campo Orden: es obligatorio',\n 'orden' => 'Campo Orden: Debe ser igual a 1 ó 2.',\n 'codigoComprobante.notEmpty' => 'Campo Codigo de Comprobante: es obligatorio',\n 'codigoComprobante' => 'Campo Codigo de Comprobante: Debe debe estar comprendido entre 1 y 9998.',\n 'numeroComprobante.notEmpty' => 'Campo Numero de Comprobante: es obligatorio',\n 'numeroComprobante' => 'Campo Numero de Comprobante: Debe debe estar comprendido entre 1 y 99999999.',\n 'puntoVenta.notEmpty' => 'Punto de venta: es obligatorio',\n 'puntoVenta' => 'Punto de venta: Debe debe estar comprendido entre 1 y 9998.',\n ];\n }",
"public function messages()\n {\n return [\n 'code_area.required' => 'Code area cannot be blank',\n 'name.required' => 'Name area cannot be blank'\n ];\n }",
"public function messages()\n {\n return [\n 'zipcode.required' => 'A Zipcode is required',\n 'publicPlace.required' => 'A Public Place is required',\n 'neighbordhood.required' => 'A Neighbordhood is required',\n 'complement.required' => 'A Complement Name is required',\n 'number.required' => 'A Number is required',\n 'city.required' => 'A City is required',\n 'state.required' => 'A State is required',\n\n 'zipcode.max' => 'A Zipcode max 255 characteres required.',\n 'publicPlace.max' => 'A Public Place max 255 characteres required.',\n 'neighbordhood.max' => 'A Neighbordhood max 255 characteres required.',\n 'complement.max' => 'A Complementmax 255 characteres required.',\n 'number.max' => 'A Number max 255 characteres required.',\n 'city.max' => 'A City max 255 characteres required.',\n 'state.max' => 'A State max 255 characteres required.',\n ];\n }",
"public function validateAll()\n {\n $errorMsgs = array();\n return $errorMsgs;\n }",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if ([] !== ($vs = $this->getCountry())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_COUNTRY, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getDataExclusivityPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDateOfFirstAuthorization())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getHolder())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_HOLDER] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getIdentifier())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_IDENTIFIER, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getInternationalBirthDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getJurisdiction())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_JURISDICTION, $i)] = $fieldErrs;\n }\n }\n }\n if ([] !== ($vs = $this->getJurisdictionalAuthorization())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_JURISDICTIONAL_AUTHORIZATION, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getLegalBasis())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_LEGAL_BASIS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getProcedure())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PROCEDURE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRegulator())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_REGULATOR] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getRestoreDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_RESTORE_DATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatus())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getStatusDate())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATUS_DATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getSubject())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_SUBJECT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getValidityPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_VALIDITY_PERIOD] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_COUNTRY])) {\n $v = $this->getCountry();\n foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_COUNTRY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COUNTRY])) {\n $errs[self::FIELD_COUNTRY] = [];\n }\n $errs[self::FIELD_COUNTRY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DATA_EXCLUSIVITY_PERIOD])) {\n $v = $this->getDataExclusivityPeriod();\n foreach($validationRules[self::FIELD_DATA_EXCLUSIVITY_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_DATA_EXCLUSIVITY_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD])) {\n $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD] = [];\n }\n $errs[self::FIELD_DATA_EXCLUSIVITY_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) {\n $v = $this->getDateOfFirstAuthorization();\n foreach($validationRules[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_DATE_OF_FIRST_AUTHORIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION])) {\n $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION] = [];\n }\n $errs[self::FIELD_DATE_OF_FIRST_AUTHORIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_HOLDER])) {\n $v = $this->getHolder();\n foreach($validationRules[self::FIELD_HOLDER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_HOLDER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_HOLDER])) {\n $errs[self::FIELD_HOLDER] = [];\n }\n $errs[self::FIELD_HOLDER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IDENTIFIER])) {\n $v = $this->getIdentifier();\n foreach($validationRules[self::FIELD_IDENTIFIER] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_IDENTIFIER, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IDENTIFIER])) {\n $errs[self::FIELD_IDENTIFIER] = [];\n }\n $errs[self::FIELD_IDENTIFIER][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_INTERNATIONAL_BIRTH_DATE])) {\n $v = $this->getInternationalBirthDate();\n foreach($validationRules[self::FIELD_INTERNATIONAL_BIRTH_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_INTERNATIONAL_BIRTH_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_INTERNATIONAL_BIRTH_DATE])) {\n $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE] = [];\n }\n $errs[self::FIELD_INTERNATIONAL_BIRTH_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_JURISDICTION])) {\n $v = $this->getJurisdiction();\n foreach($validationRules[self::FIELD_JURISDICTION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_JURISDICTION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_JURISDICTION])) {\n $errs[self::FIELD_JURISDICTION] = [];\n }\n $errs[self::FIELD_JURISDICTION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_JURISDICTIONAL_AUTHORIZATION])) {\n $v = $this->getJurisdictionalAuthorization();\n foreach($validationRules[self::FIELD_JURISDICTIONAL_AUTHORIZATION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_JURISDICTIONAL_AUTHORIZATION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION])) {\n $errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION] = [];\n }\n $errs[self::FIELD_JURISDICTIONAL_AUTHORIZATION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LEGAL_BASIS])) {\n $v = $this->getLegalBasis();\n foreach($validationRules[self::FIELD_LEGAL_BASIS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_LEGAL_BASIS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LEGAL_BASIS])) {\n $errs[self::FIELD_LEGAL_BASIS] = [];\n }\n $errs[self::FIELD_LEGAL_BASIS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PROCEDURE])) {\n $v = $this->getProcedure();\n foreach($validationRules[self::FIELD_PROCEDURE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_PROCEDURE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PROCEDURE])) {\n $errs[self::FIELD_PROCEDURE] = [];\n }\n $errs[self::FIELD_PROCEDURE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_REGULATOR])) {\n $v = $this->getRegulator();\n foreach($validationRules[self::FIELD_REGULATOR] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_REGULATOR, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_REGULATOR])) {\n $errs[self::FIELD_REGULATOR] = [];\n }\n $errs[self::FIELD_REGULATOR][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_RESTORE_DATE])) {\n $v = $this->getRestoreDate();\n foreach($validationRules[self::FIELD_RESTORE_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_RESTORE_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_RESTORE_DATE])) {\n $errs[self::FIELD_RESTORE_DATE] = [];\n }\n $errs[self::FIELD_RESTORE_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS])) {\n $v = $this->getStatus();\n foreach($validationRules[self::FIELD_STATUS] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_STATUS, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS])) {\n $errs[self::FIELD_STATUS] = [];\n }\n $errs[self::FIELD_STATUS][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATUS_DATE])) {\n $v = $this->getStatusDate();\n foreach($validationRules[self::FIELD_STATUS_DATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_STATUS_DATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATUS_DATE])) {\n $errs[self::FIELD_STATUS_DATE] = [];\n }\n $errs[self::FIELD_STATUS_DATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_SUBJECT])) {\n $v = $this->getSubject();\n foreach($validationRules[self::FIELD_SUBJECT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_SUBJECT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_SUBJECT])) {\n $errs[self::FIELD_SUBJECT] = [];\n }\n $errs[self::FIELD_SUBJECT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_VALIDITY_PERIOD])) {\n $v = $this->getValidityPeriod();\n foreach($validationRules[self::FIELD_VALIDITY_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_MEDICINAL_PRODUCT_AUTHORIZATION, self::FIELD_VALIDITY_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_VALIDITY_PERIOD])) {\n $errs[self::FIELD_VALIDITY_PERIOD] = [];\n }\n $errs[self::FIELD_VALIDITY_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_CONTAINED])) {\n $v = $this->getContained();\n foreach($validationRules[self::FIELD_CONTAINED] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_CONTAINED, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CONTAINED])) {\n $errs[self::FIELD_CONTAINED] = [];\n }\n $errs[self::FIELD_CONTAINED][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_MODIFIER_EXTENSION])) {\n $v = $this->getModifierExtension();\n foreach($validationRules[self::FIELD_MODIFIER_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_MODIFIER_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_MODIFIER_EXTENSION])) {\n $errs[self::FIELD_MODIFIER_EXTENSION] = [];\n }\n $errs[self::FIELD_MODIFIER_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_DOMAIN_RESOURCE, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_IMPLICIT_RULES])) {\n $v = $this->getImplicitRules();\n foreach($validationRules[self::FIELD_IMPLICIT_RULES] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_IMPLICIT_RULES, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_IMPLICIT_RULES])) {\n $errs[self::FIELD_IMPLICIT_RULES] = [];\n }\n $errs[self::FIELD_IMPLICIT_RULES][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LANGUAGE])) {\n $v = $this->getLanguage();\n foreach($validationRules[self::FIELD_LANGUAGE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_LANGUAGE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LANGUAGE])) {\n $errs[self::FIELD_LANGUAGE] = [];\n }\n $errs[self::FIELD_LANGUAGE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_META])) {\n $v = $this->getMeta();\n foreach($validationRules[self::FIELD_META] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_RESOURCE, self::FIELD_META, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_META])) {\n $errs[self::FIELD_META] = [];\n }\n $errs[self::FIELD_META][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"public function _getValidationErrors()\n {\n $errs = parent::_getValidationErrors();\n $validationRules = $this->_getValidationRules();\n if (null !== ($v = $this->getCity())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_CITY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getCountry())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_COUNTRY] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getDistrict())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_DISTRICT] = $fieldErrs;\n }\n }\n if ([] !== ($vs = $this->getLine())) {\n foreach($vs as $i => $v) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[sprintf('%s.%d', self::FIELD_LINE, $i)] = $fieldErrs;\n }\n }\n }\n if (null !== ($v = $this->getPeriod())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_PERIOD] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getPostalCode())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_POSTAL_CODE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getState())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_STATE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getText())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TEXT] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getType())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_TYPE] = $fieldErrs;\n }\n }\n if (null !== ($v = $this->getUse())) {\n if ([] !== ($fieldErrs = $v->_getValidationErrors())) {\n $errs[self::FIELD_USE] = $fieldErrs;\n }\n }\n if (isset($validationRules[self::FIELD_CITY])) {\n $v = $this->getCity();\n foreach($validationRules[self::FIELD_CITY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_CITY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_CITY])) {\n $errs[self::FIELD_CITY] = [];\n }\n $errs[self::FIELD_CITY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_COUNTRY])) {\n $v = $this->getCountry();\n foreach($validationRules[self::FIELD_COUNTRY] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_COUNTRY, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_COUNTRY])) {\n $errs[self::FIELD_COUNTRY] = [];\n }\n $errs[self::FIELD_COUNTRY][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_DISTRICT])) {\n $v = $this->getDistrict();\n foreach($validationRules[self::FIELD_DISTRICT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_DISTRICT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_DISTRICT])) {\n $errs[self::FIELD_DISTRICT] = [];\n }\n $errs[self::FIELD_DISTRICT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_LINE])) {\n $v = $this->getLine();\n foreach($validationRules[self::FIELD_LINE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_LINE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_LINE])) {\n $errs[self::FIELD_LINE] = [];\n }\n $errs[self::FIELD_LINE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_PERIOD])) {\n $v = $this->getPeriod();\n foreach($validationRules[self::FIELD_PERIOD] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_PERIOD, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_PERIOD])) {\n $errs[self::FIELD_PERIOD] = [];\n }\n $errs[self::FIELD_PERIOD][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_POSTAL_CODE])) {\n $v = $this->getPostalCode();\n foreach($validationRules[self::FIELD_POSTAL_CODE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_POSTAL_CODE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_POSTAL_CODE])) {\n $errs[self::FIELD_POSTAL_CODE] = [];\n }\n $errs[self::FIELD_POSTAL_CODE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_STATE])) {\n $v = $this->getState();\n foreach($validationRules[self::FIELD_STATE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_STATE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_STATE])) {\n $errs[self::FIELD_STATE] = [];\n }\n $errs[self::FIELD_STATE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TEXT])) {\n $v = $this->getText();\n foreach($validationRules[self::FIELD_TEXT] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TEXT, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TEXT])) {\n $errs[self::FIELD_TEXT] = [];\n }\n $errs[self::FIELD_TEXT][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_TYPE])) {\n $v = $this->getType();\n foreach($validationRules[self::FIELD_TYPE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_TYPE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_TYPE])) {\n $errs[self::FIELD_TYPE] = [];\n }\n $errs[self::FIELD_TYPE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_USE])) {\n $v = $this->getUse();\n foreach($validationRules[self::FIELD_USE] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ADDRESS, self::FIELD_USE, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_USE])) {\n $errs[self::FIELD_USE] = [];\n }\n $errs[self::FIELD_USE][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_EXTENSION])) {\n $v = $this->getExtension();\n foreach($validationRules[self::FIELD_EXTENSION] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_EXTENSION, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_EXTENSION])) {\n $errs[self::FIELD_EXTENSION] = [];\n }\n $errs[self::FIELD_EXTENSION][$rule] = $err;\n }\n }\n }\n if (isset($validationRules[self::FIELD_ID])) {\n $v = $this->getId();\n foreach($validationRules[self::FIELD_ID] as $rule => $constraint) {\n $err = $this->_performValidation(PHPFHIRConstants::TYPE_NAME_ELEMENT, self::FIELD_ID, $rule, $constraint, $v);\n if (null !== $err) {\n if (!isset($errs[self::FIELD_ID])) {\n $errs[self::FIELD_ID] = [];\n }\n $errs[self::FIELD_ID][$rule] = $err;\n }\n }\n }\n return $errs;\n }",
"public function messages() : array\n {\n return [\n 'department_id.required' => 'The department field is required.',\n 'user_group_id.required' => 'The user group field is required.',\n 'password.required_if' => 'The password field is required.',\n ];\n }",
"public function messages()\n {\n return [\n 'style.required' => 'Please the style is required',\n 'service.required' => 'Please select service type',\n 'session.required' => 'Please select session'\n ];\n }",
"public function messages()\n {\n return [\n 'candidates_needed.required' => 'The candidates number field is required!',\n 'start_posting_date.required' => 'The start posting date field is required!',\n 'end_posting_date.required' => 'The end posting date field is required!',\n 'appl_deadline_date.required' => 'The application deadline field is required!',\n 'start_trial_date.required' => 'The start trial field is required!',\n 'end_trial_date.required' => 'The end trial field is required!',\n ];\n }",
"public function messages()\n {\n return [\n 'title.required' => 'A title is required',\n 'title.max' => 'Title is too long',\n 'image.required' => 'An image is required',\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'A name is required.',\n 'color.required' => 'Please select a color.'\n ];\n }",
"public function messages() {\n\t\treturn [\n\t\t\t'titulo.required' => 'El :attribute es obligatorio.',\n\t\t\t'descripcion.required' => 'La :attribute es obligatoria',\n\t\t\t'ciudad.required' => 'La :attribute es obligatoria',\n\t\t\t'telefono.required' => 'El :attribute es obligatorio.',\n\t\t\t'latitud.required' => 'La :attribute es obligatoria',\n\t\t\t'longitud.required' => 'La :attribute es obligatoria',\n\t\t\t'subcategoria.required' => 'La :attribute es obligatoria',\n\t\t\t'tags.required' => 'Los :attribute son obligatorios',\n\t\t];\n\t}",
"public function messages() {\n return [\n 'name.required' => 'Missing name.',\n 'description.required' => 'Missing description.',\n 'max_level.required' => 'Missing max level.',\n 'bonus_per_level.required' => 'Missing bonus per level.',\n 'effect_type.required' => 'Missing effect type.',\n 'hours_per_level.required' => 'Missing length of time per level.'\n ];\n }",
"public function messages()\n {\n return [\n 'contractor_account_id.exists' => 'Invalid data.',\n 'truck_id.exists' => 'Invalid data.',\n 'source_id.exists' => 'Invalid data.',\n 'destination_id.exists' => 'Invalid data.',\n 'driver_id.exists' => 'Invalid data.',\n 'material_id.exists' => 'Invalid data.',\n ];\n }",
"public function getErrors()\n {\n return $this->_arrValidationErrors;\n }",
"public function messages()\n {\n return [\n 'origin.required' => 'INVALID_PARAMETERS',\n 'destination.required' => 'INVALID_PARAMETERS',\n ];\n }",
"public function messages()\n {\n return [\n 'name.required' => 'Name is required!',\n 'category.required' => 'category is required!',\n 'price.required' => 'price is required!',\n 'price.regex' => 'invalid price!',\n 'weight.required' => 'weight is required!',\n 'stock.required' => 'stock is required!',\n 'stock.integer' => 'invalid stock!',\n 'files.mimes' => 'invalid File(s)!',\n 'files.max' => 'File size must be 2MB or lesser !',\n ];\n }",
"public function messages()\n {\n return [\n 'first_name.required' => 'First name cannot be blank.',\n 'first_name.string' => 'First name must be formatted as a string.',\n 'first_name.max' => 'First name exceeded the max number of characters.',\n 'last_name.required' => 'Last name cannot be blank.',\n 'last_name.string' => 'Last name must be formatted as a string.',\n 'last_name.max' => 'Last name exceeded the max number of characters.',\n 'email.required' => 'Email cannot be blank.',\n 'email.string' => 'Email name must be formatted as a string.',\n 'email.email' => 'Email must be formatted as a valid email address',\n 'email.max' => 'Email exceeded the max number of characters.',\n ];\n }",
"public function messages()\n {\n return [\n 'name' => 'required',\n 'address' => 'required',\n 'city' => 'required',\n 'latitude' => 'required',\n 'longitude' => 'required',\n 'type' => 'required',\n 'is_public' => 'required',\n 'school_zone' => 'required',\n ];\n }",
"public function getErrors()\n {\n return $this->validator->errors();\n }",
"public function getValidationErrors()\n\t{\n\t\tif(is_array($this->validation_errors) && \n\t\t\tsizeof($this->validation_errors))\n\t\t{\n\t\t\treturn array_unique($this->validation_errors);\n\t\t}\n\t\treturn array();\n\t}",
"public function messages()\n {\n return [\n 'name.required' => 'Full Name is required',\n 'name.min' => 'Name must be of minimum 3 characters',\n 'name.max' => 'Name can be of maximum 190 characters',\n 'support_pin.required' => 'Support PIN is required',\n 'support_pin.numeric' => 'Support PIN can only be numeric',\n 'support_pin.digits' => 'Only 4 digit Support PIN is accepted',\n 'rng_level.required' => 'Random Generator Difficutly is required',\n 'rng_level.numeric' => 'Invalid Random Generator Setting',\n 'rng_level.digits' => 'Invalid Random Generator Setting',\n 'dob.required' => 'Date of Birth is required',\n 'mobile.required' => 'Mobile Number is required',\n 'mobile.numeric' => 'Mobile Number can only be numeric',\n 'country' => 'Country is required',\n ];\n }",
"public function getErrors()\n\t{\n\t\t$errors = array();\n\t\t/** @var Miao_Form_Control $control */\n\t\t/** @var Miao_Form_Validate $validator */\n\t\tforeach ( $this->getControls() as $control )\n\t\t{\n\t\t\tif ( !$control->isValid() )\n\t\t\t{\n\t\t\t\t$validator = $control->error();\n\t\t\t\t$errors[] = array(\n\t\t\t\t\t'name' => $control->getName(),\n\t\t\t\t\t'error' => $validator->getMessage() );\n\t\t\t}\n\t\t}\n\t\treturn $errors;\n\t}",
"public function messages()\n {\n return [\n 'title.required' => Lang::get('controller.title_required'),\n 'title.string' => Lang::get('controller.title_required'),\n 'description.required' => Lang::get('controller.description_required'),\n 'topic_id.required' => Lang::get('controller.topic_id_required'),\n 'grade_id.required' => Lang::get('controller.grade_id_required'),\n 'skill_category_id.required' => Lang::get('controller.skill_category_id_required'),\n 'language_id.required' => Lang::get('controller.language_id_required'),\n 'publish_status.required' => Lang::get('controller.publish_status_required'),\n 'minimum_age.required' => Lang::get('controller.minimum_age_required'),\n 'maximum_age.required' => Lang::get('controller.maximum_age_required'),\n ];\n }",
"public function messages()\n {\n return [\n 'created_by_id.required' => 'Employer Id is required',\n 'created_by_id.numeric' => 'Employer Id must be an integer type',\n 'team_name.required' => 'Team Name is required',\n 'team_name.string' => 'Team Name must be a string type',\n 'company_id.required' => 'Company Id is required',\n 'company_id.numeric' => 'Company Id must be an integer',\n ];\n }",
"public function messages()\n {\n return array_merge(trans('news::validation'), trans('news::validation.custom'));\n }",
"protected function messages()\n {\n return [\n 'id.required' => HttpAttributeInvalidCode::ID_REQUIRED,\n 'password.required' => HttpAttributeInvalidCode::PASSWORD_REQUIRED,\n 'password.same' => HttpAttributeInvalidCode::CONFIRM_PASSWORD_NOT_SAME,\n 'display_name.required' => HttpAttributeInvalidCode::DISPLAY_NAME_REQUIRED,\n 'role_id.required' => HttpAttributeInvalidCode::ROLE_REQUIRED,\n 'status.required' => HttpAttributeInvalidCode::STATUS_REQUIRE\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 messages()\n {\n $illegalFields = [ 'email', 'type', 'status', 'branches', ];\n $messages = [];\n\n foreach ($illegalFields as $key => $attribute) {\n $messages[\"{$attribute}.not_present\"] = __('The field :attribute must not be present.');\n }\n\n return $messages;\n }",
"public function messages()\n {\n return [\n 'truck_id.required' => 'The truck field is required.',\n 'truck_id.exists' => 'Invalid data.',\n 'account_id.required' => 'The supplier field is required.',\n 'account_id.exists' => 'Invalid data.'\n ];\n }",
"public function getValidationErrors() {\n\t\tif ($this->_errors === null) {\n\t\t\treturn array();\n\t\t}\n\n\t\treturn $this->_errors->toArray();\n\t}",
"public function getErrors(): array {\n return $this->validationError;\n }",
"function getErrors()\n {\n $errMsg = '';\n foreach ($this->errors as $error) {\n $errMsg .= $error;\n $errMsg .= '<br/>';\n }\n return $errMsg;\n }",
"public function messages()\n {\n return $messages = [\n 'source_funds.required' => trans('common.error_messages.req_this_field'),\n 'jurisdiction_funds.required' => trans('common.error_messages.req_this_field'),\n 'annual_income.required' => trans('common.error_messages.req_this_field'),\n 'other_source.required' => trans('common.error_messages.req_this_field'),\n 'estimated_wealth.required' => trans('common.error_messages.req_this_field'),\n 'wealth_source.required' => trans('common.error_messages.req_this_field'),\n 'other_wealth_source.required' => trans('common.error_messages.req_this_field'),\n 'tin_code.required' => trans('common.error_messages.req_this_field'),\n 'is_abandoned.required' => trans('common.error_messages.req_this_field'),\n 'date_of_abandonment.required' => trans('common.error_messages.req_this_field'),\n 'abandonment_reason.required' => trans('common.error_messages.req_this_field'),\n 'justification.required' => trans('common.error_messages.req_this_field'),\n 'tin_country_name.required' => trans('common.error_messages.req_this_field'),\n 'tin_number.required' => trans('common.error_messages.req_this_field'),\n ];\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 messages()\n {\n /*\n return [\n 'bio.required' => 'Bio is required',\n 'state.required' => 'State is required',\n 'city.required' => 'City name is required',\n 'postalcode.required' => 'Postal Code is required',\n 'gender.required' => 'Gender is required',\n 'seeking_gender.requred' => 'Gender you are searching for is required',\n ];\n */\n }",
"private function getValidationRules(): array\n {\n return [\n 'year_month' => new Assert\\DateTime(\n [\n 'format' => 'Y-m',\n 'message' => 'Unexpected $yearMonth value. `Y-m` format is expected.',\n ]\n ),\n 'months_count' => new Assert\\Range(\n [\n 'min' => 1,\n 'max' => 12,\n 'minMessage' => 'Months count must be at least {{ limit }}',\n 'maxMessage' => 'Months count must not be greater than {{ limit }}',\n ]\n ),\n ];\n }",
"public function getErrorMessages(){\n return $this->arr_msg; \n }"
] | [
"0.82462656",
"0.8072122",
"0.79855305",
"0.7869173",
"0.7831077",
"0.7776483",
"0.7776483",
"0.7589036",
"0.75582355",
"0.75402904",
"0.75402904",
"0.7525044",
"0.75227535",
"0.7516879",
"0.7475822",
"0.7457696",
"0.7425241",
"0.74180096",
"0.7405273",
"0.7405273",
"0.7400484",
"0.7395581",
"0.7392798",
"0.7389888",
"0.7360024",
"0.73180616",
"0.73162127",
"0.7305573",
"0.7279752",
"0.7274237",
"0.7268171",
"0.7261277",
"0.7242113",
"0.72149134",
"0.7214028",
"0.7211038",
"0.72069424",
"0.7205835",
"0.71890676",
"0.7186795",
"0.7184488",
"0.71786416",
"0.7169952",
"0.7161326",
"0.715333",
"0.7151148",
"0.7149324",
"0.7133506",
"0.712178",
"0.7110109",
"0.71095705",
"0.7093795",
"0.7087011",
"0.70712256",
"0.7070143",
"0.70600915",
"0.7059444",
"0.7056968",
"0.704947",
"0.70437986",
"0.70437384",
"0.7041736",
"0.7038512",
"0.7036984",
"0.7032627",
"0.70229805",
"0.70208246",
"0.702044",
"0.7007877",
"0.7000938",
"0.69963926",
"0.69936424",
"0.69912916",
"0.6985551",
"0.6982829",
"0.6981308",
"0.6980877",
"0.6979931",
"0.69782096",
"0.6977083",
"0.69753224",
"0.69692177",
"0.6966572",
"0.6958873",
"0.6957573",
"0.6957456",
"0.6944549",
"0.69384116",
"0.6934856",
"0.69259256",
"0.6918059",
"0.6914203",
"0.6909962",
"0.69095904",
"0.6906319",
"0.6900933",
"0.6900174",
"0.6893932",
"0.6892958",
"0.68911815",
"0.6887292"
] | 0.0 | -1 |
Auto generated seed file | public function run()
{
\DB::table('users')->delete();
\DB::table('users')->insert(array (
0 =>
array (
'id' => 1,
'name' => 'Optimus Prime',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$qB0ErLQFtkN3piJj9tLnleVUO8OWHlll3LH1keXL8uMeLlMz1jEW2',
'is_admin' => 1,
'remember_token' => NULL,
'created_at' => '2019-04-14 05:54:52',
'updated_at' => '2019-04-14 05:54:52',
),
1 =>
array (
'id' => 2,
'name' => 'John Doe',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$cV5iTvYM6b7/mmKMfJ6KMOnGd82yA180yj36dDRzO7OdF64CaRIp2',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-05 00:39:46',
'updated_at' => '2019-05-05 00:39:46',
),
2 =>
array (
'id' => 3,
'name' => 'Peter Parker',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$gZ1Tx7vPd3QX0wiHoQTEFuQUE.6smEMRj4fuKWO2k.Hc58QaAw9KK',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 14:36:20',
'updated_at' => '2019-05-06 14:36:20',
),
3 =>
array (
'id' => 4,
'name' => 'Night Crawler',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$4iM1eyhoxIoghl1Dotog7eNUqIhthDQETcfsMECDLNs37Aapvlkou',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 17:13:09',
'updated_at' => '2019-05-06 17:13:09',
),
4 =>
array (
'id' => 5,
'name' => 'Tony Stark',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$qdK49QEoz9OdAWh5qxff9.RVnlZXUZxwsMTKYOwGry4A9.hsDYQym',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:13:28',
'updated_at' => '2019-05-06 18:13:28',
),
5 =>
array (
'id' => 6,
'name' => 'Robert Bruce Banner',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$smuxOxzqLqSmKU2wfWVY6u6fqi1fxfg2NNTyLz.0J9uQFsuA.NJKy',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:14:12',
'updated_at' => '2019-05-06 18:14:12',
),
6 =>
array (
'id' => 7,
'name' => 'Steve Rogers',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$lu8U94I.Ve4z8E37sZtgXOzGOFyd7mVOS81y23m8fb31CkYZKCmnC',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:14:38',
'updated_at' => '2019-05-06 18:14:38',
),
7 =>
array (
'id' => 8,
'name' => 'Jennifer Walters',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$suk6.2J.NnMnMynlN2wYJOVyTA3RDUy9eTeg92nNPh5Gdqz6W9dNq',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:15:52',
'updated_at' => '2019-05-06 18:15:52',
),
8 =>
array (
'id' => 9,
'name' => 'Stephen Strange',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$L31qF5vGCG3pmOgUbkx4zuYHzikm5y/CJRMf3naKFYh40nZatRKoK',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:18:15',
'updated_at' => '2019-05-06 18:18:15',
),
9 =>
array (
'id' => 10,
'name' => 'Pietro Maximoff',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$TornMdQDtdjUn7kHVm7DIuWNw47vxHtILDzAqZMAqg0fh7pqw397i',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:19:00',
'updated_at' => '2019-05-06 18:19:00',
),
10 =>
array (
'id' => 11,
'name' => 'Clint Barton',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$crY2iJhonEAcUAMDJ.MjBelsQNXcD0iZQbpXuf74RvSmxY5OUQUg6',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:24:05',
'updated_at' => '2019-05-06 18:24:05',
),
11 =>
array (
'id' => 12,
'name' => 'T Challa',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$0TVNccwB1CMtfv05Tmj6geP/DOA97jnp8zmd7lFQIDXoUuvOeGCmC',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:24:26',
'updated_at' => '2019-05-06 18:24:26',
),
12 =>
array (
'id' => 13,
'name' => 'Frank Castle',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$aI5vPv8UF1C0dAtivafpm.DIkUn2zgFVq7nk0fRjiRke2aBJkbP.u',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:24:57',
'updated_at' => '2019-05-06 18:24:57',
),
13 =>
array (
'id' => 14,
'name' => 'Bruce Wayne',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$cKk6ZeIrsOjuSrozQBXeru7Jn/GJgY/klHBb.JdnSr./D5EAYH13i',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:25:10',
'updated_at' => '2019-05-06 18:25:10',
),
14 =>
array (
'id' => 15,
'name' => 'Jessica Jones',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$hcGEUSRCeRbw4OiHr3FSOu68lNVYPRNwccLgLiSjNFD.1lJb0Vs4.',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:25:35',
'updated_at' => '2019-05-06 18:25:35',
),
15 =>
array (
'id' => 16,
'name' => 'Luke Cage',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$Ib8NpukXgkAsv4m7qGq8BOHpGfvUd3Ds6yBfXnuUWgGqiPX73qsVK',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:25:49',
'updated_at' => '2019-05-06 18:25:49',
),
16 =>
array (
'id' => 17,
'name' => 'Nicolas Travis',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$DIrJRR2MQhDbh0tfQfnPPOxgDiOmZA//DdMspGsizF7qPdQi33Com',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:28:12',
'updated_at' => '2019-05-06 18:28:12',
),
17 =>
array (
'id' => 18,
'name' => 'Scott Summers',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$M2mJT0SlsX8Km4JkU8e/jOiih.NTAYY9.Yc7GErJN5WXMC7.kr842',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:29:22',
'updated_at' => '2019-05-06 18:29:22',
),
18 =>
array (
'id' => 19,
'name' => 'James Logan Howlett',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$UAQR4sw1HHVv1dWmyeu.fuBMIdcjWBCun.K.yhEknY1BS/v03mL5i',
'is_admin' => 2,
'remember_token' => NULL,
'created_at' => '2019-05-06 18:39:51',
'updated_at' => '2019-05-06 18:39:51',
),
19 =>
array (
'id' => 20,
'name' => 'Batman',
'email' => '[email protected]',
'email_verified_at' => NULL,
'password' => '$2y$10$zCv97sZU7udufYOx/7YFZOgz60sNmBfs7ZRBPcdaI5dFgBbxi0sSi',
'is_admin' => 1,
'remember_token' => NULL,
'created_at' => '2019-05-06 19:38:45',
'updated_at' => '2019-05-06 19:38:45',
),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function main() {\n\n $fs = new Filesystem();\n\n $fs->touch($this->getTargetFile());\n\n $seedProperties = Yaml::parse(file_get_contents($this->getSeedFile()));\n $generatedProperties = [];\n\n $generatedProperties['label'] = $seedProperties['project_label'];\n $generatedProperties['machineName'] = $seedProperties['project_name'];\n $generatedProperties['group'] = $seedProperties['project_group'];\n $generatedProperties['basePath'] = '${current.basePath}';\n $generatedProperties['type'] = $seedProperties['project_type'];\n $generatedProperties['repository']['main'] = $seedProperties['project_git_repository'];\n $generatedProperties['php'] = $seedProperties['project_php_version'];\n\n // Add platform information.\n if (isset($generatedProperties['platform'])) {\n $generatedProperties['platform'] = $seedProperties['platform'];\n }\n\n $fs->dumpFile($this->getTargetFile(), Yaml::dump($generatedProperties, 5, 2));\n }",
"public function seed();",
"protected function seed()\n {\n }",
"public function seed() {\n }",
"public function run()\n {\n $faker= \\Faker\\Factory::create();\n for ($i=0; $i < 20; $i++)\n {\n \tHuongDanVien::create([\n \t\t'tenhdv'=> $faker->name,\n \t\t'phai'=> $faker->word,\n \t\t'diachi'=> $faker->word,\n \t\t'sdt'=> $faker->number_format(0122000000),\n \t\t]);\n }\n }",
"public function actionGenerate()\n {\n \\bariew\\yii2Tools\\tests\\FixtureManager::init();\n }",
"public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }",
"public function run()\n {\n \t$faker = Faker\\Factory::create();; \n foreach (range(1, 55) as $key => $value) {\n \tApp\\Student::create([\n \t\t 'name' => $faker->name,\n 'father_name' => $faker->name('male'),\n 'mother_name' => $faker->name('female'),\n 'phone_number' => $faker->phoneNumber,\n 'home_number' => $faker->phoneNumber,\n 'email' => $faker->unique()->safeEmail,\n 'gender' => 'male',\n 'roll_number' => $faker->randomNumber(),\n 'reg_number' => $faker->randomNumber(),\n 'department_id' => $faker->randomNumber(1),\n 'shift' => 'second',\n 'semester' => 'eight',\n 'present_address' => $faker->address,\n 'permanent_address' => $faker->address,\n \t]);\n }\n }",
"protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create('ms_MY');\n ini_set('memory_limit', '50G');\n \\Eloquent::reguard();\n $this->command->info('User Seed');\n\n for ($i = 0; $i < 5; $i++) {\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'participant',\n 'isLead' => 0,\n 'totalPoints' => rand(1,100),\n ]);\n \n }\n\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'participant',\n 'isLead' => 1,\n 'totalPoints' => rand(1,100),\n ]);\n\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'program manager',\n 'isLead' => 0,\n 'totalPoints' => 0,\n ]);\n \n }",
"public function getSeed();",
"public function run()\n {\n //Cmd: php artisan db:seed --class=\"UsersTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\User::create([\n\t\t\t\t\"name\" => $faker->name(),\n\t\t\t\t\"name_mei\" => $faker->name(),\n\t\t\t\t\"kana_sei\" => $faker->word(),\n\t\t\t\t\"kana_mei\" => $faker->word(),\n\t\t\t\t\"email\" => $faker->safeEmail(),\n\t\t\t\t\"password\" => $faker->password(),\n\t\t\t\t\"phone\" => $faker->word(),\n\t\t\t\t\"address\" => $faker->address(),\n\t\t\t\t\"birthday\" => $faker->date().\" \".$faker->time(),\n\t\t\t\t\"language\" => $faker->languageCode(),\n\t\t\t\t\"licence\" => $faker->word(),\n\t\t\t\t\"school\" => $faker->word(),\n\t\t\t\t\"school_dept\" => $faker->word(),\n\t\t\t\t\"school_subject\" => $faker->word(),\n\t\t\t\t\"gender\" => $faker->word(),\n\t\t\t\t\"salary\" => $faker->randomDigit(),\n\t\t\t\t\"image_url\" => $faker->uuid(),\n\t\t\t\t\"back_image_url\" => $faker->uuid(),\n\t\t\t\t\"remember_token\" => $faker->sha1(),\n\t\t\t\t\"user_role_id\" => $faker->randomDigit(),\n\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n\n ]);\n }\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }",
"public function run()\n {\n $faker = Faker\\Factory::create();\n $title = $faker->sentence(rand(3,6));\n Article::create([\n 'title'=>$title,\n 'slug'=>Str::slug($title,'-'),\n 'description'=>$faker->text(rand(100,300)),\n 'content'=>$faker->realText(rand(1000,2000))\n ]);\n }",
"public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $limit = 100;\n\n for ($i = 0; $i < $limit; $i++){\n \t\\App\\Models\\Member::create([\n 'code' => $faker->name,\n 'name' => $faker->name,\n 'sns_link' => $faker->name,\n 'is_block' => $faker->numberBetween(0, 1),\n 'phone' => $faker->name,\n 'amount' => $faker->numberBetween(1000, 9000),\n //{{SEEDER_NOT_DELETE_THIS_LINE}}\n\t\t\t]);\n\t\t}\n }",
"public function run()\n {\n $faker = Faker\\Factory::create();\n $kelamin = \"laki-laki\";\n foreach (range(1, 100) as $i) {\n \tKajian::create([\n \t\t'waktu'\t\t\t\t=> $faker->dateTimeThisCentury($max = 'now', $timezone = date_default_timezone_get()), \n\n \t\t'tema'\t\t\t\t=> $faker->sentence($nbWords = 6, $variableNbWords = true), \n \t\t'pemateri'\t\t\t=> $faker->name($gender = null|'male'|'female'), \n \t\t'alamat'\t\t\t=> $faker->streetAddress, \n \t\t'deskripsi'\t\t\t=> $faker->paragraph($nbSentences = 3, $variableNbSentences = true), \n \t\t'jenis_peserta'\t\t=> $kelamin, \n \t\t'latitude'\t\t\t=> $faker->latitude, \n \t\t'longitude'\t\t\t=> $faker->longitude,\n 'isRutin' => $faker->boolean\n \t]);\n }\n }",
"public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n /* Curso::factory(8)->create(); */\n /* $this->call(CidepartamentoSeeder::class);\n $this->call(CategoriaSeeder::class);\n $this->call(GeneroSeeder::class); */\n\n /* $this->call(UserSeeder::class); */\n\n\n /* Estudiante::factory(20)->create(); */\n\n /* Profesore::factory(12)->create(); */\n\n\n /* $this->call(EstudianteSeeder::class); */\n /* $this->call(CursoSeeder::class); */\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n for ($i = 100; $i < 120; $i++) {\n university::insert([\n 'name' => $faker->name(),\n 'code' => $i,\n 'contact' => '1234567' . $i,\n 'address' => 'Bhavnagar',\n 'user_id' => 2\n ]);\n\n }\n }",
"public function run(): void\n {\n $faker = Factory::create();\n \\App\\User::query()->insert($this->gen($faker));\n }",
"public function run()\n {\n $faker = Faker::create();\n\n Umrah::Create([\n 'user_id' => User::all()->random()->id,\n 'deceased_id' => Deceased::all()->random()->id,\n 'umrah_status_id' => UmrahStatus::all()->random()->id,\n ]);\n }",
"function migrate_seed(){\n\n // Pull in Seed Service Provider\n // Loop in the contents of the file specified in the Service provider\n // Run Insert query.\n\n $seedFiles = require BASEPATH.\"/migration/SeedServiceProvider.php\";\n\n //Loop the files\n foreach ( $seedFiles as $file ){\n\n $seeds = require BASEPATH . \"/migration/seed/{$file}.php\";\n\n //Loop In table for insertion\n foreach( $seeds as $table_name => $data ){\n\n insert( $table_name, $data );\n\n }\n\n }\n\n}",
"public function run()\n {\n // App\\UserRentCompactDisc::delete();\n (new Faker\\Generator)->seed(100);\n factory(App\\UserRentCompactDisc::class, 30)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n //echo $faker->word();die();\n //var_dump($faker);die();\n\n for($i=0; $i<100; $i++) \n {\n Maker::create\n ([\n 'name' => $faker->unique()->company(),\n 'phone' => $faker->phoneNumber()\n ]);\n }\n }",
"public function run()\n {\n\n $faker =Faker\\Factory::create();\n foreach (range(1,10) as $index) {\n Member::create([\n 'memberNo' => $faker->text(5),\n 'name' => $faker->text($min=5,$max=10),\n 'email' => $faker->email(),\n 'lastConnect' => $faker->dateTime()\n ]);\n }\n }",
"public function run()\n\t{\n\n $faker=Faker::create();\n\n for($i = 0; $i < 20; $i++)\n {\n \n \n \n $id= \\DB::table('users')->insertGetId(array(\n 'name' => $faker->firstName,\n 'email' => $faker->unique()->email,\n 'password' => \\Hash::make('bebe'),\n 'type' => $faker->randomElement(['member','admin']),\n \n\n\t\t\t));\n\n\n\n }\n\t\n\t}",
"public function run()\n {\n //\\App\\Models\\User::factory(400)->create();\n //\\App\\Models\\Ship::factory(10000)->create();\n //\\App\\Models\\City::factory(1000)->create();\n //\\App\\Models\\Offer::factory(2000)->create();\n\n /* $this->call([\n CountrySeeder::class,\n ]);*/\n\n }",
"public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }",
"public function run()\n {\n $faker = Faker::create();\n DB::table('userroles')->insert([\n 'role_name' => 'Subper Admin',\n 'role_status' => 1,\n 'read' => $faker->paragraph(2),\n 'write' => $faker->paragraph(2),\n 'country_nationality' => $faker->paragraph(2)\n ]);\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class,15)->create();\n\n\n $regcouncils = fopen('C:\\practocsv\\regcouncil.csv', 'r');\n $degrees = fopen('C:\\practocsv\\degree.csv', 'r');\n $cities = fopen('C:\\practocsv\\city.csv', 'r');\n $specializations = fopen('C:\\practocsv\\specialization.csv', 'r');\n $colleges = fopen('C:\\practocsv\\college.csv', 'r');\n\n $categories = fopen('C:\\practocsv\\category.csv', 'r');\n $subcategories = fopen('C:\\practocsv\\subcategory.csv', 'r');\n $manufacturers = fopen('C:\\practocsv\\manufacture.csv', 'r');\n $ingredients = fopen('C:\\practocsv\\ingredients.csv', 'r');\n $products = fopen('C:\\practocsv\\product.csv', 'r');\n\n $faker = \\Faker\\Factory::create();\n\n $regcouncil_id = 0;\n $city_id = 0;\n $degree_id = 0;\n $specialization_id = 0;\n $college_id = 0;\n\n Type::create([\n 'name'=>'video'\n ]);\n Type::create([\n 'name'=>'chat'\n ]);\n $type = Type::create([\n 'name'=>'clinic'\n ]);\n\n while(($reg = fgetcsv($regcouncils)) !== FALSE){\n $regcouncil = Regcouncil::create([\n 'name'=>$reg[0]\n ]);\n $regcouncil_id = $regcouncil->id;\n }\n\n while(($deg = fgetcsv($degrees)) !== FALSE){\n $degree = Degree::create([\n 'name'=>$deg[0]\n ]);\n $degree_id = $degree->id;\n }\n\n while(($cit = fgetcsv($cities)) !== FALSE){\n $city = City::create([\n 'name'=>$cit[0]\n ]);\n $city_id = $city->id;\n }\n\n while(($reg = fgetcsv($specializations)) !== FALSE){\n $speciality = Speciality::create([\n 'name'=>$reg[0]\n ]);\n $specialization_id = $speciality->id;\n }\n\n while(($clg = fgetcsv($colleges)) !== FALSE){\n $college = College::create([\n 'name'=>$clg[0]\n ]);\n $college_id = $college->id;\n }\n\n for($i=0 ; $i<50 ; $i++){\n $doctor = Doctor::create([\n 'fullname' => $faker->name,\n 'description' => $faker->sentence(rand(5,6)),\n 'fees' => rand(1000,10000),\n 'phone_no' => rand(1000000000,9999999999),\n 'password' => '$2y$10$ckpf//racepEDB9TGR2ZLu3JkVrPKUlaXorZIiWF4eZf87O83lPX2',\n 'email'=> $faker->unique()->safeEmail,\n 'city_id' => rand(1,$city_id),\n 'address' => $faker->sentence(rand(5,6)),\n 'gender' => 'male',\n 'country_code' => '+91',\n 'years_of_exp' => rand(5,20),\n 'slot_duration' => 15,\n 'speciality_id' => rand(1,$specialization_id),\n 'reg_no' => rand(1,200000),\n 'regcouncil_id' => rand(1,$regcouncil_id),\n 'degree_id' => rand(1,$degree_id),\n 'college_id' => rand(1,$college_id),\n 'establishment_name' => $faker->word,\n 'establishment_address' => $faker->sentence(rand(5,6)),\n 'establishment_city_id' => rand(1,$city_id),\n 'establishment_pincode' => rand(1000,999999),\n ]);\n\n $user = User::create([\n 'name' => $doctor->fullname,\n 'email' => $doctor->email,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$ckpf//racepEDB9TGR2ZLu3JkVrPKUlaXorZIiWF4eZf87O83lPX2' , // password\n 'gender'=> $doctor->gender,\n 'role'=>'doctor',\n 'age'=>rand(20,50),\n 'phone_no'=> $doctor->phone_no,\n 'remember_token' => Str::random(10),\n 'doctor_id'=>$doctor->id\n ]);\n $doctor->type()->attach(rand(1,$type->id));\n }\n\n while(($cat = fgetcsv($categories)) !== FALSE){\n $category = Category::create([\n 'name'=>$cat[0]\n ]);\n $category_id = $category->id;\n }\n\n while(($subcat = fgetcsv($subcategories)) !== FALSE){\n $subcategory = Subcategory::create([\n 'name'=>$subcat[0],\n 'category_id'=>rand(1,$category_id),\n ]);\n $subcategory_id = $subcategory->id;\n }\n\n // $i=1;\n // while($i<15){\n // $i++;\n // $manufacturer = Manufacturer::create([\n // 'name'=>$faker->name,\n // 'user_id'=>$i\n // ]);\n // $manufacture_id = $manufacturer->id;\n // }\n\n\n $manufacturer = Manufacturer::create([\n 'name'=>\"John Doe\",\n 'user_id'=>1,\n \n ]);\n\n $manufacture_id = 1;\n\n\n // while(($ing = fgetcsv($ingredients)) !== FALSE){\n // $ingredient = Ingredient::create([\n // 'name'=>$ing[0]\n // ]);\n // $ingredient_id = $ingredient->id;\n // }\n\n while(($pro = fgetcsv($products)) !== FALSE){\n $product = Product::create([\n 'name'=>$pro[0],\n 'price'=>rand(100,1000),\n 'size'=>\"200 ml\",\n 'quantity'=>rand(20,50),\n 'category_id'=>rand(1,$category_id),\n 'subcategory_id'=>rand(1,$subcategory_id),\n 'description'=>$faker->sentence(rand(3,4)),\n 'how_to_use'=>$faker->sentence(rand(2,3)),\n 'benefits'=>$faker->sentence(rand(2,3)),\n 'highlights'=>$faker->sentence(rand(1,2)),\n 'manufacturer_id'=>rand(1,$manufacture_id),\n 'prescription_required'=>rand(0,1),\n ]);\n $product_id = $product->id;\n }\n\n $products = fopen('C:\\practocsv\\product.csv', 'r');\n while(($pro = fgetcsv($products)) !== FALSE){\n $product = Product::create([\n 'name'=>$pro[0],\n 'price'=>rand(100,1000),\n 'size'=>\"200 ml\",\n 'quantity'=>rand(20,50),\n 'category_id'=>rand(1,$category_id),\n 'subcategory_id'=>rand(1,$subcategory_id),\n 'description'=>$faker->sentence(rand(3,4)),\n 'how_to_use'=>$faker->sentence(rand(2,3)),\n 'benefits'=>$faker->sentence(rand(2,3)),\n 'highlights'=>$faker->sentence(rand(1,2)),\n 'manufacturer_id'=>rand(1,$manufacture_id),\n 'prescription_required'=>rand(0,1),\n ]);\n $product_id = $product->id;\n }\n\n Notification_type::create([\n 'name' => 'appointment-made',\n 'message' => 'You have Received a new appointment!'\n ]);\n\n Notification_type::create([\n 'name' => 'appointment-accepted',\n 'message' => 'Your appointment is confirmed!'\n ]);\n\n Notification_type::create([\n 'name' => 'appointment-rejected',\n 'message' => 'Sorry, your appointment is rejected'\n ]);\n\n Notification_type::create([\n 'name' => 'feedback',\n 'message' => 'you have received a new feedback'\n ]);\n\n Notification_type::create([\n 'name' => 'report',\n 'message' => 'Your report has been generated'\n ]);\n\n Notification_type::create([\n 'name' => 'manufacturer-request',\n 'message' => 'you have a new manufacturer registration'\n ]);\n\n Notification_type::create([\n 'name' => 'product-request',\n 'message' => 'you have a new product request'\n ]);\n\n Notification_type::create([\n 'name' => 'product-accept',\n 'message' => 'Your product is now approved'\n ]);\n\n Notification_type::create([\n 'name' => 'prescription',\n 'message' => 'You have received a prescription'\n ]);\n\n\n fclose($specializations);\n fclose($cities);\n fclose($degrees);\n fclose($regcouncils);\n fclose($colleges);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(Tipo_DocumentoSeeder::class);\n\n $this->call(RolSeeder::class);\n\n $this->call(GeneroSeeder::class);\n\n $this->call(MaterialSeeder::class);\n\n $this->call(CategoriaSeeder::class);\n\n $this->call(ClasificacionSeeder::class);\n\n $this->call(UsuarioSeeder::class);\n\n $this->call(TallaSeeder::class);\n\n $this->call(ProductoSeeder::class);\n\n $this->call(ContactoSeeder::class);\n\n\n }",
"public function run()\n {\n $faker = Faker\\Factory::create();\n $data = [];\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'email' => $faker->email,\n 'password' => password_hash($faker->password, PASSWORD_DEFAULT),\n 'name' => $faker->name,\n 'is_verified' => $faker->boolean(),\n\n 'phone' => $faker->optional(0.9)->phoneNumber,\n 'photo_url' => $faker->imageUrl(),\n 'hobbies' => $faker->words(3, true),\n 'passion' => $faker->optional()->words(1, true),\n 'fav_quote' => $faker->optional()->sentence(6, true),\n 'fav_quote_author' => $faker->optional()->name,\n\n 'whatsapp' => $faker->optional(0.9)->phoneNumber,\n 'facebook' => $faker->optional(0.7)->userName,\n 'twitter' => $faker->optional(0.5)->userName,\n 'linkedin' => $faker->optional(0.3)->url,\n 'instagram' => $faker->optional(0.6)->userName,\n 'snapchat' => $faker->optional(0.5)->userName,\n 'website' => $faker->optional(0.4)->url,\n 'blog' => $faker->optional(0.4)->url,\n\n 'created_at' => $faker->dateTimeBetween(\"-2 years\", \"-1 year\")->format('Y-m-d H:i:s'),\n 'updated_at' => rand(0, 2) ? $faker->dateTimeThisYear->format('Y-m-d H:i:s') : null,\n ];\n }\n\n $this->insert('classmates', $data);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(UserSeeder::class);\n $this->call(RolePermissionSeeder::class);\n $this->call(AppmodeSeeder::class);\n\n // \\App\\Models\\Appmode::factory(3)->create();\n \\App\\Models\\Doctor::factory(100)->create();\n \\App\\Models\\Unit::factory(50)->create();\n \\App\\Models\\Broker::factory(100)->create();\n \\App\\Models\\Patient::factory(100)->create();\n \\App\\Models\\Expence::factory(100)->create();\n \\App\\Models\\Testcategory::factory(100)->create();\n \\App\\Models\\Test::factory(50)->create();\n \\App\\Models\\Parameter::factory(50)->create();\n \\App\\Models\\Sale::factory(50)->create();\n \\App\\Models\\SaleItem::factory(100)->create();\n \\App\\Models\\Goption::factory(1)->create();\n \\App\\Models\\Pararesult::factory(50)->create();\n\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create('zh_TW');\n\n foreach (range(1, 100) as $index) {\n $updatedAt = now()->subDays(rand(0, 500));\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make($faker->password),\n 'phone' => $faker->phoneNumber,\n 'description' => $faker->realText(rand(10, 100)),\n 'sex' => ($index % 2 == 0) ? '男' : '女',\n 'address' => $faker->address,\n 'birth' => now()->subDays(rand(5840, 36500)),\n 'created_at' => $updatedAt->subDays(rand(1, 3000)),\n 'updated_at' => $updatedAt,\n ]);\n }\n\n }",
"public function run()\n {\n _Log::system(_Log::$INFO, 'seeding educations');\n $ed1 = new Education(['name'=>'TK']);$ed1->save();\n $ed2 = new Education(['name'=>'SD']);$ed2->save();\n $ed3 = new Education(['name'=>'SMP']);$ed3->save();\n $ed4 = new Education(['name'=>'SMU']);$ed4->save();\n $ed5 = new Education(['name'=>'Diploma']);$ed5->save();\n $ed6 = new Education(['name'=>'Sarjana']);$ed6->save();\n $ed7 = new Education(['name'=>'Magister']);$ed7->save();\n $ed8 = new Education(['name'=>'Doktor']);$ed8->save();\n $ed9 = new Education(['name'=>'Tidak Ada']);$ed9->save();\n _Log::system(_Log::$SUCCESS, 'seeding educations success');\n }",
"public function run()\n {\n $faker = $this->fakerFactory->create();\n\n for ($i = 0; $i < 10; $i++) {\n $this->database->table(\"authors\")->insert([\n \"name\" => $faker->unique()->name,\n \"created_at\" => $faker->dateTimeThisYear,\n \"updated_at\" => $faker->dateTimeThisYear\n ]);\n }\n\n }",
"public function run()\n {\n //$this->call(UsersTableSeeder::class);\n $this->call(rootSeed::class);\n factory(App\\Models\\Egresado::class,'hombre',15)->create();\n factory(App\\Models\\Egresado::class,'mujer',15)->create();\n factory(App\\Models\\Administrador::class,5)->create();\n factory(App\\Models\\Notificacion::class,'post',10)->create();\n factory(App\\Models\\Notificacion::class,'mensaje',5)->create();\n factory(App\\Models\\Egresado::class,'bajaM',5)->create();\n factory(App\\Models\\Egresado::class,'bajaF',5)->create();\n factory(App\\Models\\Egresado::class,'suscritam',5)->create();\n factory(App\\Models\\Egresado::class,'suscritaf',5)->create();\n }",
"public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }",
"public function run()\n {\n // $faker = \\Faker\\Factory::create();\n // Assessment::create([\n // 'teacher_id' => rand(0, 10),\n // 'pupil_id' => rand(0, 10),\n // 'test_id' => rand(0, 10),\n // 'assessment_no' => rand(0, 120),\n // 'assessment_date' => $faker->date,\n // ]);\n factory(App\\Models\\Assessment::class, 10)->create();\n }",
"public function run()\n {\n $faker = Faker\\Factory::create();\n\n for($i = 0; $i < 1000; $i++) {\n App\\TestData::create([\n 'username' => $faker->userName,\n 'name' => $faker->name,\n \n ]);\n }\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // Let's make sure everyone has the same password and\n // let's hash it before the loop, or else our seeder\n // will be too slow.\n $password = Hash::make('password');\n\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n\n // And now let's generate a few dozen users for our app:\n for ($i = 0; $i < 10; $i++) {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => $password,\n 'country' => $faker->country,\n 'gender' => 'male',\n 'number' => $faker->phoneNumber,\n 'username' => $faker->userName,\n 'birth_date' => $faker->date($format = 'Y-m-d' , $max = 'now'),\n 'institution_type' => $faker->word,\n 'institution_name' => $faker->company,\n 'department' => $faker->domainword,\n 'faculty' => $faker->colorName,\n 'education_level' => $faker->numberBetween($min = 100 , $max = 700),\n\n ]);\n }\n }",
"public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }",
"public function run()\r\n {\r\n $this->seed('MnaraTableSeeder');\r\n\r\n }",
"public function run()\n {\n\n $faker = Faker::create();\n foreach(range(1,100)as$index){\n\n \n DB::table('usuarios')->insert([\n 'nombre' => $faker->name(5),\n 'equipo' => $faker->state(4),\n 'nacionalidad'=> $faker->country(4)\n ]);}\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //$this->call(RolesAndPermissionsSeeder::class);\n //$this->call(CMSTableSeeder::class);\n //$this->call(IncidentTypesSeeder::class);\n //$this->call(RegistrarsSeeder::class);\n\n /*\n factory(App\\Incident::class, 50)->create();\n\n factory(\\App\\Inquiry::class, 10)\n ->create()\n ->each(function ($inq){\n $inq->incidents()->attach(\\App\\Incident::inRandomOrder()->take(random_int(1,5))->get());\n });\n */\n //$this->call(InquiryStatusSeeder::class);\n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }",
"public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function generate() {}",
"public function run()\n {\n $faker = Faker::create();\n foreach (range(1,100) as $index) {\n \\DB::table('modulos')->insert([\n 'descricao' => $faker->words(3,true),\n 'ativo' => $faker->boolean\n ]);\n }\n }",
"public function run()\n {\n Site::factory(config('seeder.site_count'))\n ->has(Distribution::factory(2))\n ->has(SitedStock::factory(config('seeder.sitedstock_count')))\n ->create();\n \n DB::table('sites')->insert([\n 'radar_name'=>'DWSR-2501C',\n 'image'=>'027ce6f5bc035a08d207f0de97b23965.png',\n 'station_id'=>'Banjarmasin'\n ]);\n DB::table('sites')->insert([\n 'radar_name'=>'DWSR-3501C',\n 'image'=>'027ce6f5bc035a08d207f0de97b23965.png',\n 'station_id'=>'Cengkareng'\n ]);\n }",
"public function run()\n {\n \t// php artisan db:seed --class=Chuckbe\\\\ChuckcmsTemplateFrankfurt\\\\seeds\\\\ChuckcmsTemplateFrankfurtTableSeeder\n $fonts = [];\n $fonts['raw'] = 'Roboto:100,300,400,400italic,700|Patua+One:100,300,400,400italic,700|Lato:400,400italic,700,700italic,900|Roboto:100,300,400,400italic,500,700,700italic|Montserrat:100,300,400,400italic,500,700,700italic';\n \n $css = [];\n $css['global']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/global.css';\n $css['global']['asset'] = 'true';\n\n $css['structure']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/structure.css';\n $css['structure']['asset'] = 'true';\n\n $css['frankfurt']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/frankfurt.css';\n $css['frankfurt']['asset'] = 'true';\n\n $css['custom']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/custom.css';\n $css['custom']['asset'] = 'true';\n \n $js = []; \n $js['jquery']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery-2.1.4.min.js';\n $js['jquery']['asset'] = 'true';\n\n $js['mfnmenu']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/mfn.menu.js';\n $js['mfnmenu']['asset'] = 'true';\n\n $js['jqueryplugins']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery.plugins.js';\n $js['jqueryplugins']['asset'] = 'true';\n\n $js['jqueryjplayer']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery.jplayer.min.js';\n $js['jqueryjplayer']['asset'] = 'true';\n\n $js['animations']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/animations/animations.js';\n $js['animations']['asset'] = 'true';\n\n $js['translate3d']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/translate3d.js';\n $js['translate3d']['asset'] = 'true';\n\n $js['scripts']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/scripts.js';\n $js['scripts']['asset'] = 'true';\n\n $js['email']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/email.js';\n $js['email']['asset'] = 'true';\n\n $json = [];\n\n // create template\n Template::updateOrCreate(\n ['slug' => 'chuckcms-template-frankfurt'],\n ['name' => 'ChuckCMS Template Frankfurt',\n 'hintpath' => 'chuckcms-template-frankfurt',\n 'path' => 'chuckbe/chuckcms-template-frankfurt',\n 'type' => 'default',\n 'version' => '0.1',\n 'author' => 'Karel Brijs ([email protected])',\n 'fonts' => $fonts,\n 'css' => $css,\n 'js' => $js,\n 'json' => $json,\n 'active' => 1]\n );\n }",
"public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1,50) as $index) {\n $data = [\n 'id' => $faker->id,\n 'txt_protocolo' => $faker->unique()->txt_protocolo,\n ];\n Protocolo::create($data);\n }\n }",
"public function run()\n {\n // *****Data Using Manually*********\n // $student = [\n // [\n // 'name'=>'Jogi',\n // 'lastname'=>'Singh',\n // ],\n // [\n // 'name'=>'Jonty',\n // 'lastname'=>'Singh',\n // ],\n // [\n // 'name'=>'Harsh',\n // 'lastname'=>'Srivastav',\n // ],\n \n // ];\n\n // foreach ($student as $key => $value) {\n // Student::create($value);\n // }\n // *******End Data Manually*************\n // *****************Data Dump Using Faker*******************\n $faker = Faker::create();\n foreach (range(1,100) as $key => $value) {\n Student::create(\n [\n 'name'=>$faker->name,\n 'lastname'=>$faker->lastname\n ]\n );\n }\n\n }",
"public function run()\n\n {\n\n DB::table('user')->insert([\n 'name'=> 'Admin',\n 'phonenumber'=>'01694844753',\n 'password'=>hash('ripemd160','123456'),\n 'avatar'=>'/img/unknowavatar.png',\n ]);\n $faker = Faker\\Factory::create();\n\n for($i=0; $i<5; $i++){\n \n DB::table('user')->insert([\n 'name'=> $faker->name,\n 'phonenumber'=>$faker->phoneNumber,\n 'password'=> Str::random(10),\n 'avatar'=>$faker->image,\n ]);\n \n }\n }",
"public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }",
"public function run()\n {\n// $this->seedTestForms($faker);\n }",
"public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \n //لازم المودل يكون عامل \n //has Facroty عشان اقدر استعملو \n //لتنفيذ الفاكتوري\n // Category::factory(19)->create();\n\n Product::factory(199)->create();\n //Tag::factory(15)->create();\n\n //هنا بستدعي السيدر عشان انفذو\n // $this->call(CategoriesTableSeeder::class);\n\n /*\n Category::factory(10)\n ->has(Category::factory(5)\n ->has(Product::factory(15),'products')\n ,'children')\n ->create();\n*/\n\n }",
"public function run()\n {\n factory(\\App\\Models\\Discusse::class,config('other.seeder_count'))->create([\n 'is_better' => 0\n ]);\n factory(\\App\\Models\\Discusse::class,config('other.seeder_count'))->create([\n 'is_better' => 1\n ]);\n }",
"public function run()\n {\n $faker = Faker::create();\n foreach (range(1,50) as $index) {\n DB::table('empleado')->insert([\n 'dni' => $faker->numberBetween(20000000, 43000000),\n 'apellidonombre' => $faker->firstName(). \" \" . $faker->lastName(),\n 'idempleadocapataz' => rand(1, 50),\n 'especialidad' => $faker->jobTitle(),\n ]);\n }\n }",
"public function run()\n {\n $count = Regency::count();\n if($count == 0) {\n return $this->command->alert(\n 'Seed Error !! Silahkan Seed Regency Terlebih Dahulu'\n );\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n District::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n $data = array_map('str_getcsv', file(base_path().\"/storage/districts.csv\"));\n foreach ($data as $x) {\n $prov = new District();\n $prov->id = $x[0];\n $prov->regency_id = $x[1];\n $prov->name = $x[2];\n $prov->save();\n }\n }",
"public function run()\n {\n $faker=Faker::create();\n foreach (range(1,20) as $i){\n DB::table('personas')->insert([\t \n 'nombre' => $faker->name(),\n 'apellido' => $faker->lastName(),\n 'correo' => $faker->email(),\n 'edad'=>$faker->randomNumber(2),\n ]);\n }\n // factory(personas::class, 99)->create();\n }",
"public function run()\n {\n //\n $faker = Faker::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data = [\n 'pelanggan' => $faker->name,\n 'alamat' => $faker->address,\n 'telp' => $faker->phoneNumber,\n ];\n\n Pelanggan::create($data);\n }\n }",
"public function run()\n {\n DB::table('users')->delete();\n $json = File::get(\"database/seederfile/users.json\");\n $data = json_decode($json);\n foreach($data as $obj)\n { User::create(array(\n \t'id' => $obj -> id,\n \t'role_id' => $obj -> role_id,\n \t'username' => $obj -> username,\n \t'name' => $obj -> name,\n \t'email' => $obj -> email,\n #'password' => Hash::make('admin1')]);\n \t'password' => Hash::make($obj -> password),\n\t\t\t'remember_token' => $obj -> remember_token,\n \t'created_at' => $obj -> created_at,\n\t\t\t'updated_at' => $obj -> updated_at\n ));\n\t\t}\n }",
"public function run()\n {\n //\n// factory(\\App\\Bill::class,10)->create();\n \\App\\Helpers\\FactoryHelper::force_seed(\\App\\Bill::class,4);\n }",
"public function run()\n {\n\t\t// Let's truncate our existing records to start from scratch.\n File::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n File::create([\n 'name' => $faker->name,\n\t\t\t\t'user_id' => User::first()->id,\n ]);\n }\n }",
"public function run()\n {\n // Create my personal user\n $email = env('ADMIN_USER_EMAIL', false);\n $password = env('ADMIN_USER_PASSWORD', false);\n if (!$email || !$password) {\n throw new \\Exception('You must set admin credentials in .env before seeding');\n }\n $jakob = factory(App\\User::class)->create([\n 'name' => 'Jakob Buis',\n 'email' => $email,\n 'password' => bcrypt($password),\n ]);\n\n // Create the frontend as password-grant client\n $client = (new \\Laravel\\Passport\\Client)->forceFill([\n 'user_id' => $jakob->id,\n 'name' => 'librorum-frontend',\n 'secret' => str_random(40),\n 'redirect' => env('APP_URL'),\n 'personal_access_client' => false,\n 'password_client' => true,\n 'revoked' => false,\n ]);\n $client->save();\n\n // Create the content\n $tags = factory(\\App\\Tag::class, 5)->create(['user_id' => $jakob->id]);\n\n // Create 5 notebooks, each with 3 pages\n // each linked to 2 randomly selected tags\n $notebooks = factory(\\App\\Notebook::class, 5)->create(['user_id' => $jakob->id]);\n $notebooks->each(function($notebook) use ($tags) {\n\n $pages = factory(\\App\\Page::class, 3)->create([\n 'notebook_id' => $notebook->id,\n ]);\n\n $pages->each(function($page) use ($tags) {\n $page->tags()->attach($tags->random(2));\n });\n });\n }",
"public function run()\n {\n $faker = Faker\\Factory::create('en_US');\n\n foreach(range(1, 10) as $index) {\n Institute::create([\n 'inst_profile_guid' => $faker->uuid,\n 'user_id' => rand(1, 20),\n 'institute_code' => $faker->postcode,\n 'institute_name' => $faker->company,\n 'institute_description' => $faker->sentence,\n 'contact' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'postal_code' => $faker->postcode,\n 'country' => $faker->country\n ]);\n }\n }",
"public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }",
"public function run()\n {\n $faker = Faker::create('App\\Meet');\n\n for($i = 1; $i <= 20; $i ++){\n \tDB::table('meets')->insert([\n \t\t'user_id' => $faker->numberBetween($min = 1, $max = 20),\n \t\t'title' => $faker->sentence(),\n \t\t'meet_date' => $faker->dateTimeThisYear($max = 'now', $timezone = date_default_timezone_get()),\n \t\t'location' => $faker->streetName,\n \t\t'lat' => $faker->latitude($min = -90, $max = 90),\n \t\t'lng' => $faker->longitude($min = -180, $max = 180),\n \t\t'description' => implode($faker->paragraphs(5)),\n \t\t'deleted' => 0,\n \t\t'updated_at' => \\Carbon\\Carbon::now(),\n \t\t'created_at' => \\Carbon\\Carbon::now(),\n \t\t]);\n }\n\n\n }",
"public function run()\n {\n Model::unguard();\n\n $this->call(AttributesSeeder::class);\n\n File::factory()->count(10)->create();\n\n // Get all the attributes attaching up to 3 random attributes to each file\n $attributes = Attribute::all();\n\n // Populate the pivot table\n File::all()->each(function ($file) use ($attributes) {\n $file->attributes()->attach(\n $attributes->random(rand(1, 5))->pluck('id')->toArray(),\n [\n 'order' => rand(1, 5)\n ]\n );\n });\n\n Model::reguard();\n }",
"public function run()\n {\n // DB::table('users')->truncate(); //elimina la bd cada vez que realizo el seed\n\n \n\n \n\n\n factory(App\\User::class,10)->create();\n\n factory(App\\User::class)->create([\n 'name' =>'Administrador',\n 'email' =>'[email protected]',\n 'role' =>'admin',\n 'password'=>bcrypt('secret')\n\n ]);\n\n\n factory(App\\hotel::class,1)->create();\n \n \n\n }",
"public function run()\n {\n //$this->call(SectionSeeder::class);\n $this->call(AdminSeeder::class);\n //$this->call(ClientSeeder::class);\n \n \n\n\n\n //DB::table('users')->insert([\n // 'name' => 'Harry Han',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // 'contractorLastname' => 'Han',\n // 'contractorCompany' => 'test-company' ,\n // 'contractorContactNumber' => '0600000000',\n // 'contractorStatus' => 'active'\n //]);\n }",
"public function run()\n {\n $seeds = [\n [\n 'id'=>1,\n 'user_id'=>'1',\n 'firstname'=>'Jonas',\n 'lastname'=>'Jonaitis',\n 'position'=>'Administratorius',\n 'email'=>'[email protected]',\n 'phone'=>'Nėra',\n 'birthday'=>'2017-04-05',\n 'photo'=>'150x150.png',\n ],\n ];\n\n foreach ($seeds as $seed) {\n \\App\\Profile::create($seed);\n }\n }",
"public function run()\n {\n \t$faker = Factory::create();\n \tfor ($i=0; $i <99 ; $i++) { \n \t\tKontak::create([\n \t\t\t'nama'=>$faker->name,\n \t\t\t'email'=>$faker->email,\n \t\t\t'foto'=>$faker->text\n \t\t]);\n \t}\n }",
"public function run()\n\t{\n\n $faker = \\Faker\\Factory::create();\n\n // Let's make sure everyone has the same password and \n // let's hash it before the loop, or else our seeder \n // will be too slow.\n $password = Hash::make('aa2016aa');\n\n User::create([\n 'type' => '1',\n 'fname' => 'artiom',\n 'lname' => 'live',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n\n User::create([\n 'type' => '0',\n 'fname' => 'artiom',\n 'lname' => 'demo',\n 'email' => '[email protected]',\n 'password' => $password,\n ]);\n }",
"public function run()\n {\n // Admin Acount Seeding\n $add = new User;\n $add->name = 'karim';\n $add->email= '[email protected]';\n $add->password = Hash::make(123456);\n $add->phone = '01126878406';\n $add->prefix = 'karim';\n $add->level = 'admin';\n $add->save();\n\n //Language Seeding\n $language = new Languages;\n $language->language = \"English\";\n $language->prefix = \"en\";\n $language->direction = \"ltr\";\n $language->save();\n\n //Setting Seeding\n $appSetting = new Setting;\n $appSetting->sitename = \"Cure2Us\";\n $appSetting->email = \"[email protected]\";\n $appSetting->save();\n }",
"public function run()\n {\n //\n \t$fake = \\Faker\\Factory::create();\n \\DB::table('users')->insert([\n 'name' => 'Nguyễn Văn Hiệp',\n 'email' => '[email protected]',\n 'is_admin' => '1',\n 'password'=> bcrypt('12345678')\n ]);\n for ($i=0; $i < 20; $i++) {\n \\DB::table('users')->insert([\n 'name' => $fake->name,\n 'email' => $fake->email,\n 'password'=> bcrypt('12345678')\n ]);\n }\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++)\n {\n $gender = array_rand(['Men', 'Women'], 1);\n\n User::create([\n 'id' => ($i + 1),\n 'first_name' => $faker->firstName($gender == 0 ? 'male' : 'female'),\n 'last_name' => $faker->lastName,\n 'sex' => ($gender == 0 ? 'Men' : 'Women'),\n 'birthday' => $faker->date('Y-m-d', 'now'),\n 'email' => $faker->email,\n 'address' => $faker->address,\n 'telephone' => rand(1111111111,9999999999)\n ]);\n }\n }",
"public function run()\n {\n $faker = Faker\\Factory::create('fr_FR');\n\n for($i=0; $i<5; $i++){\n\n $data = [\n [\n 'pseudo' => $faker->userName,\n 'email' => $faker->unique()->email,\n 'firstname' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'password' => $faker->password,\n 'birthday' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'nbateam_id' => 1,\n ]\n ];\n User::insert($data);\n\n }\n }",
"public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }",
"public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $value) {\n User::create([\n 'name' => $faker->text('20'),\n 'email' => $faker->email,\n 'dob'=> $faker->date(),\n 'password' => bcrypt('anhvit12'),\n ]);\n\n }\n }",
"public function run()\n {\n if (!File::exists(public_path('uploads/faker/heritage'))) {\n File::makeDirectory(public_path('uploads/faker/heritage'), 777, true);\n }\n $faker = Faker\\Factory::create();\n for ($i = 0; $i < 16; $i++) {\n $data = [\n 'title' => $faker->sentence(),\n 'description' => theExcerpt($faker->paragraph, 255),\n 'content' => $faker->text(2000),\n 'thumbnail' => 'uploads/faker/heritage/' . $faker->image(public_path('uploads/faker/heritage'), 420, 236, null, false),\n 'cover' => 'uploads/faker/heritage/' . $faker->image(public_path('uploads/faker/heritage'), 1170, 150, null, false),\n 'province_id' => rand(1, 63),\n 'area_id' => rand(63, 70),\n 'user_id' => rand(1, 10),\n 'lang' => 'en',\n 'parent_id' => 0,\n 'status' => STATUS_ACTIVATED\n ];\n \\App\\IZee\\Heritages\\Heritage::create($data);\n }\n }",
"public function run()\n {\n $faker = Faker::create('id_ID');\n $gender = $faker->randomElement(['L', 'P']);\n $religion = $faker->randomElement(['Kristen', 'Islam', 'Budha']);\n\n for ($i=0; $i < 20; $i++) { \n DB::table('siswa')->insert([\n 'nama_depan' => $faker->firstName,\n 'nama_belakang' => $faker->lastName,\n 'jenis_kelamin' => $gender,\n 'agama' => $religion,\n 'alamat' => $faker->address\n ]);\n }\n }",
"public function run()\n {\n $faker = Faker::create();\n\n foreach(range(1, 10) as $index)\n {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'username' => $faker->userName,\n 'password' => $faker->password,\n 'location' => $faker->text,\n 'profile_picture' => $faker->imageUrl($width = 550, $height = 550)\n ]);\n }\n }",
"public function run()\n {\n $faker = Faker::create();\n $samples_temp = [];\n\n for($i = 0; $i < 100; $i++)\n {\n $samples_temp[] = [\n 'nombre' => $faker->name,\n 'email'=> $faker->email\n\n ];\n }\n Correo::insert($samples_temp);\n\n\n }",
"public function run()\n {\n $faker = $faker = Faker\\Factory::create();\n foreach (range(1,250) as $index) {\n DB::table('employee')->insert([\n 'employee_first_name' => $faker->name,\n 'employee_last_name' => $faker->name,\n 'employee_ref_number' => 00000,\n 'employee_phone_number' => rand(0,5),\n 'employee_address' => $faker->name,\n 'employee_address_two' => $faker->name,\n 'employee_country' => $faker->name,\n 'employee_state' => $faker->state,\n 'employee_city' => $faker->city,\n 'employee_email' => $faker->email,\n 'employee_pin_code' => rand(0,5),\n 'employee_reference' => $faker->name,\n 'employee_unique_identy' => $faker->name,\n ]);\n }\n }",
"public function run()\n {\n $facker = app(Faker\\Generator::class);\n\n $avatars = [\n 'https://avatars3.githubusercontent.com/u/41312704?s=460&v=4',\n 'https://cdn.learnku.com/uploads/avatars/24327_1530087651.jpeg!/both/200x200',\n ];\n\n $users = factory(User::class)\n ->times(10)\n ->make()\n ->each(function ($user, $index) use ($facker, $avatars) {\n $user->avatar = $facker->randomElement($avatars);\n });\n $user_array = $users->makeVisible(['password', 'remember_token'])->toArray();\n User::insert($user_array);\n\n $user = User::find(1);\n $user->name = '十步';\n $user->email = '[email protected]';\n $user->avatar = 'https://avatars3.githubusercontent.com/u/41312704?s=460&v=4';\n $user->save();\n\n // 初始化用户角色,将1号用户设置为站长\n $user->assignRole('Founder');\n $user = User::find(2);\n $user->assignRole('Maintainer');\n }",
"public function run()\n {\n User::create ( [\n 'username' => 'anh.tuan',\n 'first_name' => 'Tuan',\n 'last_name' => 'Nguyen',\n 'email' => '[email protected]',\n 'is_admin' => 1,\n 'password' => bcrypt('123456')\n ]);\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Faker::create();\n User::create ( [\n 'username' => $faker->userName,\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName ,\n 'email' => $faker->email,\n 'is_admin' => 0,\n 'password' => bcrypt('123456')\n ]);\n }\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for($i =0; $i<20; $i++){\n \\App\\Organisation::create([\n 'name' => $faker->company,\n 'business_type_id' => $faker->numberBetween(1, 3),\n 'logo'=>$faker->imageUrl($width = 200, $height = 200, 'abstract',true),\n 'address' => $faker->address,\n 'email' => $faker->companyEmail,\n 'mobile' => $faker->numberBetween(263772000000,263779999999),\n 'telephone'=>$faker->numberBetween(240291,29999)\n ]);\n }\n }",
"public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => '[email protected]',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }",
"public function run()\n {\n $faker = Faker::create();\n\n for($i = 0; $i < 50; $i++){\n $uid = DB::table('users')->select('id')->inRandomOrder()->first();\n $student = new Student([\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'teacher_id' => $uid->id,\n 'code' => $faker->bothify('**********')\n ]);\n\n $student->save();\n }\n }",
"public function run()\n {\n $faker = Faker::create();\n $preUach = PreUach::all();\n $samples_temp = [];\n\n foreach ($preUach as $item)\n {\n\n\n $samples_temp[] = [\n 'postulante' => $item->postulante,\n 'persona_matricula'=> $faker->lastName.' '. $faker->firstName,\n 'fecha_matricula'=>$faker->dateTimeBetween($startDate = '-5 months', $endDate = 'now')\n ]; \t\n }\n\n Declaracion::insert($samples_temp);\n \n }"
] | [
"0.741271",
"0.72163844",
"0.71867263",
"0.7150963",
"0.7011614",
"0.6992453",
"0.6889081",
"0.6877449",
"0.68096465",
"0.679051",
"0.67819595",
"0.6763185",
"0.6725394",
"0.67226577",
"0.67199546",
"0.67100257",
"0.6709864",
"0.67040205",
"0.6703833",
"0.66986066",
"0.66848785",
"0.66676813",
"0.6664289",
"0.66619146",
"0.6658433",
"0.6657409",
"0.66464853",
"0.66320693",
"0.6631319",
"0.66305304",
"0.66290253",
"0.66284007",
"0.6624839",
"0.6623553",
"0.6619334",
"0.6618539",
"0.6608564",
"0.65820485",
"0.65815806",
"0.65786946",
"0.65776837",
"0.65724593",
"0.65712655",
"0.6568998",
"0.6564165",
"0.65635526",
"0.65632516",
"0.6561539",
"0.65603864",
"0.6557867",
"0.6557867",
"0.6557841",
"0.6557841",
"0.6557841",
"0.6557841",
"0.6557841",
"0.6556947",
"0.6555183",
"0.6549153",
"0.65489244",
"0.654778",
"0.6542256",
"0.6541639",
"0.6536023",
"0.65329695",
"0.6532951",
"0.6532415",
"0.65314263",
"0.65287995",
"0.6528459",
"0.65275294",
"0.6521118",
"0.6521097",
"0.6520966",
"0.6520696",
"0.65203667",
"0.6519488",
"0.6513222",
"0.651225",
"0.6512065",
"0.6511974",
"0.6510938",
"0.6509229",
"0.6507844",
"0.65072274",
"0.6500883",
"0.65005153",
"0.64961535",
"0.6495031",
"0.6491838",
"0.6490735",
"0.6488336",
"0.64861405",
"0.6485924",
"0.6479967",
"0.6479224",
"0.6478154",
"0.6477599",
"0.6476717",
"0.64762294",
"0.64754003"
] | 0.0 | -1 |
Handle the component "created" event. | public function created(Component $component): void
{
Component::unsetEventDispatcher();
$this->componentService->calculateComponentCost($component);
$this->componentService->calculateVendorSummaryData($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function onCreated()\n {\n parent::onCreated();\n\n }",
"public function onCreated()\n {\n parent::onCreated();\n\n }",
"function on_creation() {\n $this->init();\n }",
"public function created(Carousel $carousel)\n {\n //\n }",
"protected function onCreated()\n {\n return true;\n }",
"function created()\n {\n /**\n * [signal]\n *\n * IDF_Project::created\n *\n * [sender]\n *\n * IDF_Project\n *\n * [description]\n *\n * This signal allows an application to perform special\n * operations at the creation of a project.\n *\n * [parameters]\n *\n * array('project' => $project)\n *\n */\n $params = array('project' => $this);\n Pluf_Signal::send('IDF_Project::created',\n 'IDF_Project', $params);\n }",
"public function created()\n\t{\n\t\tif (!$this->ismilestone) {\n\t\t\t$this->createDefaultMilestone();\n\t\t}\n\n\t\t$this->versioningService->createVersion($this);\n\t}",
"public function created(EntryInterface $entry)\n {\n $this->commands->dispatch(new CreateStream($entry));\n\n parent::created($entry);\n }",
"function after_create() {}",
"public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }",
"public function created()\n\t{\n\t\t$parent = $this->projectService->getProject($this->projectid);\n\t\tif ($parent) {\n\t\t\t$this->versioningService->createVersion($parent, 'featureupdate');\n\t\t}\n\t\t$this->versioningService->createVersion($this);\n\t}",
"public function onConstruct()\n {\n \n }",
"public function __invoke(TaskHasBeenCreatedEvent $event): void\n {\n }",
"public function instance_created() {\n if ($this->isready && !$this->prescan) {\n // It is supposed the store instance to expect an empty folder.\n $this->purge_all_definitions();\n }\n }",
"public function created(EntryInterface $entry)\n {\n $this->dispatch(new CreateStream($entry));\n $this->dispatch(new CreateDirectory($entry));\n\n parent::created($entry);\n }",
"protected function OnCreateElements() {}",
"protected function OnCreateElements() {}",
"public function onCreated(Step $step): void\n {\n }",
"public function onConstruct(){\n\n }",
"public function onConstruct(){\n\n }",
"protected function onModelCreated()\n {\n if ($this->addLeaf != null) {\n $this->addLeaf->setName(\"Add\");\n $this->model->addLeaf = $this->addLeaf;\n }\n\n // Hook up the event handler that returns a selection item for a given model.\n $this->model->getItemForModelEvent->attachHandler(function(Model $model){\n return $this->makeItemForValue($model->getUniqueIdentifier());\n });\n\n parent::onModelCreated();\n }",
"public function created(Service $Service)\n {\n //code...\n }",
"protected function created()\n {\n $this->response = $this->response->withStatus(201);\n $this->jsonBody($this->payload->getOutput());\n }",
"protected function MetaAfterCreate() {\n\t\t}",
"public function create()\n\t{\t\n\t\t\n\t\t// load the create form (app/views/fbf_historico_atleta_cameponato/create.blade.php)\n\t\t$this->layout->content = View::make('fbf_historico_atleta_cameponato.create')\n;\n\t}",
"public function created(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('created'));\n }",
"protected function _precreate() {\n }",
"public function create(RegistrationPostCreatedEvent $event): void\n {\n }",
"public function afterConstruct()\n {\n\n }",
"protected function created(WebhookPayload $payload): void\n {\n //\n }",
"private function _eventAfterCreate($data){\r\n $this->on(self::EVENT_AFTER_CREATE,[$this,'_eventAddTag'],$data);\r\n $this->trigger(self::EVENT_AFTER_CREATE);\r\n }",
"public function created(Video $video)\n {\n event(new BrowserForceRefreshEvent());\n $video->notify(new NewVideoNotification($video));\n }",
"public function handleOrderCreated(OrderCreatedEvent $event) {\n $order = $event->order;\n $user = $order->user;\n if( null != $user ) {\n $user->notify(new OrderStatusNotification($order, 'created'));\n }\n }",
"function onConstruct($instance);",
"public function notifyProductCreated(ProductCreatedEvent $event) : void\n {\n // prepare Product data to use it in email template\n // us some Mailer to send Email notification\n }",
"public function onCreating(Step $step): void\n {\n }",
"public function created(EntryInterface $entry)\n {\n event(new UserWasCreated($entry));\n\n parent::created($entry);\n }",
"public function created(Item $item)\n {\n //\n }",
"public function created(Service $service)\n {\n //\n }",
"protected function preCreateHook($object) { }",
"public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = $this->data('event_filter');\n }",
"protected function postCreateHook($object) { }",
"public function created($model)\n {\n }",
"public function createComponent() {\n $component = Component::createComponent();\n return \\Response::json($component);\n }",
"public function created(Exchange $exchange)\n {\n //\n }",
"public function onFigureCreated(GenericEvent $event): void\n {\n /** @var FigureAddEvent $figure_added */\n $figure_added = $event->getSubject();\n $figure = $figure_added->getFigure();\n\n $linkToFigure = $this->urlGenerator->generate('snowtrick_blog_figure', [\n 'slug' => $figure->getSlug(),\n '_fragment' => 'figure_added_'.$figure_added->getId(),\n ], UrlGeneratorInterface::ABSOLUTE_URL);\n\n $subject = $this->translator->trans('notification.figure_created');\n $body = $this->translator->trans('notification.figure_created_description',[\n '%title%' => $figure->getTitle(),\n '%content%' => $figure->getContent(),\n '%link%' => $linkToFigure,\n ]);\n $message = (new Swift_Message())\n ->setSubject($subject)\n ->setTo($figure_added->getAuthor()->getEmail())\n ->setFrom($this->sender)\n ->setBody($body, 'text/html');\n\n\n $this->mailer->send($message);\n }",
"public function created(Provider $provider)\n {\n //\n }",
"public function afterCreate()\n {\n self::updateCustomFieldsAndValues('create');\n }",
"public function created(History $history)\n {\n //\n }",
"public function created(Location $location)\n {\n event(new LocationsChanged($location));\n }",
"public function create()\n\t{\n\t\t// handled by backbone routes\n\t}",
"public function initEvent()\n {\n $this->owner->{$this->createdAtField} = date($this->format);\n $this->owner->{$this->updatedAtField} = date($this->format);\n }",
"protected function emitNotificationCreated(Notification $notification) {}",
"function __construct()\r\n\t{\r\n\t\t$this->events[\"BeforeAdd\"]=true;\r\n\r\n\r\n\t}",
"public function create()\n {\n // Not needed cause this is coming from the item listing\n }",
"function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n\t}",
"public function handle(StreamWasCreated $event)\n {\n $this->dispatch(new CreateStreamsEntryTable($event->getStream()));\n }",
"public function onConstruct()\n {\n $this->name = NULL;\n $this->description = NULL;\n }",
"function oncreate(){\n\t\treturn true;\n\t}",
"public function created(MActivityRule $model)\n\t{\n\t}",
"function register(Doku_Event_Handler $controller)\n {\n $controller->register_hook('TPL_ACT_RENDER','BEFORE',$this,'_displayMetaMessage',array());\n\n\n }",
"public function created($task)\n {\n $task->notifyMembers('Created');\n }",
"public function onStartDispatch()\n {\n /** @var Enlight_Event_EventManager $eventManager */\n $eventManager = $this->get('events');\n $container = $this->get('service_container');\n\n $resourceSubscriber = new Resource($this->get('models'), $this->get('config'));\n $eventManager->addSubscriber($resourceSubscriber);\n\n /** @var Sorting $sortingComponent */\n $sortingComponent = $container->get('swagcustomsort.sorting_component');\n /** @var Listing $listingComponent */\n $listingComponent = $this->get('swagcustomsort.listing_component');\n\n $subscribers = [\n new Resource($this->get('models'), $this->get('config')),\n new ControllerPath($this->Path(), $this->get('template')),\n new Frontend($this),\n new Backend($this, $this->get('models')),\n new Sort($this->get('models'), $sortingComponent, $listingComponent),\n new StoreFrontBundle($container, $sortingComponent)\n ];\n\n foreach ($subscribers as $subscriber) {\n $eventManager->addSubscriber($subscriber);\n }\n }",
"public function created(Job $job)\n {\n //\n }",
"public function afterCreate()\n {\n // $this->getDI()\n // ->getMail()\n // ->send([\"[email protected]\" => \"Admin GamanAds\"],\"New Adspace\", 'newadspace',\n // [ 'emailBody'=> \"New Adspace : <b>$this->ad_url</b> from Client Id : <b>$this->client_id</b> Client Name: <b>$this->client_name</b>\"]);\n }",
"public function created(Module $module)\n {\n //\n }",
"public function renderCreate(): void {\n }",
"public function created(Post $post)\n {\n $post->recordActivity('created');\n }",
"protected function emitInitializedObjectContainer() {\n\t\t$this->get('F3\\FLOW3\\SignalSlot\\Dispatcher')->dispatch(__CLASS__, __FUNCTION__, array());\n\t}",
"public function afterCreate() : bool\n\t{\n\t\treturn true;\n\t}",
"public function created(Subject $subject)\n {\n //\n }",
"protected function onBeforeRender() : void\n {\n }",
"public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }",
"public function afterCreate(\\stdClass $data, Entity $entity) { }",
"public function created(BgImage $bgImage)\n {\n //\n }",
"public function createComponent($name)\n\t{\n\t\tif (substr($name, 0, 17) == \"contentExtension_\") {\n\t\t\t$this->context->eventManager->dispatchEvent(\\Venne\\ContentExtension\\Events::onContentExtensionRender);\n\t\t} else {\n\t\t\treturn parent::createComponent($name);\n\t\t}\n\t}",
"public function created($artistAlias)\n {\n parent::created($artistAlias);\n\n Log::Info(\"Created artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }",
"public function created(Activity $activity)\n {\n //\n }",
"public function column_created($item)\n {\n }",
"public function created(Contract $contract)\n {\n //\n }",
"function before_create() {}",
"public function create()\n {\n //This is taken care of within the blade template\n }",
"protected function createComponentAddEvent() {\n\t\t$form = new AppForm;\n\t\t$form->setTranslator($this->translator);\n\t\t$form->addText('name', 'Name:*')\n\t\t\t\t->addRule(Form::FILLED, 'Fill name.');\n\t\t$form->addText('date', 'Date:*')\n\t\t\t\t\t\t->addRule(Form::FILLED, 'Fill date.')\n\t\t\t\t\t\t->getControlPrototype()->class = \"datepicker\";\n\t\t$form->addTextArea('description', 'Description:*')\n\t\t\t\t->addRule(Form::FILLED, 'Fill description.');\n\n\t\t$form->addSubmit('post', 'Add');\n\t\t$form->onSubmit[] = callback($this, 'addEventFormSubmitted');\n\t\treturn $form;\n\t}",
"public static function created($callback, $priority = 0)\n {\n static::registerModelEvent('created', $callback, $priority);\n }",
"public function getRenderKey() {\n return 'created';\n }",
"public function afterCreate()\n {\n $this->saveCustomFields();\n }",
"public function actionCreate()\n {\n $model = new Component;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Component'])) {\n $model->attributes = $_POST['Component'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->partnumberid));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function created(Post $post)\n {\n //\n }",
"public function createEvents()\n {\n //\n\n return 'something';\n }",
"protected function onInit() {}",
"public function beforeCreate()\n {\n\t\t// Asignar la fecha y hora de creacion del registro\n $this->createdon = time();\n $this->updatedon = time();\n\t\tif ($this->subscribedon == 0) {\n\t\t\t$this->subscribedon = $this->createdon;\n\t\t}\n }",
"public function created( $campaign )\n {\n /*\n * @author Jordan Dalton <[email protected]>\n *\n * If the Facebook field(s) are empty then we will need to\n * fire the CampaignWasCreated event which will then\n * create a new ad campaign within Facebook.\n *\n * Why make this a logical condition?\n *\n * Well, when the user signs up and allows us to import their ad account\n * we will also be importing related campaigns at that time as well. So\n * when the campaign record gets imported the script will still hit the\n * CampaignObserver::created() event. So having this logical condition added\n * will allow us to only create new Facebook ad campaigns only when needed. Without\n * this check we could have duplicates in the system and on Facebook.\n */\n if( empty( $campaign->getFacebookIdFields() ) )\n {\n event( new CampaignWasCreated( $campaign ) );\n }\n }",
"public function postRender()\n {\n }",
"public function created(ContactRecipient $contact_recipient)\n {\n //\n }",
"public function create()\n {\n // handled by client\n }",
"public function postPersist(LifecycleEventArgs $args)\n {\n $this->doctrineLog($args,\n array(\n 'action' => 'created',\n 'level' => 'doctrine',\n ));\n }",
"public function create()\n {\n return \"inside create method\";\n }",
"public function Create()\n {\n parent::Create();\n\n // 1. Verfügbarer HarmonySplitter wird verbunden oder neu erzeugt, wenn nicht vorhanden.\n $this->ConnectParent(\"{03B162DB-7A3A-41AE-A676-2444F16EBEDF}\");\n\t\t\n\t\t$this->RegisterPropertyString(\"Name\", \"\");\n\t\t$this->RegisterPropertyInteger(\"DeviceID\", 0);\n\t\t$this->RegisterPropertyBoolean(\"BluetoothDevice\", false);\t\t\n }",
"public function created(AvItem $model)\n {\n\n }",
"public function onSlotsAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}"
] | [
"0.6768169",
"0.6768169",
"0.6395557",
"0.6100263",
"0.6006277",
"0.59336686",
"0.5907307",
"0.5880735",
"0.584681",
"0.5836324",
"0.57516813",
"0.57457924",
"0.56784314",
"0.56783175",
"0.5610983",
"0.5610705",
"0.5610705",
"0.5538262",
"0.55296296",
"0.55296296",
"0.5476722",
"0.5473395",
"0.54296637",
"0.5423549",
"0.5397951",
"0.5382357",
"0.5363322",
"0.5359436",
"0.53503835",
"0.5342789",
"0.53418213",
"0.5340458",
"0.5326575",
"0.53082275",
"0.5289174",
"0.528831",
"0.5281594",
"0.52793074",
"0.5266805",
"0.5263477",
"0.5262449",
"0.5254469",
"0.52488756",
"0.5239801",
"0.5224866",
"0.52084875",
"0.5201991",
"0.51980317",
"0.51724833",
"0.5170778",
"0.51697993",
"0.51581097",
"0.51464087",
"0.5144624",
"0.51429987",
"0.51226324",
"0.51149386",
"0.511493",
"0.5114548",
"0.5102013",
"0.5097528",
"0.5096073",
"0.5094497",
"0.50934714",
"0.50845593",
"0.50818264",
"0.50719434",
"0.506595",
"0.50530803",
"0.5045402",
"0.50450146",
"0.5032776",
"0.50249666",
"0.50136894",
"0.50115794",
"0.5010228",
"0.5007749",
"0.49960804",
"0.49951744",
"0.49847433",
"0.49796358",
"0.49784297",
"0.49692914",
"0.4961054",
"0.49438307",
"0.4943815",
"0.49417806",
"0.49283332",
"0.49214703",
"0.49184945",
"0.49147338",
"0.49085099",
"0.49001557",
"0.48993453",
"0.48955882",
"0.4892589",
"0.48913395",
"0.48873922",
"0.4879818",
"0.48785132"
] | 0.6632512 | 2 |
Handle the component "updated" event. | public function updated(Component $component): void
{
Component::unsetEventDispatcher();
if (($component->price * $component->quantity) !== $component->cost) {
$this->componentService->calculateComponentCost($component);
}
$this->componentService->calculateVendorSummaryData($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }",
"public function onUpdate();",
"public function onUpdate();",
"public function onUpdate();",
"public function update() {\n parent::update();\n }",
"function update() {\n\n\t\t\t}",
"protected function onUpdated()\n {\n return true;\n }",
"public function after_update() {}",
"function after_update() {}",
"public function update() {\r\n }",
"protected function afterUpdate()\n {\n }",
"protected function afterUpdate()\n {\n }",
"public function _postUpdate()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}",
"public function onUpdated(Step $step): void\n {\n }",
"public function update()\n {\n }",
"protected function onUpdate(): Update\r\n {\r\n }",
"public function update()\r\n {\r\n \r\n }",
"public function update() {\n \n }",
"protected function afterUpdating()\n {\n }",
"protected function afterUpdate() {\n\t}",
"public function update()\r\n {\r\n //\r\n }",
"public function update()\n {\n \n }",
"public function update()\n {\n \n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function _get_update_callback()\n {\n }",
"public function update () {\n\n }",
"public static function updated($callback)\n {\n self::listenEvent('updated', $callback);\n }",
"protected function update() {}",
"public function update()\n {\n //\n }",
"public function update()\n {\n //\n }",
"public function update(): void\n {\n }",
"protected function _update()\n {\n \n }",
"protected function _update()\n {\n \n }",
"public function updating()\n {\n # code...\n }",
"protected function _update()\n\t{\n\t}",
"public function update() {\r\n\r\n\t}",
"public function update()\n\t{\n\n\t}",
"protected function performUpdate() {}",
"public function update()\n {\n\n }",
"public function update()\n {\n\n }",
"public abstract function update();",
"public function isUpdated() {}",
"public static function update(){\r\n }",
"public static function update(){\n }",
"public function update()\n {\n # code...\n }",
"abstract public function update();",
"abstract public function update();",
"public function update();",
"public function update();",
"public function update();",
"public function update();",
"public function onUpdating(Step $step): void\n {\n }",
"public function update() {\n\t\treturn;\n\t}",
"public function processUpdate()\n {\n // Clear SWAPPED state bit\n $this->_state &= ~self::SWAPPED;\n\n $this->_memManager->processUpdate($this, $this->_id);\n }",
"abstract function update();",
"public function updated(Dispatch $dispatch)\n {\n //\n }",
"public function measurementsChanged()\n {\n $this->notifyObservers();\n }",
"public function updated($model)\n {\n }",
"public function doUpdate() {\n\t\ttry {\n\t\t\tcall_user_func_array( $this->doUpdateFunction, $this->arguments );\n\t\t} catch ( Exception $ex ) {\n\t\t\t$this->exceptionHandler->handleException( $ex, 'data-update-failed',\n\t\t\t\t'A data update callback triggered an exception' );\n\t\t}\n\t}",
"abstract protected function update ();",
"public function update(){\n\n }",
"public function update(){\n\n }",
"public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }",
"public function postUpdateCallback()\n {\n $this->performPostUpdateCallback();\n }",
"public function updated(Carousel $carousel)\n {\n //\n }",
"protected function emitPackageStatesUpdated(): void\n {\n if ($this->bootstrap === null) {\n return;\n }\n\n if ($this->dispatcher === null) {\n $this->dispatcher = $this->bootstrap->getEarlyInstance(Dispatcher::class);\n }\n\n $this->dispatcher->dispatch(self::class, 'packageStatesUpdated');\n }",
"public static function postUpdate(Event $event){\n $io = $event->getIO();\n $io->write(\"postUpdate event triggered.\");\n }",
"public function measurementsChanged(): void\n {\n $this->notifyObservers();\n }",
"protected function after_update($new_instance, $old_instance){\n\t}",
"public function Update() {\n }",
"protected function _postUpdate()\n\t{\n\t}",
"public function updated(Item $item)\n {\n event(new ItemUpdated($item));\n }",
"public function onConfigUpdated() {\n\t\tif ($this->client) {\n\t\t\t$this->client->config = $this->config;\n\t\t\t$this->client->onConfigUpdated();\n\t\t}\n\t}",
"function update( $parent ) {\n\t\techo '<p>' . JText::_('COM_MAPYANDEX_UPDATE_ to ' . $this->release) . '</p>';\n\t\t// You can have the backend jump directly to the newly updated component configuration page\n\t\t// $parent->getParent()->setRedirectURL('index.php?option=com_democompupdate');\n\t}",
"public function compAjaxUpdate() {\r\n $req = $this->input->post('req');\r\n updateComponentDetails($req);\r\n }",
"public function setUpdated(): void\n {\n $this->originalData = $this->itemReflection->dehydrate($this->item);\n }",
"public function bcpCatalogProductViewUpdate($observer)\n\t{\n\t\t$responseData = $observer->getEvent()->getResponseData();\n\t\t$simpleProduct = $observer->getEvent()->getProduct();\n\t\t$parentProduct = $observer->getEvent()->getParentProduct();\n\t\t$pageData = $observer->getEvent()->getPageData();\n\t\tMage::getModel('bcp/updater')->loadUpdateData($responseData, $simpleProduct, $parentProduct, $pageData);\n\t}",
"public function updated(Step $step): void\n {\n $handler = $step->handler();\n\n $handler->onUpdated($step);\n }",
"abstract protected function doUpdate($oldVersion);",
"public function onUpdateRecord()\n {\n $this->updated = new \\DateTime();\n $this->rev++;\n }",
"public function updated(EntryInterface $entry)\n {\n event(new UserWasUpdated($entry));\n\n parent::updated($entry);\n }",
"public function onUpdateField()\n {\n //TODO Validate input\n\n $post = post();\n\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::updateField(\n $post['name'],\n $post['code'],\n $post['description'],\n $post['type'],\n $validation,\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }",
"public function updated(Channel $channel)\n {\n //\n }",
"public function getUpdated();",
"public function getUpdated();",
"public function refreshUpdated()\n {\n $this->setUpdated(new \\DateTime());\n }",
"public function hookUpdate(): void\n {\n $this->say(\"Executing the Plugin's update hook...\");\n $this->_exec(\"php ./src/hook_update.php\");\n }",
"public function afterUpdateEvent($self, $pkeys){\n }",
"protected function updateAction()\n {\n }"
] | [
"0.678612",
"0.6778121",
"0.6778121",
"0.6778121",
"0.6544253",
"0.65122026",
"0.64552474",
"0.6402792",
"0.6355825",
"0.63345456",
"0.63054866",
"0.63054866",
"0.63053733",
"0.63007796",
"0.628835",
"0.6226261",
"0.62261045",
"0.6217284",
"0.6217057",
"0.6205569",
"0.6191589",
"0.61801225",
"0.61801225",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179779",
"0.6179165",
"0.6170354",
"0.61398333",
"0.6130981",
"0.61077595",
"0.61077595",
"0.6099545",
"0.6099148",
"0.6099148",
"0.6072432",
"0.60687155",
"0.6034152",
"0.6025427",
"0.6009249",
"0.6000535",
"0.6000535",
"0.59405863",
"0.59360015",
"0.5911062",
"0.5900098",
"0.58996993",
"0.5891118",
"0.5891118",
"0.5882529",
"0.5882529",
"0.5882529",
"0.5882529",
"0.5871037",
"0.5867751",
"0.58554745",
"0.5835605",
"0.5832323",
"0.5808304",
"0.58055407",
"0.58041555",
"0.5784015",
"0.57752657",
"0.57752657",
"0.5772991",
"0.5772991",
"0.57389843",
"0.5726981",
"0.57090527",
"0.56912464",
"0.5679772",
"0.5648258",
"0.5647713",
"0.5643955",
"0.5621365",
"0.5609701",
"0.5588015",
"0.5585981",
"0.5533743",
"0.55223626",
"0.5520218",
"0.5519924",
"0.5519401",
"0.55150265",
"0.5508318",
"0.54957426",
"0.54957426",
"0.5475401",
"0.54739827",
"0.54733413",
"0.54563326"
] | 0.6288195 | 15 |
Handle the component "deleted" event. | public function deleted(Component $component): void
{
$this->componentService->calculateVendorSummaryData($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($event): void;",
"public function handleDeleted(Deleted $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }",
"public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }",
"public function deleted() {\n // TODO Implement this\n }",
"public function onDelete(): void\n {\n if ($this->globals->getUpdated() !== (int) $_GET['id']) {\n $this->_entity->delete($_GET['id']);\n $this->globals->setUpdated($_GET['id']);\n $this->globals->unsetAlert();\n }\n }",
"public function _postDelete()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}",
"protected function handleDoDelete() {\n\t\t\tif ($this->verifyRequest('DELETE') && $this->verifyParams()) {\n\t\t\t\tif ($this->blnAuthenticated) {\n\t\t\t\t\tif ($intEventId = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3))) {\n\t\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\t\tif ($objUserEvent->loadById($intEventId) && $objUserEvent->count()) {\n\t\t\t\t\t\t\tif ($objUserEvent->current()->get('userid') == AppRegistry::get('UserLogin')->getUserId()) {\n\t\t\t\t\t\t\t\tif ($objUserEvent->destroy()) {\n\t\t\t\t\t\t\t\t\tCoreAlert::alert('The event was deleted successfully.');\n\t\t\t\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\t\t\t\t$this->intStatusCode = 200;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error deleting the event'));\n\t\t\t\t\t\t\t\t\t$this->error(400);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Invalid event permissions'));\n\t\t\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t\t$this->error(400);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing event ID'));\n\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid authentication'));\n\t\t\t\t\t$this->error(401);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}",
"public function onBeforeDelete();",
"private function course_content_deleted($event) {\n global $DB;\n $courseid = $event->courseid;\n $DB->delete_records('repository_gdrive_references', array('courseid' => $courseid));\n }",
"public function deleted(EntryInterface $entry)\n {\n //$this->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }",
"public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }",
"protected function afterDelete()\r\n {\r\n }",
"public function delete(RegistrationPostDeletedEvent $event): void\n {\n }",
"public static function deleted($callback)\n {\n self::listenEvent('deleted', $callback);\n }",
"protected function afterDelete()\n {\n }",
"public function onAfterDelete();",
"protected function onDeleted()\n {\n return true;\n }",
"public function onAfterDelete() {\n\t\tif (!$this->owner->ID || self::get_disabled() || self::version_exist($this->owner))\n\t\t\treturn;\n\t\t$this->onAfterDeleteCleaning();\n\t}",
"public static function deleted($event) {\n\n\t\t$account = $event->getSubject();\n\n\t}",
"public static function course_deleted_observer(\\core\\event\\course_deleted $event) {\n global $DB;\n $DB->delete_records('tool_kholland', ['courseid' => $event->objectid]);\n }",
"public function forceDeleted(Component $component): void\n {\n $this->deleted($component);\n }",
"public function onAfterDelete() {\r\n\t\tparent::onAfterDelete();\r\n\t\t$this->zlog('Delete');\r\n\t}",
"protected function _postDelete() {}",
"protected function _postDelete() {}",
"protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }",
"protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }",
"public function deleted(EntryInterface $entry)\n {\n $this->commands->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }",
"public function deleted(Dispatch $dispatch)\n {\n //\n }",
"public function after_delete() {}",
"public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n\n\t\tif($this->isPublished()) {\n\t\t\t$this->doUnpublish();\n\t\t}\n\t}",
"function OnAfterDeleteItem(){\n }",
"public function onBeforeDelete() {\r\n\t\tparent::onBeforeDelete();\r\n\t}",
"public function on_delete() {\n $this->remove_dir();\n }",
"public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}",
"public function deleted(EntryInterface $entry)\n {\n parent::deleted($entry);\n\n $this->dispatch(new DumpPages());\n }",
"public static function onAfterDelete(Main\\Event $event)\n\t{\n\t\t$reservationId = (int)$event->getParameter('id')['ID'];\n\t\tif ($reservationId > 0)\n\t\t{\n\t\t\tself::deleteProductReservationMap($reservationId);\n\t\t}\n\t}",
"public function onAssetDelete(DeleteAssetEvent $event)\n {\n // doctrine cascading. You can't delete a series object graph with flushes inbetween.\n // wait for an update in the bprs asset bundle for a specific deleteMaybeUsedAsset Event.\n\n // $this->updateMedias($event->getAsset());\n // $this->updateEpisodes($event->getAsset());\n // $this->updateSeries($event->getAsset());\n }",
"public function processDelete(): void \n {\n if ($this->delete()) { // The tag is deleted in the database storage.\n auth()->user()->logActivity($this, 'Tags', 'Has deleted an issue tag with the name ' . $this->name);\n flash(\"The ticket tag with the name <strong>{$this->name}</strong> has been deleted in the application.\")->info()->important();\n }\n }",
"function onDelete()\n\t{\n\t\treturn $this->getLookupTable()->deleteKey($this->getValue());\n\t}",
"public function delete() \n {\n DomainWatcher::addDeletedObject($this);\n }",
"public function onWikiDelete(WikiWasDeleted $event)\n {\n try {\n $this->wiki->withTrashed()->find($event->wiki['id'])->deleteFromIndex();\n } catch (\\Exception $e) {\n app('log')->warning($e->getMessage());\n }\n }",
"protected function _postDelete()\n\t{\n\t\t//register events\n\t\t\\Base\\Event::trigger('user.delete',$this->id);\n\t\t//end events\n\t}",
"public function onFieldDeleted($button) {}",
"public static function onContentDelete($event)\n {\n \n foreach (ReportContent::model()->findAllByAttributes(array('object_model' => get_class($event->sender), 'object_id' => $event->sender->id)) as $report) {\n $report->delete();\n }\n }",
"public function _event_before_delete() {\n\t\tstatic::$_delete['roles'] = $this->roles;\n\t}",
"public function onDelete() : void\n {\n parent::onDelete();\n $this->setRef('from__company_id__to__table__companies__columns__id', null, 'products');\n }",
"public function deleted(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('deleted'));\n }",
"function OnBeforeDeleteItem(){\n }",
"abstract public static function deleted($callback);",
"public function afterDeleteCommit(): void\n {\n }",
"function handleDeleteRelatedPerson(EventContext $context)\n {\n $program_item = $this->storeProgramItem();\n $program_item->removeRelatedPersonById(fmGetVar(\"related_person_id\"));\n RelatedPerson::deleteRelatedPerson(fmGetVar(\"related_person_id\"));\n $context->addActionMessage(\"Deleted 1 Related Person.\");\n $context->setForward(dirname(__FILE__) . \"/program_item_editor.php\");\n }",
"public function deleted(Article $article)\n {\n //\n }",
"public function delete(){\r\n\t\t// Check for request forgeries\r\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\r\n\t\r\n\t\t// Get the model.\r\n\t\t$model = $this->getModel(\"ManageCompanyEvent\");\r\n\t\t$this->deleteEvents($model);\r\n\t\r\n\t\t$this->setRedirect('index.php?option=com_jbusinessdirectory&view='.$this->input->get('view'));\r\n\t}",
"function after_delete() {}",
"function handleDeleteProgramItem(EventContext $context)\n {\n ProgramItem::deleteProgramItem(fmGetVar(\"program_item_id\"));\n $context->addActionMessage(\"Deleted 1 \" . ProgramItem::getObjectClassDisplayName(fmGetVar(\"program_item_class\")));\n $context->setForward(dirname(__FILE__) . \"/program_item_selector.php\");\n }",
"protected function _postDelete()\n\t{\n\t}",
"public function deleted(Exchange $exchange)\n {\n //\n }",
"public function deleted(Vehicle $vehicle)\n {\n //\n }",
"public function onBeforeDelete()\n {\n parent::onBeforeDelete();\n \n $proxied = $this->getProxiedObject();\n \n // Core SS types are decorated so we know we can call this\n $isCoreType = in_array($proxied->getField('ClassName'), $this->acService->ssCoreTypes());\n if($isCoreType && $proxied->canDeleteOnBlockDelete()) {\n $proxied->delete();\n }\n }",
"public function onAfterDelete() {\n parent::onAfterDelete();\n\n foreach ($this->Items() as $item) {\n $item->delete();\n }\n }",
"public function afterDelete(&$id, Entity $entity) { }",
"public function hook_after_delete($id) {\n\n }",
"public function hook_after_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_after_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_after_delete($id) {\n\t //Your code here\n\n\t }",
"public function deleted(Contact $contact)\n {\n //\n }",
"public function deleted(Contact $contact)\n {\n //\n }",
"public function hook_before_delete($id) {\n\n }",
"function onDelete($param)\n {\n $key=$param['key'];\n \n // define duas acoes\n $action1 = new TAction(array($this, 'Delete'));\n \n // define os parametros de cada acao\n $action1->setParameter('key', $key);\n \n //encaminha a chave estrangeira\n $action1->setParameter('fk', filter_input(INPUT_GET, 'fk'));\n\n // exibe um dialogo ao usuario\n new TQuestion('Deseja realmente excluir o registro ?', $action1, $action2);\n }",
"public function deleted(Installment $installment)\n {\n //\n }",
"public function hook_before_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_before_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_before_delete($id) {\n\t //Your code here\n\n\t }",
"protected function handleDelete($request) {\n //get view mount\n $queryViewMount = DB::table('categories')->where('id', $request->_id_cat)->first();\n DB::table('categories')->where('id', $request->_id_cat)->update(['comment' => (int)$queryViewMount -> comment -1]);\n DB::table('comments')->where('id', $request->_id)->delete();\n session::flash('notify', 'Delete successful');\n }",
"public function deleted(EntryInterface $entry)\n {\n if (!$entry->isForceDeleting()) {\n event(new UserWasDeleted($entry));\n }\n\n parent::deleted($entry);\n }",
"public function handle(StreamWasDeleted $event)\n {\n $this->dispatch(new DropStreamsEntryTable($event->getStream()));\n }",
"public function deleted($artistAlias)\n {\n parent::deleted($artistAlias);\n\n Log::Info(\"Deleted artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }",
"public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$component = $this->podb->from('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'))->limit(1)->fetch();\n\t\t\t$componentType = $component['type'];\n\t\t\tif ($componentType == 'component') {\n\t\t\t\t$folderinstall = 'component';\n\t\t\t} else {\n\t\t\t\t$folderinstall = 'widget';\n\t\t\t}\n\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component'].'/uninstall.php')) {\n\t\t\t\theader('location:admin.php?mod=component&act=uninstall&folder='.$component['component']);\n\t\t\t} else {\n\t\t\t\t$delete_dir = new PoDirectory();\n\t\t\t\tif ($component['active'] == 'Y') {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component']);\n\t\t\t\t} else {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/_'.$component['component']);\n\t\t\t\t}\n\t\t\t\tif ($delete_folder) {\n\t\t\t\t\t$query = $this->podb->deleteFrom('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_2'], 'admin.php?mod=component');\n\t\t\t\t} else {\n\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_4'], 'admin.php?mod=component');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function onDeleting()\n {\n return true;\n }",
"public function csstoolkit_ondelete_callback($dc)\r\n\t{\r\n\t\t$objFile = new File('web/bundles/csstoolkit/css/'.$dc->id.'.css');\r\n\t\tif ($objFile->exists()) {\r\n\t\t\t$objFile->delete();\r\n\t\t}\r\n\t}",
"public function deleted(Job $job)\n {\n //\n }",
"public function deleted(Service $Service)\n {\n //code...\n }",
"public function handleDelete($eid) {\n\t\t$this->checkTeacherAuthority();\n\t\tif (EventModel::deleteEvent($eid)) {\n\t\t\t$this->flashMessage(_('Event Deleted'), 'success');\n\t\t\t$this->redirect('event:homepage', $this->cid);\n\t\t}\n\t\telse\n\t\t\t$this->flashMessage(_('There was an error deleting the event'), 'error');\n\t}",
"public function delete() {\n\t\t$this->deleted = true;\n\t}",
"function OnDeleteItem(){\n if (! $this->error) {\n $data = array($this->key_field => $this->item_id);\n if (strlen($this->host_library_ID)) {\n $this->library_ID = $this->host_library_ID;\n }\n\n if ($this->disabled_delete) {\n $this->OnAfterError();\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE[]=LIBRARY_DISABLED_DELETE\" . \"&\" . $this->restore);\n }\n $errors = $this->HasChildNodes(array($this->item_id));\n if (! strlen($errors)) {\n $this->OnBeforeDeleteItem();\n $this->Storage->Delete($data);\n $this->DeleteNotOrdinaryFields();\n $this->OnAfterDeleteItem();\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE=MSG_ITEM_DELETED\" . \"&\" . $this->restore);\n }\n else {\n $this->OnAfterError();\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"\" . $errors . \"\" . \"&\" . $this->restore);\n }\n }\n }",
"public function deleted(Channel $channel)\n {\n //\n }",
"public function deleted(Channel $channel)\n {\n //\n }",
"protected function _preDelete() {}",
"public function deleteAction()\n {\n $itemGroupRowId = $this->getRequest()->getParam('containerRowId');\n \n //get eventId of the event to be deleted\n $itemGroupId = $this->getRequest()->getParam('containerId');\n\n // get form\n $form = $this->_model->getForm('delete');\n \n //set form action\n //define form action\n $form->setAction($this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'delete',\n 'containerId' => $itemGroupId,\n 'containerRowId' => $itemGroupRowId,\n ),\n \n 'event'\n ));\n \n $this->processDelete(\n $form, \n 'msg_itemgrouprow_deleted',\n $this->view->url(\n array(\n 'controller' => 'itemgrouprow',\n 'action' => 'index',\n 'containerId' => $itemGroupId),\n 'event'\n ),\n $itemGroupRowId\n );\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 }",
"public function ___deleted(Saveable $item) { \n\t\t$this->log(\"Deleted\", $item);\n\t}",
"protected function _deleteEvent($eventId)\n {\n }",
"final public function delete() {\n $db = Database::getInstance();\n $mysqli = $db->getConnection();\n\t\n $sql_query = 'DELETE FROM fresco_costing_component_array WHERE component_id ='.$this->_component_id;\n \n $result = $mysqli->query($sql_query);\n if (!$result) {\n trigger_error('Unable to delete from database : SQL query : ' . $sql_query);\n }\n\treturn;\n }",
"function before_delete() {}",
"protected function postDeleteHook($object) { }",
"public function onModelDeleted($model)\r\n {\r\n $this->onModelSaved($model);\r\n }",
"public function onAttachmentDelete(Attachment $attachment, Entity $container = null)\n {\n }",
"public function deleted(Item $item)\n {\n //\n }",
"public function deleted(Item $item)\n {\n //\n }",
"public static function deleted($callback, $priority = 0)\n {\n static::registerModelEvent('deleted', $callback, $priority);\n }"
] | [
"0.666745",
"0.6619573",
"0.66077155",
"0.6578753",
"0.6546198",
"0.6519532",
"0.6517223",
"0.65046895",
"0.6459175",
"0.6406338",
"0.6384553",
"0.63773406",
"0.637023",
"0.6350102",
"0.6342248",
"0.6338906",
"0.6334008",
"0.62902874",
"0.62872356",
"0.6258356",
"0.6242306",
"0.6237442",
"0.6224786",
"0.6224204",
"0.62207985",
"0.621282",
"0.62095916",
"0.62000024",
"0.6154318",
"0.6129975",
"0.61283374",
"0.61253786",
"0.6119465",
"0.61181563",
"0.6094074",
"0.60794073",
"0.6074563",
"0.6066607",
"0.6039416",
"0.602867",
"0.6016128",
"0.601073",
"0.5984346",
"0.59730816",
"0.5948624",
"0.59408605",
"0.5922775",
"0.59193736",
"0.5916595",
"0.5910233",
"0.5909036",
"0.589763",
"0.5889326",
"0.58869356",
"0.58844537",
"0.5882746",
"0.58723027",
"0.58663094",
"0.58660793",
"0.58579737",
"0.5837927",
"0.5824024",
"0.58190125",
"0.58190125",
"0.58190125",
"0.5809275",
"0.5809275",
"0.58089375",
"0.58019733",
"0.5795793",
"0.57899714",
"0.57899714",
"0.57899714",
"0.57796746",
"0.5776228",
"0.5770365",
"0.57640874",
"0.5759584",
"0.5755031",
"0.5754454",
"0.5743184",
"0.5739705",
"0.57336974",
"0.57290286",
"0.57264596",
"0.5716464",
"0.5716464",
"0.5712115",
"0.5710377",
"0.570611",
"0.5702877",
"0.57002324",
"0.5697848",
"0.56935793",
"0.56919026",
"0.56911373",
"0.5689139",
"0.5685526",
"0.5685526",
"0.56851786"
] | 0.633947 | 15 |
Handle the component "restored" event. | public function restored(Component $component): void
{
$this->deleted($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function onRestored()\n {\n return true;\n }",
"public function restored(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('restored'));\n\n // Once the model is restored, we need to put everything back\n // as before, in case a legitimate update event is fired\n static::$restoring = false;\n }",
"function restore()\n {\n }",
"public function restore()\n {\n //\n }",
"public function restoring($model)\n\t{\n\t}",
"public function restore()\n {\n }",
"public function restore(): void\n\t{\n\t\t$this->processor->restore();\n\t}",
"public function restore() {}",
"public function restored(Job $job)\n {\n //\n }",
"public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }",
"public function restored(Carousel $carousel)\n {\n //\n }",
"public function restored(Exchange $exchange)\n {\n //\n }",
"public function restore();",
"public function restored(Stock $stock)\n {\n //\n }",
"public function restored(Vehicle $vehicle)\n {\n //\n }",
"public function restored(Installment $installment)\n {\n //\n }",
"public function restored(TradeCancel $tradeCancel)\n {\n //\n }",
"public function onrestoreCallback($intID, $strTable, $arrData, $intVersion);",
"public function restoring(Auditable $model)\n {\n // When restoring a model, an updated event is also fired.\n // By keeping track of the main event that took place,\n // we avoid creating a second audit with wrong values\n static::$restoring = true;\n }",
"protected static function restore() {}",
"public function restored(Article $article)\n {\n //\n }",
"public function restored(TraHangNhaCungCap $traHangNhaCungCap)\n {\n //\n }",
"public function restoreOriginalService(): void;",
"public function restored(Brand $brand)\n {\n //\n }",
"public function afterRestore() : bool\n\t{\n\t\treturn true;\n\t}",
"public function restoreGraphicState() {}",
"public function restoreGraphicState() {}",
"public function restored(Historia $historia)\n {\n //\n }",
"public function restored(History $history)\n {\n //\n }",
"public function restored(Dispatch $dispatch)\n {\n //\n }",
"public function restored($artistAlias)\n {\n parent::restored($artistAlias);\n\n Log::Info(\"Restored artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }",
"public function testRestoreState()\n {\n $load = new Load(new Memento());\n $load->pickup();\n $load->enroute();\n $load->deliver();\n\n // Check the last state of the load\n $this->assertSame(State::STATE_DELIVER, $load->getCurrentState());\n\n // Undo the previous state of the load\n $load->undo();\n $this->assertSame(State::STATE_ENTOUTE, $load->getCurrentState());\n\n // Restore the first state of the load\n $load->restore(0);\n $this->assertSame(State::STATE_PICKUP, $load->getCurrentState());\n }",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restored(Label $label)\n {\n //\n }",
"public function restored(Remission $remission)\n {\n //\n }",
"public function restored(Region $region)\n {\n //\n }",
"public function restored(Document $document)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"protected function performRestore(Model $entity): void\n {\n $entity->restore();\n }",
"public function afterRestoreResponse($data)\n {\n }",
"public function restored(SaleService $saleService)\n {\n //\n }",
"public function after_restore(){\n \tglobal $DB;\n \t\n \t\n \t$pagemenuid = $this->get_activityid();\n\n \tif ($modulelinks = $DB->get_records('pagemenu_links', array('pagemenuid' => $pagemenuid))){\n \t\tforeach($modulelinks as $ml){\n \t\t\t\n \t\t\t$ml->previd = $this->get_mappingid('pagemenu_links', $ml->previd);\n \t\t\t$ml->nextid = $this->get_mappingid('pagemenu_links', $ml->nextid);\n\n\t\t\t\tif ($ml->type == 'module'){\n\t \t\t\tif ($link = $DB->get_record('pagemenu_link_data', array('linkid' => $ml->id))){\n\t \t\t\t\t$link->value = $this->get_mappingid('course_module', $link->value);\n\t \t\t\t\t$DB->update_record('pagemenu_link_data', $link);\n\t \t\t\t} else {\n\t\t\t\t\t\t$this->get_logger()->process(\"Failed to restore dependency for pagemenu link '$ml->name'. \", backup::LOG_ERROR); \t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$DB->update_record('pagemenu_links', $ml);\n \t\t}\n \t} \t \t\n }",
"public function restored(Activity $activity)\n {\n //\n }",
"public function restored(Apartment $apartment)\n {\n //\n }",
"public function restored(Channel $channel)\n {\n //\n }",
"public function restored(Conversation $conversation)\n {\n //\n }",
"public function restored(PurchaseReceipt $purchaseReceipt)\n {\n //\n }",
"public function restored($model)\n {\n $this->whileForcingUpdate(function () use ($model) {\n $this->saved($model);\n });\n }",
"public function restored(Edit $edit)\n {\n //\n }",
"public function restored(ShopBlog $shopBlog)\n {\n //\n }",
"public function after_restore() {\n global $DB;\n\n // Get the blockid.\n $blockid = $this->get_blockid();\n\n // Extract block configdata and update it to point to the new activities\n if ($configdata = $DB->get_field('block_instances', 'configdata', array('id' => $blockid))) {\n\n $config = unserialize(base64_decode($configdata));\n $update = false;\n $types = array('collectpresentations', 'collectworkshops', 'collectsponsoreds',\n 'conference', 'workshops', 'reception', 'publish',\n 'registerdelegates', 'registerpresenters');\n foreach ($types as $type) {\n if ($this->after_restore_fix_cmid($config, $type)) {\n $update = true;\n }\n }\n\n // cache number of sections in this course\n $numsections = self::get_numesctions($this->get_courseid());\n\n $types = array('review', 'revise');\n foreach ($types as $type) {\n if ($this->after_restore_fix_sectionnum($config, $type, $numsections)) {\n $update = true;\n }\n }\n\n if ($update) {\n $configdata = base64_encode(serialize($config));\n $DB->set_field('block_instances', 'configdata', $configdata, array('id' => $blockid));\n }\n }\n }",
"public function beforeRestore() : bool\n\t{\n\t\treturn true;\n\t}",
"public function restored(Subscription $subscription)\n {\n //\n }",
"public function restored(Contract $contract)\n {\n //\n }",
"public function handleTransactionRollback(TransactionRolledBack $event)\n {\n Log::debug('rollback');\n }",
"public function restored(Ticket $ticket)\n {\n //\n }",
"public function restore() {\n self::restoreAll($this->chapterID);\n }",
"public function restored(Media $media)\n {\n //\n }",
"public function updraft_ajaxrestore() {\n\t\t$this->prepare_restore();\n\t\tdie();\n\t}",
"protected function after_restore_course() {\n // Add tool_carcastc related files, no need to maching itemname with itemid.\n $this->add_related_files('tool_carcastc', 'rowfile', 'itemid');\n }",
"public function restored(Leaderboard $leaderboard)\n {\n //\n }",
"public function restore(User $user, Event $event)\n {\n //\n }",
"public function restore(User $user, Event $event)\n {\n //\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Item $item)\n {\n //\n }",
"public function restored(Item $item)\n {\n //\n }",
"public function restored(Gym $gym)\n {\n //\n }",
"public function restored(Post $post)\n {\n $post->recordActivity('restored');\n }",
"public function restore(string $state);",
"public function restored(Credit $credit)\n {\n //\n }",
"public function restoreErrorHandler(): void\n {\n restore_error_handler();\n }",
"public function handle_exit_recovery_mode()\n {\n }",
"public function restored(Student $student)\n {\n //\n }",
"public function restored(Role $role)\n {\n }",
"public function restored(FormPettyCash $formPettyCash)\n {\n //\n }",
"public function restored(CandidacyHistory $candidacyHistory)\n {\n //\n }",
"public function restored(Program $program): void\n {\n ChangeModelStatusEvent::dispatch($program, true);\n // Restore all contents under restored program\n RestoreProgramContentEvent::dispatch($program->getAttribute('id'));\n }",
"public function restored(Candidate $candidate)\n {\n //\n }",
"public function restore_previous_locale()\n {\n }",
"public function restore()\n {\n if ($basketData = $this->session->get(self::BASKET_CART_SESSION_KEY)) {\n static::$cart = unserialize($basketData);\n }\n }",
"public function restoring($artistAlias)\n {\n parent::restoring($artistAlias);\n\n Log::Debug(\"Restoring artist alias\", ['artist alias' => $artistAlias->id, 'artist' => $artistAlias->artist->id]);\n }",
"public function restored(Order $Order)\n {\n //code...\n }",
"public function restoring(Order $Order)\n {\n //code...\n }",
"public function restored(Service $Service)\n {\n //code...\n }",
"public function restored(InDay $inDay)\n {\n //\n }",
"public function restored(Bank $bank)\n {\n //\n }",
"public function restored(TechnicalVendorSchedule $technical_vendor_schedule)\n {\n //\n }",
"public function restored(RideShareTransaction $rideShareTransaction)\n {\n //\n }",
"public function restored(TenderParticipant $tenderParticipant)\n {\n //\n }",
"public function restored(Product $producto)\n {\n //\n }",
"public function restoring(Service $Service)\n {\n //code...\n }",
"public function restored(InterviewQuestion $interviewQuestion): void\n {\n //\n }",
"public function restored(Storage $storage)\n {\n //\n }",
"public function restoreErrorHandler()\n {\n restore_error_handler($this->error_handler);\n }"
] | [
"0.65210575",
"0.61875516",
"0.61613244",
"0.60520685",
"0.60490227",
"0.6048713",
"0.5973947",
"0.59321374",
"0.5862599",
"0.5844413",
"0.5838455",
"0.5788107",
"0.57601583",
"0.57259643",
"0.5720458",
"0.57182884",
"0.571504",
"0.57117707",
"0.5710344",
"0.56973714",
"0.56047803",
"0.55966854",
"0.5595975",
"0.557626",
"0.5562132",
"0.5561985",
"0.5561985",
"0.5545019",
"0.5542328",
"0.5528858",
"0.5524143",
"0.55149007",
"0.5504628",
"0.5504628",
"0.548969",
"0.54811597",
"0.5470313",
"0.54647094",
"0.54365313",
"0.54365313",
"0.54365313",
"0.54365313",
"0.54306185",
"0.5427684",
"0.5426656",
"0.54263055",
"0.5424122",
"0.5421639",
"0.5415274",
"0.5399616",
"0.538072",
"0.5373766",
"0.5357363",
"0.53550625",
"0.5353296",
"0.5350024",
"0.53473485",
"0.5346258",
"0.5334458",
"0.53343916",
"0.5333377",
"0.53315127",
"0.5331466",
"0.53306776",
"0.5327982",
"0.53186053",
"0.53186053",
"0.5318412",
"0.5318412",
"0.5318412",
"0.5305254",
"0.5305254",
"0.52862847",
"0.5279481",
"0.5278809",
"0.52784115",
"0.52781755",
"0.5276139",
"0.5258933",
"0.52542603",
"0.525402",
"0.52413225",
"0.52300006",
"0.5227613",
"0.52238065",
"0.5205678",
"0.52019155",
"0.5201678",
"0.5190936",
"0.5180321",
"0.5177359",
"0.51713043",
"0.51636183",
"0.51479214",
"0.5144054",
"0.51438004",
"0.51358676",
"0.51237047",
"0.5109258",
"0.510076"
] | 0.57256204 | 14 |
Handle the component "force deleted" event. | public function forceDeleted(Component $component): void
{
$this->deleted($component);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function onBeforeDelete();",
"public function onAfterDelete() {\n\t\tif (!$this->owner->ID || self::get_disabled() || self::version_exist($this->owner))\n\t\t\treturn;\n\t\t$this->onAfterDeleteCleaning();\n\t}",
"public function onBeforeDelete() {\r\n\t\tparent::onBeforeDelete();\r\n\t}",
"protected function afterDelete()\r\n {\r\n }",
"public function onAfterDelete();",
"public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }",
"protected function afterDelete()\n {\n }",
"public function onBeforeDelete()\n {\n parent::onBeforeDelete();\n \n $proxied = $this->getProxiedObject();\n \n // Core SS types are decorated so we know we can call this\n $isCoreType = in_array($proxied->getField('ClassName'), $this->acService->ssCoreTypes());\n if($isCoreType && $proxied->canDeleteOnBlockDelete()) {\n $proxied->delete();\n }\n }",
"protected function onDeleted()\n {\n return true;\n }",
"public function _postDelete()\n\t{\n\t\t$this->notifyObservers(__FUNCTION__);\n\t}",
"protected function _preDelete() {}",
"protected function _postDelete() {}",
"protected function _postDelete() {}",
"public function after_delete() {}",
"public function delete($event): void;",
"public function _delete()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }",
"public function deleted() {\n // TODO Implement this\n }",
"public function preDelete() { }",
"public function delete(RegistrationPostDeletedEvent $event): void\n {\n }",
"protected function onDeleting()\n {\n return true;\n }",
"public function forceDelete()\n {\n //\n }",
"function OnBeforeDeleteItem(){\n }",
"protected function beforeDelete()\n {\n }",
"public function onAfterDelete() {\r\n\t\tparent::onAfterDelete();\r\n\t\t$this->zlog('Delete');\r\n\t}",
"public function onDelete(): void\n {\n if ($this->globals->getUpdated() !== (int) $_GET['id']) {\n $this->_entity->delete($_GET['id']);\n $this->globals->setUpdated($_GET['id']);\n $this->globals->unsetAlert();\n }\n }",
"function after_delete() {}",
"protected function preDeleteHook($object) { }",
"function before_delete() {}",
"public function hook_before_delete($id) {\n\n }",
"function OnAfterDeleteItem(){\n }",
"public function _event_before_delete() {\n\t\tstatic::$_delete['roles'] = $this->roles;\n\t}",
"public function onDelete(){\n return false;\n }",
"public function delete() \n {\n DomainWatcher::addDeletedObject($this);\n }",
"public function afterDeleteCommit(): void\n {\n }",
"protected function _predelete() {\n }",
"public function onAfterDelete() {\n\t\tparent::onAfterDelete();\n\n\t\tif($this->isPublished()) {\n\t\t\t$this->doUnpublish();\n\t\t}\n\t}",
"public function hook_before_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_before_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_before_delete($id) {\n\t //Your code here\n\n\t }",
"public function forceDeleted(Dispatch $dispatch)\n {\n //\n }",
"public function forceDelete();",
"public function pre_delete()\r\n\t{\r\n\t\tparent::pre_delete();\r\n\t\t$Change = App::make('Change');\r\n\t\t$Change::where('fmodel', 'GalleryItem')\r\n\t\t\t ->where('fid', $this->id)\r\n\t\t\t ->delete();\r\n\t\t\t \r\n\t\t// Thumbs\r\n\t\t/*if($this->file) {\r\n\t\t\t# Should really check if these are used anywhere else, but no easy way to do that in other modules yet so just leaving them for now\r\n\t\t\t\r\n\t\t\t// Name\r\n\t\t\t$name = basename(public_path().$this->file);\r\n\t\t\t\r\n\t\t\t// Thumbs\r\n\t\t\t$thumbs = Config::get('galleries::thumbs');\r\n\t\t\tforeach($thumbs as $k => $v) {\r\n\t\t\t\tif(file_exists(public_path().$v['path'].$name)) unlink(public_path().$v['path'].$name);\r\n\t\t\t}\r\n\t\t}*/\r\n\t}",
"public function onDelete() : void\n {\n parent::onDelete();\n $this->setRef('from__company_id__to__table__companies__columns__id', null, 'products');\n }",
"public function onBeforeDelete() {\n // Delete all items attached to this order\n foreach($this->Items() as $item) {\n $item->delete();\n }\n\n parent::onBeforeDelete();\n }",
"public function deleted(Component $component): void\n {\n $this->componentService->calculateVendorSummaryData($component);\n }",
"protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, self::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }",
"public function forceDeleted(Vehicle $vehicle)\n {\n //\n }",
"public function on_delete() {\n $this->remove_dir();\n }",
"protected function postDeleteHook($object) { }",
"protected function _afterDeleteCommit()\n {\n parent::_afterDeleteCommit();\n\n /** @var \\Mage_Index_Model_Indexer $indexer */\n $indexer = Mage::getSingleton('index/indexer');\n\n $indexer->processEntityAction($this, $this::ENTITY, Mage_Index_Model_Event::TYPE_DELETE);\n }",
"public function hook_after_delete($id) {\n\n }",
"protected function _postDelete()\n\t{\n\t}",
"public function beforeDelete($event){\r\n $owner = $this->getOwner();\r\n //Ok he has the right to do that - remove all the ACL-objects associated with this object\r\n $class = Strategy::getClass('Aro');\r\n $aro = $class::model()->find('model = :model AND foreign_key = :key', array(':model' => get_class($owner), ':key' => $owner->getPrimaryKey()));\r\n \r\n if(!$aro)\r\n throw new RuntimeException('No associated Aro-Collection!');\r\n \r\n $transaction = Yii::app()->db->beginTransaction();\r\n try{\r\n $suc =$aro->delete()&& parent::beforeDelete($event);\r\n $transaction->commit();\r\n return $suc;\r\n }\r\n catch(Exception $e){\r\n $transaction->rollback();\r\n throw $e;\r\n }\r\n \r\n return parent::beforeDelete($event);\r\n \r\n }",
"public function deleted(Dispatch $dispatch)\n {\n //\n }",
"final public function delete() {\n $db = Database::getInstance();\n $mysqli = $db->getConnection();\n\t\n $sql_query = 'DELETE FROM fresco_costing_component_array WHERE component_id ='.$this->_component_id;\n \n $result = $mysqli->query($sql_query);\n if (!$result) {\n trigger_error('Unable to delete from database : SQL query : ' . $sql_query);\n }\n\treturn;\n }",
"public function deleted(EntryInterface $entry)\n {\n //$this->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }",
"private function course_content_deleted($event) {\n global $DB;\n $courseid = $event->courseid;\n $DB->delete_records('repository_gdrive_references', array('courseid' => $courseid));\n }",
"function onDelete()\n\t{\n\t\treturn $this->getLookupTable()->deleteKey($this->getValue());\n\t}",
"function ondelete(){\n\t\treturn true;\n\t}",
"public function forceDeleted(Article $article)\n {\n //\n }",
"protected function _postDelete()\n\t{\n\t\t//register events\n\t\t\\Base\\Event::trigger('user.delete',$this->id);\n\t\t//end events\n\t}",
"public function preDelete($event)\n {\n $chainItem = new ChainItem();\n $chainItem->updateVarnish($this->id);\n $chainItem->free(true);\n }",
"public function onFieldDeleted($button) {}",
"public function hook_after_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_after_delete($id) {\n\t //Your code here\n\n\t }",
"public function hook_after_delete($id) {\n\t //Your code here\n\n\t }",
"public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}",
"protected function handleDoDelete() {\n\t\t\tif ($this->verifyRequest('DELETE') && $this->verifyParams()) {\n\t\t\t\tif ($this->blnAuthenticated) {\n\t\t\t\t\tif ($intEventId = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3))) {\n\t\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\t\tif ($objUserEvent->loadById($intEventId) && $objUserEvent->count()) {\n\t\t\t\t\t\t\tif ($objUserEvent->current()->get('userid') == AppRegistry::get('UserLogin')->getUserId()) {\n\t\t\t\t\t\t\t\tif ($objUserEvent->destroy()) {\n\t\t\t\t\t\t\t\t\tCoreAlert::alert('The event was deleted successfully.');\n\t\t\t\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\t\t\t\t$this->intStatusCode = 200;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error deleting the event'));\n\t\t\t\t\t\t\t\t\t$this->error(400);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Invalid event permissions'));\n\t\t\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t\t$this->error(400);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing event ID'));\n\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid authentication'));\n\t\t\t\t\t$this->error(401);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}",
"public function hook_before_delete($id)\n\t{\n\t\t//Your code here\n\n\t}",
"public function deleted(EntryInterface $entry)\n {\n if (!$entry->isForceDeleting()) {\n event(new UserWasDeleted($entry));\n }\n\n parent::deleted($entry);\n }",
"function preDelete()\n {\n }",
"public function onRemove();",
"public function forceDeleted(Document $document)\n {\n //\n }",
"function OnDeleteItem(){\n if (! $this->error) {\n $data = array($this->key_field => $this->item_id);\n if (strlen($this->host_library_ID)) {\n $this->library_ID = $this->host_library_ID;\n }\n\n if ($this->disabled_delete) {\n $this->OnAfterError();\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE[]=LIBRARY_DISABLED_DELETE\" . \"&\" . $this->restore);\n }\n $errors = $this->HasChildNodes(array($this->item_id));\n if (! strlen($errors)) {\n $this->OnBeforeDeleteItem();\n $this->Storage->Delete($data);\n $this->DeleteNotOrdinaryFields();\n $this->OnAfterDeleteItem();\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"&MESSAGE=MSG_ITEM_DELETED\" . \"&\" . $this->restore);\n }\n else {\n $this->OnAfterError();\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"\" . $errors . \"\" . \"&\" . $this->restore);\n }\n }\n }",
"public function delete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'component', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$component = $this->podb->from('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'))->limit(1)->fetch();\n\t\t\t$componentType = $component['type'];\n\t\t\tif ($componentType == 'component') {\n\t\t\t\t$folderinstall = 'component';\n\t\t\t} else {\n\t\t\t\t$folderinstall = 'widget';\n\t\t\t}\n\t\t\tif (file_exists('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component'].'/uninstall.php')) {\n\t\t\t\theader('location:admin.php?mod=component&act=uninstall&folder='.$component['component']);\n\t\t\t} else {\n\t\t\t\t$delete_dir = new PoDirectory();\n\t\t\t\tif ($component['active'] == 'Y') {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/'.$component['component']);\n\t\t\t\t} else {\n\t\t\t\t\t$delete_folder = $delete_dir->deleteDir('../'.DIR_CON.'/'.$folderinstall.'/_'.$component['component']);\n\t\t\t\t}\n\t\t\t\tif ($delete_folder) {\n\t\t\t\t\t$query = $this->podb->deleteFrom('component')->where('id_component', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t\t$this->poflash->success($GLOBALS['_']['component_message_2'], 'admin.php?mod=component');\n\t\t\t\t} else {\n\t\t\t\t\t$this->poflash->error($GLOBALS['_']['component_message_4'], 'admin.php?mod=component');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function forceDeleted(Installment $installment)\n {\n //\n }",
"public function forceDeleted(Channel $channel)\n {\n //\n }",
"public function forceDeleted(Channel $channel)\n {\n //\n }",
"protected function MetaAfterDelete() {\n\t\t}",
"public static function onAfterDelete(Main\\Event $event)\n\t{\n\t\t$reservationId = (int)$event->getParameter('id')['ID'];\n\t\tif ($reservationId > 0)\n\t\t{\n\t\t\tself::deleteProductReservationMap($reservationId);\n\t\t}\n\t}",
"public function onBeforeDelete(&$oid)\n\t{\n\t\t$joins = array(\n\t\t\tarray(\n\t\t\t\t'label' => 'version',\n\t\t\t\t'name' => '#__ars_releases',\n\t\t\t\t'idfield' => 'id',\n\t\t\t\t'idalias' => 'rel_id',\n\t\t\t\t'joinfield' => 'category_id'\n\t\t\t)\n\t\t);\n\n\t\t$this->canDelete($oid, $joins);\n\t}",
"public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}",
"public function beforeDelete(): void\n {\n switch ($this->deletionType) {\n case self::DELETION_TYPE_1:\n $this->deletionType1();\n break;\n case self::DELETION_TYPE_0:\n default:\n $this->deletionType0();\n break;\n }\n }",
"public function forceDeleted(Exchange $exchange)\n {\n //\n }",
"public function forceDeleted(Contact $contact)\n {\n //\n }",
"public function forceDeleted(Contact $contact)\n {\n //\n }",
"public function onAfterDelete()\n {\n if (!$this->owner->ID) {\n return;\n }\n\n // Force SearchUpdater to mark this record as dirty\n // Note: Some extensions require entire hierarchy passed to augmentWrite()\n $manipulation = array();\n foreach (ClassInfo::ancestry($this->owner) as $class) {\n if (!is_subclass_of($class, DataObject::class)) {\n continue;\n }\n\n $tableName = DataObject::getSchema()->tableName($class);\n $manipulation[$tableName] = array(\n 'fields' => array(),\n 'id' => $this->owner->ID,\n 'class' => $class,\n // Note: 'delete' command not actually handled by manipulations,\n // but added so that SearchUpdater can detect the deletion\n 'command' => 'delete'\n );\n }\n\n $this->owner->extend('augmentWrite', $manipulation);\n\n SearchUpdater::handle_manipulation($manipulation);\n }",
"public function delete() {\n\t\t$this->deleted = true;\n\t}",
"public function onAfterDelete() {\n parent::onAfterDelete();\n\n foreach ($this->Items() as $item) {\n $item->delete();\n }\n }",
"public function onAfterDelete() {\n if (!($this->owner instanceof \\SiteTree))\n {\n $this->doDeleteDocumentIfInSearch();\n }\n }",
"public function deleted(EntryInterface $entry)\n {\n $this->commands->dispatch(new DeleteStream($entry));\n\n parent::deleted($entry);\n }",
"public function delete(): void\n {\n $this->instances->demo()->runHook($this->root(), 'delete:before', $this);\n\n Dir::remove($this->root());\n $this->instances->delete($this->id);\n\n $this->instances->demo()->runHook($this->root(), 'delete:after', $this);\n }",
"public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }",
"public function forceDeleted(Candidate $candidate)\n {\n //\n }",
"public function handleDeleted(Deleted $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }",
"function onBeforeDeleteField(&$field, &$item) {\n\t}",
"public function forceDeleted(Contract $contract)\n {\n //\n }",
"protected function afterDelete()\n {\n parent::afterDelete();\n //Comment::model()->deleteAll('post_id='.$this->id);\n VideoTag::model()->updateFrequency($this->tags, '');\n }",
"protected function afterDelete()\n\t{\n\t\tparent::afterDelete();\n\t\tComment::model()->deleteAll('photo_id='.$this->id);\n\t\tTag::model()->updateFrequency($this->tags, '');\n\t}",
"public static function forceDeleted($callback)\n {\n static::registerModelEvent('forceDeleted', $callback);\n }"
] | [
"0.7080198",
"0.68940115",
"0.67980456",
"0.6640968",
"0.6623612",
"0.66043544",
"0.6597772",
"0.65896666",
"0.65551203",
"0.64782083",
"0.64726335",
"0.6470392",
"0.6469977",
"0.6433294",
"0.63960475",
"0.6381471",
"0.6332204",
"0.6326768",
"0.63226116",
"0.63216555",
"0.6317936",
"0.6302424",
"0.62855613",
"0.62586087",
"0.6255922",
"0.62524456",
"0.6250785",
"0.62507486",
"0.622687",
"0.6208084",
"0.6185009",
"0.6156474",
"0.61446184",
"0.6140705",
"0.6122343",
"0.6120996",
"0.6119613",
"0.6119613",
"0.6119613",
"0.6106405",
"0.61020666",
"0.61003464",
"0.60947114",
"0.6094567",
"0.608152",
"0.60647756",
"0.60635394",
"0.6057342",
"0.60545206",
"0.60469276",
"0.60409474",
"0.60364604",
"0.60348034",
"0.6034456",
"0.60208553",
"0.60189235",
"0.60166115",
"0.60089797",
"0.600127",
"0.59912586",
"0.59846216",
"0.5981352",
"0.59458786",
"0.59304035",
"0.59304035",
"0.59304035",
"0.592551",
"0.5920234",
"0.5916191",
"0.59035045",
"0.5900239",
"0.5890566",
"0.5883698",
"0.588325",
"0.58751625",
"0.5872548",
"0.5868972",
"0.5868972",
"0.58664465",
"0.5861183",
"0.5860954",
"0.58578366",
"0.5850711",
"0.58424515",
"0.58370006",
"0.58370006",
"0.5836052",
"0.58338904",
"0.582811",
"0.5827041",
"0.58267695",
"0.5813369",
"0.5812611",
"0.5809112",
"0.58054864",
"0.57956386",
"0.5795031",
"0.57943153",
"0.57848185",
"0.57832193"
] | 0.69639486 | 1 |
How to delete more than one data at a time. | function deleteUserDB($id){
$data = User::find($id);
session()->flash('deleteUser',$data['username']);
$data->delete();
return redirect('user/rabin?age=20');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeleteBatch()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testDelete_Multi()\n {\n \t$this->conn->delete('test', array('status'=>'ACTIVE'), DB::MULTIPLE_ROWS);\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertEquals(array(3, 'three', 'another row', 'PASSIVE'), $result->fetchOrdered());\n \t$this->assertNull($result->fetchOrdered());\n }",
"abstract public function deleteAll();",
"function multi_delete () {\n\t\t$ids_to_delete = array();\n\t\t// Prepare ids to delete\n\t\tforeach ((array)$_POST[\"items\"] as $_cur_id) {\n\t\t\tif (empty($_cur_id)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$ids_to_delete[$_cur_id] = $_cur_id;\n\t\t}\n\t\t// Do delete ids\n\t\tif (!empty($ids_to_delete)) {\n\t\t\tdb()->query(\"DELETE FROM \".db('search_keywords').\" WHERE id IN(\".implode(\",\",$ids_to_delete).\")\");\n\t\t}\n\t\t// Return user back\n\t\treturn js_redirect($_SERVER[\"HTTP_REFERER\"]);\n\t}",
"public function batch_delete($data)\n {\n $required = array(\n 'ids' => 'IDs not passed',\n );\n $this->di['validator']->checkRequiredParamsForArray($required, $data);\n\n foreach ($data['ids'] as $id) {\n $this->delete(array('id' => $id));\n }\n\n return true;\n }",
"public function deleteAll();",
"public function deleteAll();",
"public function deleteAll();",
"public function multidelete_data($data)\n\t{\n\t\t$query = \"DELETE FROM tb_users WHERE id IN ($data[0])\";\n\t\tDB::connect()->query($query)->vars($data[1])->exec();\n\t}",
"public function deleteAll(): void;",
"function delete() {\t\t$nop = str_repeat(\" \", $this -> size);\n\t\t//10 caratteri per diecimila\n\t\tshmop_write($this -> id, $nop, 0);\n\n\t}",
"function deleteData()\n{\n global $myDataGrid;\n global $f;\n global $tbl;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n }\n if ($tbl->deleteMultiple($arrKeys)) {\n $myDataGrid->message = $tbl->strMessage;\n $f->setValues('step', getDataListRecruitmentProcessTypeStep(null, true));\n } else {\n $myDataGrid->errorMessage = \"Failed to delete data \" . $tbl->strEntityName;\n }\n}",
"public function multidelete()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'detailfasilitaskesehatan', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$totaldata = $this->postring->valid($_POST['totaldata'], 'xss');\n\t\t\tif ($totaldata != \"0\") {\n\t\t\t\t$items = $_POST['item'];\n\t\t\t\tforeach($items as $item){\n\t\t\t\t\t$query = $this->podb->deleteFrom('detailfasilitaskesehatan')->where('id', $this->postring->valid($item['deldata'], 'sql'));\n\t\t\t\t\t$query->execute();\n\t\t\t\t}\n\t\t\t\t$this->poflash->success('Detailfasilitaskesehatan has been successfully deleted', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t\t} else {\n\t\t\t\t$this->poflash->error('Error deleted detailfasilitaskesehatan data', 'admin.php?mod=detailfasilitaskesehatan');\n\t\t\t}\n\t\t}\n\t}",
"public function delete(){\r\n $rsid_array = $this -> uri -> segment_array();\r\n\r\n foreach ($rsid_array as $key => $value) {\r\n \r\n //If the key is greater than 2 i.e is one of the the ids\r\n if ($key > 2) {\r\n\r\n //Run delete\r\n $this -> db -> delete('refSubs', array('id' => $value));\r\n\r\n } \r\n }\r\n\r\n }",
"public function multiDeleteAction() {\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n //DELETE OFFERS FROM DATABASE AND SCRIBD\n $offer_id = (int) $value;\n\t\t\t\t\tEngine_Api::_()->sitestoreoffer()->deleteContent($offer_id);\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }",
"function batch_delete($datas)\n\t{\n\t\t$ci = &get_instance();\n\t\t$ci->db->trans_strict(TRUE);\n\t\t$ci->db->trans_start();\n\n\t\tif (IS_LOCAL) $ci->load->helper('logger');\n\n\t\tforeach($datas as $table => $condition) {\n\t\t\t$ci->db->delete($table, $condition);\n\n\t\t\tif (IS_LOCAL)\tlogme('DELETE_QUERY', 'info', $ci->db->last_query());\n\t\t}\n\n\t\t$ci->db->trans_complete();\n\t\tif ($ci->db->trans_status() === FALSE)\n\t\t{\n\t\t\tif (IS_LOCAL)\tlogme('ERROR_QUERY', 'info', 'Database Error: '.$ci->db->error()['message']);\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_commit_data')]];\n\t\t}\n\n\t\treturn [TRUE, NULL];\n\t}",
"public function action_multi(){\n $ids = Arr::get($_POST, 'operate');\n if(isset($_POST['delete_all']) && count($ids)){\n $count = DB::delete( ORM::factory('BoardAbuse')->table_name() )->where('id', 'IN', $ids)->execute();\n Flash::success(__('All abuses (:count) was successfully deleted', array(':count'=>count($count) )));\n }\n $this->redirect('admin/boardAbuses' . URL::query());\n\n }",
"public function do_batch() {\n\t\t$post_ids = array_map( 'intval', $this->get_post_ids() );\n\t\tforeach( $post_ids as $post_to_delete ) {\n\t\t\tadd_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t\twp_delete_post( $post_to_delete, true );\n\t\t\tremove_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t}\n\n\t\t$this->deleted_posts = count( $post_ids );\n\t}",
"public function multi_delete(Request $request)\n {\n if (count($request->selected_data)) {\n foreach ($request->selected_data as $id) {\n $this->destroy($id, false);\n }\n session()->flash('success', trans('main.deleted-message'));\n return redirect()->route('posts.index');\n }\n }",
"public function multi_destroy()\n {\n\n if (is_array(request('item'))) {\n Admin::destroy(request('item'));\n } else {\n Admin::find(request('item'))->delete();\n }\n session()->flash('success', 'The records have been deleted successfully');\n return redirect(aurl('news'));\n }",
"public function actionDeleteMultiple()\n {\n $request = Yii::$app->request;\n Yii::$app->response->format = Response::FORMAT_JSON;\n $js = $request->post('js');\n $jk = $request->post('jk');\n\n $mata_kuliah_tayang = MataKuliahTayang::find()\n ->joinWith('refCpmks')\n ->where([MataKuliahTayang::tableName() . '.id' => $jk])\n ->all();\n // $count = count($mata_kuliah_tayang[0]['refCpmks']);\n\n foreach ($js as $id_mahasiswa) {\n foreach ($mata_kuliah_tayang as $key => $value) {\n foreach ($value['refCpmks'] as $key => $value) {\n CapaianMahasiswa::deleteAll(['id_ref_mahasiswa' => $id_mahasiswa, 'id_ref_cpmk' => $value->id]);\n }\n }\n }\n }",
"public function multiDelete()\n {\n if(is_array(request()->item)){\n foreach (request()->item as $id) {\n $tradmark = Tradmark::findOrfail($id);\n Storage::delete($tradmark->logo);\n $tradmark->delete();\n }\n\n }else{\n $tradmark = Tradmark::findOrfail(request('item'));\n Storage::delete($tradmark->logo);\n $tradmark->delete();\n }\n\n session()->flash('success', trans('admin.deleted_successfully'));\n return redirect(route('admin.tradmarks.index'));\n }",
"public function fulldelete() {\n if ($this->id && !$this->elements) {\n $this->elements = self::get_instances(array('setid' => $this->id));\n }\n\n foreach ($this->elements as $elm) {\n $elm->delete();\n }\n\n parent::delete();\n }",
"public function delall()\n {\n }",
"public function multi_delete(Request $request)\n {\n if (count($request->selected_data)) {\n foreach ($request->selected_data as $id) {\n $this->destroy($id, false);\n }\n session()->flash('success', trans('main.deleted-message'));\n return redirect()->route('courses_details.index');\n }\n }",
"public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('list_listing', (int) $value)->delete();\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }",
"function deleteMulti($keys, $time=0) {\n return $this->memcached->deleteMulti($keys, $time);\n }",
"function seminars_delete_multiple($sids, $delete_categories = FALSE, $delete_masters = FALSE) {\n\n foreach($sids as $sid)\n seminars_delete($sid, $delete_categories, $delete_masters);\n \n}",
"public function mutipleDelete(Request $request)\n {\n foreach($request->all() as $product){\n Product::find($product['id'])->delete();\n }\n }",
"public function testDeleteMultipleKeyValuePairsAtOnce(): void\n {\n $arr = array();\n $records = rand(220, 370);\n for ($i=0; $i <= $records; $i++) {\n $key = 'KeyNumber-' . $i;\n $val = 'ValueNumber-' . $i;\n $arr[$key] = $val;\n }\n $start = count($arr);\n $this->testNotStrict->setMultiple($arr);\n\n $del = array();\n $n = rand(75, 167);\n $max = $records - 5;\n for ($i=0; $i<$n; $i++) {\n $key = 'KeyNumber-' . rand(5, $max);\n if (! in_array($key, $del)) {\n $del[] = $key;\n }\n }\n $delcount = count($del);\n $expected = $start - $delcount;\n $this->testNotStrict->deleteMultiple($del);\n $hits = 0;\n for ($i=0; $i<= $records; $i++) {\n $key = 'KeyNumber-' . $i;\n if ($this->testNotStrict->has($key)) {\n $hits++;\n }\n }\n $this->assertEquals($expected, $hits);\n }",
"public function delete($ids){\n \n $filter = $this->primaryFilter; \n $ids = ! is_array($ids) ? array($ids) : $ids;\n \n foreach ($ids as $id) {\n $id = $filter($id);\n if ($id) {\n $this->db->where($this->primary_key, $id)->limit(1)->delete($this->table_name);\n }\n }\n }",
"public function deleteMultiple( $keys )\n\t{\n\t\t$this->getObject()->deleteMultiple( $keys );\n\t}",
"public function actionBatchDelete() {\n if (($ids = Yii::$app->request->post('ids')) !== null) {\n $models = $this->findModelAll($ids);\n foreach ($models as $model) {\n $model->delete();\n }\n return $this->redirect(['index']);\n } else {\n throw new HttpException(400);\n }\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 deleteMultipleEntriesAction()\n {\n $personsToDelete = $this->request->getArguments()['personsToDelete'];\n $this->personRepository->deleteMultipleEntries($personsToDelete);\n $this->redirect('list');\n }",
"public function multi_delete(Request $request)\n {\n if (count($request->selected_data)) {\n foreach ($request->selected_data as $id) {\n $this->destroy($id, false);\n }\n session()->flash('success', trans('main.deleted-message'));\n return redirect()->route('classes.index');\n }\n }",
"protected function entityDeleteMultiple($ids) {\n waywire_video_delete_multiple($ids);\n }",
"static public function deleteMultiple($ids) {\n return entity_delete_multiple('nuntius_room', $ids);\n }",
"function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n $arrKeys2['id_absence'][] = $strValue;\n }\n $tblAbsence = new cHrdAbsence();\n $tblAbsenceDetail = new cHrdAbsenceDetail();\n $tblAbsence->deleteMultiple($arrKeys);\n $tblAbsenceDetail->deleteMultiple($arrKeys2);\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, implode(\",\", $arrKeys2['id_absence']));\n $myDataGrid->message = $tblAbsence->strMessage;\n}",
"public function deleteMultipleById(array $ids) : int\n {\n }",
"public function deletion($data, Model $model)\n { \n $this->table = $model->table;\n\n foreach($data as $record) {\n $this->unsetQuery();\n $this->delete('message_id = ?', [$record]);\n }\n }",
"public function bulk_delete(Request $request){\n $this->isAuthorize();\n\n // Delete the Data\n $userID = $this->request->session()->get('userID');\n $ids = $request->ids;\n DB::table(\"apt_time_slots\")->where('userID','=',$userID)->whereIn('id',explode(\",\",$ids))->delete();\n return response()->json(['success'=>\"Deleted successfully.\"]);\n }",
"function deleteData()\n{\n global $myDataGrid;\n $arrKeys = [];\n foreach ($myDataGrid->checkboxes as $strValue) {\n $arrKeys['id'][] = $strValue;\n $arrKeys2['id_evaluation'][] = $strValue;\n }\n $tblHrdEvaluationMaster = new cHrdEvaluationMaster();\n $tblHrdEvaluationDetail = new cHrdEvaluationDetail();\n $tblHrdEvaluationMaster->deleteMultiple($arrKeys);\n $tblHrdEvaluationDetail->deleteMultiple($arrKeys2);\n $myDataGrid->message = $tblHrdEvaluationDetail->strMessage;\n}",
"public function deleteMultiple(Request $request)\n {\n $ids = explode(\",\", $request->ids);\n\n foreach ($ids as $key => $id) {\n $product = Product::with('categories', 'tags', 'attributes')->find($id);\n if (!empty($product)) {\n if (count($product->categories) > 0) {\n foreach ($product->categories as $category) {\n if ($category->total_products > 0) {\n $category->decrement('total_products');\n }\n }\n }\n if (count($product->tags) > 0) {\n foreach ($product->tags as $tag) {\n if ($tag->total_products > 0) {\n $tag->decrement('total_products');\n }\n }\n }\n\n $product->attributes()->detach();\n $product->categories()->detach();\n $this->removeThisCache($product->slug, $product->id);\n\n if ($product->delete() > 0) {\n// return response(1);\n }\n }\n// return response(0);\n }\n return response()->json(['success' => \"Products Multi Deleted successfully.\"]);\n\n }",
"public function deleteAllForKey()\n\t{\n\t\t$keys = $this->getAllKeys();\n return parent::deleteMulti($keys);\n\t}",
"protected function _deleteMultiple($data,$action,$target,$condition){\n\t\tif(URequest::isPost()){\n\t\t\tif(is_callable($condition)){\n\t\t\t\t$condition=$condition($data);\n\t\t\t}\n\t\t\t$rep=DAO::deleteAll($this->model, $condition);\n\t\t\tif($rep){\n\t\t\t\t$message=new CRUDMessage(\"Deleting {count} objects\",\"Deletion\",\"info\",\"info circle\",4000);\n\t\t\t\t$message=$this->_getEvents()->onSuccessDeleteMultipleMessage($message,$rep);\n\t\t\t\t$message->parseContent([\"count\"=>$rep]);\n\t\t\t}\n\t\t\tif(isset($message)){\n\t\t\t\t$this->_showSimpleMessage($message,\"delete-all\");\n\t\t\t}\n\t\t\t$this->index();\n\t\t}else{\n\t\t\t$message=new CRUDMessage(\"Do you confirm the deletion of this objects?\", \"Remove confirmation\",\"error\");\n\t\t\t$this->_getEvents()->onConfDeleteMultipleMessage($message,$data);\n\t\t\t$message=$this->_showConfMessage($message, $this->_getBaseRoute() . \"/{$action}/{$data}\",$target, $data,[\"jqueryDone\"=>\"replaceWith\"]);\n\t\t\techo $message;\n\t\t\techo $this->jquery->compile($this->view);\n\t\t}\n\t}",
"public function multipleDelete(Request $request)\n {\n $user = \\Auth::user();\n $permission = new Permission();\n if ($user->can('delete', $permission)) {\n try {\n $data_ids = $_REQUEST['data_ids'];\n $data_id_array = explode(\",\", $data_ids);\n \n if ($this->permission->delete($data_id_array)) {\n return \"successfully deleted\";\n } else {\n return \"Permission cannot be deleted.\";\n }\n } catch (Exception $e) {\n return $e;\n }\n } else {\n return view('errors.401');\n }\n }",
"function deleteMultipleData($tableName,$ids,$fieldName,$flag=SOFT_DELETE){\t\t\r\n\t\tif(!isset($ids) || $ids==''){\r\n\t\t\treturn FALSE;\r\n\t\t}else{\r\n\t\t\tif(isset($tableName)&& trim($tableName)!='' && $fieldName!=''){\r\n\t\t\t\tif($flag==SOFT_DELETE){\r\n\t \t\t\t $query=\"UPDATE \".$tableName.\" SET \".COND_IS_DELETED_TRUE .\" WHERE \". $fieldName .\" IN(\".$ids.\")\";\r\n\t\t\t\t}\r\n\t\t\t\tif($flag==HARD_DELETE){\r\n\t\t\t\t\t$query=\"DELETE FROM \".$tableName.\" WHERE \".$fieldName.\" IN(\".$ids.\")\";\r\n\t\t\t\t}\r\n\t\t\t\treturn mysql_query($query); \r\n\t\t\t}\r\n\t \t}\r\n\t }",
"public function destroyMultiple(Request $request)\n { \n $post = $request->all();\n \n // $CommonController = new CommonController;\n // $access = $CommonController->checkFunctionPermission($this->permision,$this->className,$this->methodName);\n // if(empty($access)){ \n // Session::flash('error', 'You do not have permission to access this page!.'); \n // return Redirect::to('cms/dashboard');\n // }\n \n if(empty($post)){ \n Session::flash('error', trans('common.invalidToken')); \n return Redirect::to('cms/family');\n \n }\n \n \n \n \n $deleted_at = date(\"Y-m-d H:i:s\");\n $data = array('stat-nw' => 'unPublish');\n \n DB::table('familiestatuut')->whereIn('id', $post['ids'])->delete(); \n Session::flash('success', trans('common.deletedSuccesfully'));\n \n return 1;\n \n Session::flash('error', trans('common.invalidToken')); \n return 0; \n \n \n }",
"function delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$data = safePostGetVar('id');\n\t\t\t$promotion = new Promotion();\n\t\t\tforeach ($data as $id)\n\t\t\t{\n\t\t\t\t$promotion->id = $id;\n\t\t\t\t$promotion->delete();\n\t\t\t}\n\t\t\techo \"ok\";\n\n\t\t}catch (Exception $ex)\n\t\t{\n\t\t\tprint_r($ex->getMessage());\n\t\t}\n\t}",
"protected function entityDeleteMultiple($fids) {\n $files = file_load_multiple($fids);\n foreach ($files as $file) {\n file_delete($file);\n }\n }",
"public function delMultiple($key)\n {\n return $this->doDelete($key);\n }",
"public static function deleteAll() {\n // Initiate implicit tx if explicit one doesn't exist\n $is_implicit_tx = false;\n if (self::$numTransactions == 0) {\n $is_implicit_tx = true; \n self::beginTx();\n }\n\n // Fail because 'databaseHandle' wasn't initialized by 'beginTx()' \n assert(isset(self::$databaseHandle));\n\n try {\n $sql_records = static::fetchAll();\n foreach ($sql_records as $record) {\n $record->delete();\n } \n } catch (PDOException $e) {\n self::$databaseHandle->rollback();\n die(\"\\nERROR: \" . $e->getMessage() . \"\\n\");\n }\n\n // Close implicit tx\n if ($is_implicit_tx) {\n self::endTx();\n }\n }",
"public function actionBulkDelete() {\n\n if (Yii::$app->request->post('selection')) {\n $where = ['id' => Yii::$app->request->post('selection', []), 'sender_id' => Yii::$app->user->identity->id, 'status_del' => $this->modelClass::STATUS_DEL_TRASH];\n $this->modelClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_DELETE, 'deleted_at' => time()], $where);\n\n $whereVia = ['mailbox_id' => Yii::$app->request->post('selection', []), 'receiver_id' => Yii::$app->user->identity->id, 'status_del' => $this->modelClass::STATUS_DEL_TRASH];\n $this->modelViaClass::updateAll(['status_del' => $this->modelClass::STATUS_DEL_DELETE, 'deleted_at' => time()], $whereVia);\n }\n }",
"public function delete() \n {\n $model = $this->model;\n $input = Input::all(); \n \n $arrayIdDelete = $input[$model::getPrimaryKey()];\n \n $result = array();\n foreach ($arrayIdDelete as $id) {\n $singleResult = $this->deleteSingleObject($id);\n $result[] = $singleResult;\n }\n \n return $jsend = JSend\\JSendResponse::success($result);\n }",
"public function delete()\n {\n return $this->query->batchDelete($this->filter);\n }",
"function deleteAllData() {\n $successObservers = $this->databaseDeleteRecord($this->tableObservers, NULL);\n $successActions = $this->databaseDeleteRecord($this->tableActions, NULL);\n $successGroups = $this->databaseDeleteRecord($this->tableGroups, NULL);\n if ($successObservers !== FALSE && $successActions !== FALSE && $successGroups !== FALSE) {\n return TRUE;\n }\n return FALSE;\n }",
"function delete() ;",
"function delete() ;",
"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 }",
"abstract public function delete();",
"abstract public function delete();",
"abstract public function delete();",
"abstract public function delete();",
"function delete() {\n\t\tglobal $DB_LINK, $db_table_recipes, $db_table_list_recipes, $db_table_related_recipes, $db_table_ingredientmaps, $db_table_reviews,\n\t\t\t$db_table_ratings, $db_table_mealplans, $db_table_favorites;\n\n\t\t$sql = \"DELETE from $db_table_recipes WHERE recipe_id=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\n\t\t$sql = \"DELETE from $db_table_list_recipes WHERE list_rp_recipe=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\n\t\t$sql = \"DELETE from $db_table_related_recipes WHERE related_parent=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\n\t\t$sql = \"DELETE from $db_table_ingredientmaps WHERE map_recipe=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\n\t\t$sql = \"DELETE from $db_table_reviews WHERE review_recipe=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\n\t\t$sql = \"DELETE from $db_table_ratings WHERE rating_recipe=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\n\t\t$sql = \"DELETE from $db_table_mealplans WHERE mplan_recipe=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\n\t\t$sql = \"DELETE from $db_table_favorites WHERE favorite_recipe=?\";\n\t\t$stmt = $DB_LINK->Prepare($sql);\n\t\t$rc = $DB_LINK->Execute($stmt, array($this->id));\n\t\tDBUtils::checkResult($rc, NULL, NULL, $sql);\n\t}",
"private function deleteRecords(){\r\n\t\r\n\t\t$fileNames = explode(',', $this->collection['images']);\r\n\t\t// remove imagerecords which are not used anymore\r\n\t\tforeach($this->images as $filename => $image){\r\n\t\t\tif(array_search($filename, $fileNames) === false){\r\n\t\t\r\n\t\t\t\t$this->db->exec_DELETEquery('tx_gorillary_images', \"image='$filename' AND collection='\".$this->collection['uid'].\"'\");\r\n\t\t\t\t//unset ($this->images[$filename]);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function delete($id, $next);",
"public function delete(array $ids);",
"function deleteData($db)\n{\n global $_REQUEST;\n $i = 0;\n foreach ($_REQUEST as $strIndex => $strValue) {\n if (substr($strIndex, 0, 15) == 'chkManagementID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_management WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['management_code'];\n $strSQL = \"DELETE FROM hrd_division WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_department WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_section WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE management_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_management WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n if (substr($strIndex, 0, 13) == 'chkDivisionID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_division WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['division_code'];\n $strSQL = \"DELETE FROM hrd_department WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_section WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE division_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_division WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n if (substr($strIndex, 0, 5) == 'chkID') {\n // cari dulu data Department code\n $strSQL = \"SELECT * FROM hrd_department WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['department_code'];\n $strSQL = \"DELETE FROM hrd_section WHERE department_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n $strSQL = \"DELETE FROM hrd_sub_section WHERE department_code = '$strCode' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_department WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n } else if (substr($strIndex, 0, 12) == 'chkSectionID') { // hapus section\n // cari dulu data section code\n $strSQL = \"SELECT * FROM hrd_section WHERE id = '$strValue' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['section_code'];\n $strCode1 = $rowDb['department_code'];\n $strSQL = \"DELETE FROM hrd_sub_section WHERE section_code = '$strCode' \";\n $strSQL .= \"AND department_code = '$strCode1' \";\n $resExec = $db->execute($strSQL);\n }\n $strSQL = \"DELETE FROM hrd_section WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n } else if (substr($strIndex, 0, 15) == 'chkSubSectionID') { // hapus sub section\n $strSQL = \"DELETE FROM hrd_sub_section WHERE id = '$strValue' \";\n $resExec = $db->execute($strSQL);\n $i++;\n }\n }\n if ($i > 0) {\n writeLog(ACTIVITY_DELETE, MODULE_PAYROLL, \"$i data\", 0);\n }\n}",
"public function testDelete_Again()\n {\n \t$this->conn->delete('test', 1);\n $this->conn->delete('test', array('status'=>'PASSIVE'));\n \t\n \t$result = $this->conn->query(\"SELECT * FROM test\");\n \t$this->assertEquals(array(2, 'two', 'next row', 'ACTIVE'), $result->fetchOrdered());\n \t$this->assertNull($result->fetchOrdered());\n }",
"protected function _after_delete($data, $options)\n {\n// var_dump($data);die;\n foreach ($data['id'][1] as $key=>$val){\n //删除其他表\n $sat = M('SpActivityTicket')->field('activity_id,ticket_id')->where('ticket_id = '.$val)->find();\n $this->deleteTicketStock($sat);\n $this->deleteActivityTicket($sat);\n $this->deleteActivity(['id'=>$sat['activity_id']]);\n }\n\n }",
"public function delete_data_to_tombstone(){\n }",
"public function destroyMultiple(Request $request)\n { \n $post = $request->all();\n \n // $CommonController = new CommonController;\n // $access = $CommonController->checkFunctionPermission($this->permision,$this->className,$this->methodName);\n // if(empty($access)){ \n // Session::flash('error', 'You do not have permission to access this page!.'); \n // return Redirect::to('cms/dashboard');\n // }\n \n if(empty($post)){ \n Session::flash('error', trans('common.invalidToken')); \n return Redirect::to('cms/client_fm');\n \n }\n \n \n \n \n $deleted_at = date(\"Y-m-d H:i:s\");\n $data = array('status' => 'unPublish');\n \n DB::table('klant_fm')->whereIn('id_kl', $post['ids'])->update($data); \n Session::flash('success', trans('common.deletedSuccesfully'));\n \n return 1;\n\n }",
"public function deleteall()\n\t{\n\t\t$ids = $this->input->post('records');\n\t\t$slider_cat = $this->SqlModel->getSingleField('slider_cat','slider',array('slider_id'=>$ids[0]));\n\t\tif(!empty($ids))\n\t\t{\n\t\t\tforeach($ids as $id)\n\t\t\t{\n\t\t\t$this->SqlModel->deleteRecord($this->tblName, array($this->pKey=>$id));\t\n\t\t\t}\n\t\t}\n\t\tredirect(base_url().'manage/'.$this->controller.'/index/deletesuccess/'.$slider_cat,'location');\t\t\n\t\t\n\t}",
"public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n\n }",
"public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post( 'pks' )); // Array or selected records primary keys\n foreach ( $pks as $pk ) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if($request->isAjax){\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose'=>true,'forceReload'=>'#crud-datatable-pjax'];\n }else{\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n\n }",
"protected function entityDeleteMultiple($ids) {\n farm_asset_delete_multiple($ids);\n }",
"static public function deleteMulti($subject, $keys) {\n\t\tforeach($keys as $oneKey)\n\t\t\tself::delete($subject, $oneKey);\n\t}",
"public function delete_all()\n {\n }",
"public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post('pks')); // Array or selected records primary keys\n foreach ($pks as $pk) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if ($request->isAjax) {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose' => true, 'forceReload' => '#crud-datatable-pjax'];\n } else {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }",
"public function actionBulkDelete()\n {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post('pks')); // Array or selected records primary keys\n foreach ($pks as $pk) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if ($request->isAjax) {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose' => true, 'forceReload' => '#crud-datatable-pjax'];\n } else {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }",
"function deleteall() {\n\t\t$this->_query( \"DELETE FROM $0\" );\n\t}",
"public function actionBulkDelete() {\n $request = Yii::$app->request;\n $pks = explode(',', $request->post('pks')); // Array or selected records primary keys\n foreach ($pks as $pk) {\n $model = $this->findModel($pk);\n $model->delete();\n }\n\n if ($request->isAjax) {\n /*\n * Process for ajax request\n */\n Yii::$app->response->format = Response::FORMAT_JSON;\n return ['forceClose' => true, 'forceReload' => '#crud-datatable-pjax'];\n } else {\n /*\n * Process for non-ajax request\n */\n return $this->redirect(['index']);\n }\n }",
"public static function batchDelete() {\n $result = array();\n $copied = lC_Products_Admin::batchDelete($_GET['batch']);\n if ($copied) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }",
"public static function batchDelete() {\n $result = lC_Weight_classes_Admin::batchDelete($_GET['batch']);\n if (isset($result['namesString']) && $result['namesString'] != null) {\n } else {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }",
"public abstract function delete();",
"function messageDeleteBulk(Collection $messages);"
] | [
"0.6842874",
"0.6816655",
"0.6777981",
"0.6776122",
"0.67141646",
"0.6675214",
"0.6675214",
"0.6675214",
"0.66217214",
"0.659393",
"0.6587396",
"0.655104",
"0.653338",
"0.6532226",
"0.6477395",
"0.64518595",
"0.64196205",
"0.6414078",
"0.6404016",
"0.63721484",
"0.6342676",
"0.63354874",
"0.63234717",
"0.6308394",
"0.63082254",
"0.62971175",
"0.62805015",
"0.6278135",
"0.6277757",
"0.62759525",
"0.62608874",
"0.6252998",
"0.6247243",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.623082",
"0.6227523",
"0.6226459",
"0.6209605",
"0.6195569",
"0.6179803",
"0.6170801",
"0.6168923",
"0.6152467",
"0.61488324",
"0.6145448",
"0.61447376",
"0.61248416",
"0.61237746",
"0.612193",
"0.6120579",
"0.6115456",
"0.6110611",
"0.61045307",
"0.6102986",
"0.6101281",
"0.6089307",
"0.60839933",
"0.6074896",
"0.6073629",
"0.6073629",
"0.60652894",
"0.60650826",
"0.60650826",
"0.60650826",
"0.60650826",
"0.6056486",
"0.60529816",
"0.6048945",
"0.6039309",
"0.60368145",
"0.6032241",
"0.6027362",
"0.6024546",
"0.60076857",
"0.60073155",
"0.6004447",
"0.6004447",
"0.5998172",
"0.59972507",
"0.5990655",
"0.59739053",
"0.59739053",
"0.5970598",
"0.59696424",
"0.5969487",
"0.5966191",
"0.5960788",
"0.59584785"
] | 0.0 | -1 |
return ['name'=>"rabin",'age'=>34]; // api return | public function index_func($user){
echo " Hello from controller ".$user;
$data = ['rabin','sabin',$user];
return view("user",['name'=>$data]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function api() {\n return [\n \"done\" => true,\n \"param\"=> defaultValue(Request::POST(\"test\"), \"test\")\n ]; // You can also use Response::json([...]);\n }",
"function responseApi(Array $req)\n{\n\treturn json_encode(callApiRequest($req));\n}",
"public function getApiData();",
"public function api_call() {\n\n }",
"public function api() {\n return ['xing' => '趣'];\n }",
"public function get(): array\n {\n \n }",
"public function json();",
"function json_hello() {\n\treturn array( 'hello' => 'world' );\n}",
"public function getResponse() : array;",
"public function getResponse(): array;",
"public function GetProfile()\n {\n $data = \n [\n'name'=>Auth::guard('karyawan')->user()->name,\n'email'=>Auth::guard('karyawan')->user()->email,\n'level'=>Auth::guard('karyawan')->user()->level,\n'posisi'=>Auth::guard('karyawan')->user()->posisi,\n'regional'=>Auth::guard('karyawan')->user()->regional,\n'area'=>Auth::guard('karyawan')->user()->area,\n'area2'=>Auth::guard('karyawan')->user()->area2,\n ];\nreturn response()->json($data); \n }",
"public function fromAPI($data);",
"public function index()\n {\n //\n $users = DB::table('users')->select('name', 'lastName')->get();\n\n return response()->json($users);\n\n\n}",
"public function getList()\n {\n\n $apikey = $this->params()->fromHeader('apikey', null);\n\n $query = SampleQuery::create();\n $aaa = $query->find()->toArray();\n\n\n// $apikey->getFieldValue();\n\n return new JsonModel(\n $aaa\n );\n }",
"public function jsonStructureGetProfile()\n {\n return [\n \"result\"=> [\n \"id\",\n \"username\",\n \"full_name\",\n \"gender\",\n \"phone\",\n \"email\",\n \"created_at\",\n \"updated_at\",\n \"deleted_at\",\n ],\n \"code\"\n ];\n }",
"public function apiList();",
"function externalapis()\n\n {\n //get usd rate\n\n\n //koinok value\n $koinok = koinokapi();\n\n //idex\n $idex = idexapi();\n\n //mercatox\n $mercatox = mercatoxapi();\n\n //etherflyer\n $etherflyer = etherflyerapi();\n\n //bancor\n $bancor = bancorapi();\n// echo json_encode($koinok);\n\n $result = array('IDEX'=>$idex,'KOINOK'=>$koinok,'MERCATOX'=>$mercatox,'ETHERFLYER'=>$etherflyer,'BANCOR'=>$bancor);\n echo json_encode($result);\n\n }",
"public function create(): JsonResponse;",
"abstract function getPairsFromAPI();",
"static function returnApiData($result=[])\n {\n //error\n if($result['code'] == 400 && !empty($result)){\n return [];\n //写入日志\n //self::errorReport($result['code'],json_encode($result));\n }\n //success\n if($result['code'] == 200 && !empty($result)){\n return $result['result'];\n }\n\n return [];\n }",
"function apiAction(){\n \t\t$this->view->response = 'ok';\n \t\t$this->view->data = array('title', 'name', 'user');\n \t\tHivli::get('View')->setType('json');\n \t}",
"private function getReturn()\n {\n // Don't return object like this:\n // return [\n // 'user' => [\n // 'id' => auth()->user()->id,\n // 'name' => auth()->user()->name,\n // ]\n // ];\n\n return [\n 'user_id' => auth()->user()->id,\n 'user_name' => auth()->user()->name,\n 'user_image' => auth()->user()->profile_image,\n ];\n }",
"protected function test() \n {\n return\n [\"test\" => \"test\"];\n }",
"public function identity_response($params){\n \t\t$params['organization_id'] \t= 'organization_id';\n \t\t$params['first_name'] \t\t= 'first_name';\n \t\t$params['last_name'] \t\t= 'last_name';\n \t\t$params['display_name'] \t= 'display_name';\n \t\t$params['username'] \t\t= 'username';\n \t\t$params['timezone'] \t\t= 'timezone';\n \t\treturn $params;\n \t}",
"public function getAdminData()\n {\n $pages = Page::first();\n $response['response'] = 200 ; \n $response['about'] = $pages->about ; \n $response['privacy'] = $pages->privacy ; \n $response['faq'] = $pages->faq ; \n $response['email'] = $pages->email ; \n $response['phone'] = $pages->phone ;\n \n echo json_encode($response);\n \n }",
"public function post(): array\n {\n return ['id' => 2];\n }",
"public function post(): array\n {\n return ['id' => 2];\n }",
"abstract function parse_api_response();",
"function getData(){ \n return json_decode($this->data); \n }",
"public function getUserList(){\n $data = User::all();\n $responseArray = [\n 'status'=>'ok',\n 'data'=>$data\n ]; \n return response()->json($responseArray,200);\n }",
"#[Pure]\n public function getResponseData() {}",
"public function get(): array;",
"public function get(): array;",
"function get_city($query,$type)\r\n{\r\nrequire_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&gt;post('city/list', array(\r\n 'query' =&gt; $query,\r\n 'type' =&gt; $type,\r\n 'courier' =&gt; 'jne',\r\n 'API-Key' =&gt; 'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456' ), 'JSON');\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&gt;code == 0)\r\n {\r\n return $cities = $result['cities'];\r\n //print_r($cities);\r\n //foreach ($cities-&gt;item as $item)\r\n //{\r\n //echo 'Kota: ' . $item . '&lt;br /&gt;';\r\n // }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan kota yang diawali &quot;band&quot;';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\r\n }\r\n}",
"public function Get(){\n return $this->json;\n }",
"function api()\n {\n //get jokes\n $f_contents = file(\"controllers/jokes.txt\"); \n $line = $f_contents[rand(0, count($f_contents) - 1)];\n //explode line into array\n $line = explode(\"<>\", $line);\n $arr = array('Joke' => array('Opener' => $line[0], 'Punchline' => trim($line[1]), 'Processing Time' => process_time()));\n status(202); //returns HTTP status code of 202\n return json($arr);\n }",
"public function index()\n\t{\n\t\t// sample data\n\t\t$data = array(\n\t\t\t'kevin',\n\t\t\t'tyler'\n\t\t\t);\n\n\t\t// return as json\n\t\treturn Response::json($data);\n\t}",
"public function & GetResponse ();",
"public function indexActionGet() : array\n {\n $json = [\n \"message\" => \"Use POST with IP-address or placename in body to validate\",\n \"example\" => \"POST /weatherApi/ {'ip': '8.8.8.8', 'placename': 'karlskrona'}\",\n ];\n $page = $this->di->get(\"page\");\n\n $page->add(\"anax/v2/plain/pre\", [\n \"content\" => $json,\n ]);\n return [$json];\n }",
"public function getData(){ \n return json_decode($this->data); \n }",
"public function jsonSerialize() {\n return [\n \"nom\"=> $this->name,\n \"age\"=> $this->age,\n \"film\"=> $this->films\n ];\n }",
"public function getUser()\n {\n // var_dump($request);\n $id = $_GET['id']; \n $contacts = Contacts::where('id', '=', $id)->get();\n // print_r($contacts[0]->name);\n return ['id'=>$contacts[0]->id,'name'=>$contacts[0]->name,'number'=>$contacts[0]->number];\n \n }",
"function api_response($res)\n{\nheader('Content-Type: application/json');\n if(ENABLE_DEBUG)\n {\n exit('<pre>' . print_r(\n $res,true));\n }\n exit(json_encode(\n $res\n ));\n}",
"public function json($data): PsrResponseInterface;",
"public function getAuthDataFromResponse(): array;",
"function getData()\n{\n return array(\n array(\"name\"=>\"Bob\",\"age\"=>50),\n array(\"name\"=>\"Jane\",\"age\"=>41),\n array(\"name\"=>\"Sarah\",\"age\"=>30)\n );\n}",
"public function get_data()\n {\n\n\n }",
"public function get() : array;",
"public function get_data(): array;",
"public function get_data(): array;",
"public function store()\n\t{\n\t\treturn Response::json(Input::get());\n\t}",
"public function getInfo():array;",
"function api_result($result, $id = null) {\n return api_return($result, $id);\n}",
"public function me():ResponseInterface;",
"function api_return($data, $id = null, $ret_mode = 'result') {\n switch ($GLOBALS['api_ret_mode']) {\n case 'jsonrpc2':\n // jsonrpc v2.0 format\n return json_encode([\n 'jsonrpc' => '2.0',\n $ret_mode => $data,\n 'id' => $id\n ]);\n case 'jsonrpc1':\n return json_encode([\n 'result' => ($ret_mode === 'result') ? $data : null,\n 'error' => ($ret_mode === 'error') ? $data : null,\n 'id' => $id\n ]);\n case 'http':\n if($ret_mode === 'error') {\n $code = $data['code'] . ' ' . $data['message'];\n $body = isset($data['data']) ? $data['data'] : '';\n $body = \"<H1>$code</H1><pre>$body\";\n } else {\n $code = '200 OK';\n $body = '<pre>' . $data;\n }\n header(\"HTTP/1.1 $code\");\n die($body);\n default:\n // plain html for browser debugging\n return '<pre>' . print_r([$ret_mode => $data, 'id' => $id], true);\n }\n}",
"public function getIndex()\n\t{\n\t\t$output=array(\n\t\t\t'status' => 'success', \n\t\t\t'message' =>'data fetched' , \n\t\t\t'data' =>'hi' , \n\t\t\t);\n\t\treturn Response::json($output);\n\t}",
"public function json(){ return json_encode( $this->objectify() ); }",
"public function getResponseData();",
"public function index()\n {\n //\n return response()->json([\"data\"=>$data]);\n }",
"public function api_createEncuesta()\n {// toma las preguntas en formato JSON y las envía a la API\n $Habitos= $this->Obtener(\"Annamnesis/habitos\");\n $APersonales = $this->Obtener(\"Annamnesis/apersonales\");\n $AFamiliares = $this->Obtener(\"Annamnesis/afamiliares\");\n return(compact('Habitos','APersonales','AFamiliares'));\n }",
"public function getApi();",
"public function getApi();",
"public function getApi();",
"public function jsonProvider() {\n return '{\n \"data\": {\n \"attributes\": {\n \"object_domain\": \"contact\",\n \"object_id\": \"1\",\n \"due\": \"2019-01-25T07:50:14+00:00\",\n \"urgency\": 1,\n \"description\": \"Need to verify this guy house.\",\n \"items\": [\n \"Visit his house\",\n \"Capture a photo\",\n \"Meet him on the house\"\n ],\n \"task_id\": \"123\"\n }\n }\n }';\n}",
"public function toArrayForApi()\n {\n $return = array();\n\n if ($this->getForename()) {\n $return['forename'] = $this->getForename();\n }\n if ($this->getSurname()) {\n $return['surname'] = $this->getSurname();\n }\n if ($this->getEmail()) {\n $return['email'] = $this->getEmail();\n }\n if ($this->getTelephone()) {\n $return['telephone'] = $this->getTelephone();\n }\n if ($this->getCountry()) {\n $return['country'] = $this->getCountry();\n }\n if ($this->getZipcode()) {\n $return['zipcode'] = $this->getZipcode();\n }\n if ($this->getCity()) {\n $return['city'] = $this->getCity();\n }\n if ($this->getStreet()) {\n $return['street'] = $this->getStreet();\n }\n if ($this->getNumber()) {\n $return['number'] = $this->getNumber();\n }\n if ($this->getLanguage()) {\n $return['language'] = $this->getLanguage();\n }\n if ($this->getGender()) {\n $return['gender'] = $this->getGender();\n }\n if ($this->getDob()) {\n $return['dob'] = $this->getDob();\n }\n if ($this->getLinkedCompanyIds()) {\n $return['linked_company_ids'] = implode(',', (array) $this->getLinkedCompanyIds());\n }\n if ($this->getTags()) {\n $return['add_tag_by_string'] = implode(',', $this->getTags());\n }\n if ($this->getCustomFields()) {\n foreach ($this->getCustomFields() as $fieldID => $fieldValue) {\n $return['custom_field_' . $fieldID] = $fieldValue;\n }\n }\n if ($this->getFax()) {\n $return['fax'] = $this->getFax();\n }\n if ($this->getGsm()) {\n $return['gsm'] = $this->getGsm();\n }\n if ($this->getWebsite()) {\n $return['website'] = $this->getWebsite();\n }\n if ($this->getDescription()) {\n $return['description'] = $this->getDescription();\n }\n\n return $return;\n }",
"public function api()\n {\n $input = request('q');\n $tags = Tag::where('name', 'like', $input.'%')\n ->orWhere('name', 'like', '% '.$input.'%')->get(\n ['name AS text', 'id']\n )->toArray();\n\n if ($input != '')\n {\n return response()->json([\n 'results' => $tags\n ]);\n }\n else\n {\n return response()->json([\n 'results' => ''\n ]);\n }\n }",
"function json($response = array()){\n echo json_encode($response);\n exit;\n}",
"function json($param = []) {\n echo json_encode((new pharmacies)->get_by_user());\n\n// $file=HOMEDIR.'9398.json';\n//\n// $json= file_get_contents($file);\n// print_rr(json_decode($json));\n }",
"public function index()\n {\t\t\n $data = User::all();\n return new Response($data);\n }",
"public function respond() : array;",
"public function getUser()\n { if (Auth::guard('api')->user()){\n $user=Auth::guard('api')->user();\n $obj = User::where('id','!=',$user->id)->latest()->paginate(8);\n }else{\n $obj = User::latest()->paginate(8);\n }//end of else\n return response()->json($obj);\n }",
"public function index()\n {\n //\n $user=User::all();\n return response()->json($user);\n }",
"public function listsGenericget()\r\n {\r\n $response = Generic::all();\r\n return response()->json($response,200);\r\n }",
"function jsonSerialize() {\n return[\n \"id\"=>$this->id,\n \"nom\"=>$this->nom\n ];\n }",
"public function modelJson()\n {\n// $user->username = '李白';\n// $user->password = '123';\n// $user->gender = '男';\n// $user->email = '[email protected]';\n// $user->price = 100;\n// $user->status = 1;\n// $user->details = ['content' => 123];\n// $user->list = ['username' => '辉夜', 'gender' => '女', 'email' => '[email protected]', 'uid' => 1011];\n// $user->save();\n\n// $user = UserModel::get(179);\n// return $user->list->username;\n\n// $user = UserModel::where('list->username', '辉夜')->find();\n// return $user->list->email;\n\n $user = UserModel::get(179);\n $user->list->username = '李白';\n $user->save();\n }",
"public function index()\n {\n return response()->json($this->model->where('user_id',auth('api')->user()->id)->get());\n }",
"public function listUserData()\n {\n $userData = $this->model->select('id','name','email','role')->orderby('id','asc')->get();\n $test = $this->service->abc($userData);\n dd($test);\n return $userData;\n }",
"function otomoto_api()\n{\n $api = '329:20db09f3e99a6fba22abdf2c756fe70b';\n return $api;\n}",
"public function toJSON () {\r\n \treturn json_encode($this->_response);\r\n }",
"public function jsonSerialize() {\n\n return ['id' => $this->id,\n 'name' => $this->name,\n 'author' => $this->author,\n 'description' => $this->description];\n \n \n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function json()\n {\n }",
"public function indexAction() : array\n {\n $title = \"JSON IP Validator\";\n $json = [\n \"message\" => \"JSON REST API working\",\n \"title\" => $title\n ];\n return [$json];\n }",
"public function index()\n {\n /*$tipotrans = mtipotran::all();\n $response = Response::json($tipotrans,200);\n return $response;*/\n\n return response()->json([\n 'data' => mtipotran::all(),\n ], 200);\n }",
"public function getAllRecord()\n {\n $data = DB::table('barang')->get();\n $result = ['code' => '99', 'data' => $data];\n return response()->json($result);\n }",
"public function create()\n\t{\n\t\treturn \\Response::json(Input::json());\n\t}",
"public function index()\n {\n return response()->json(['name' => 'Pilatix API']);\n }",
"public function index()\n {\n return response()->json(['data'=>TiendaApi::where('estado',1)->get()],200);\n }",
"public function getResponse() {}",
"public function getResponse() {}",
"function getFeedback($req){\n\n require_once __DIR__ . \"/../../models/volunteerModel.php\";\n\n $volunteer = new volunteerModel();\n\n $result = $volunteer->get_volunteer_review_by_id($req['params']['voluntId']);\n\n $output = array();\n\n if ($result){\n $output = array_merge(array(), $result);\n }\n\n Response::status(200);\n Response::json($output);\n\n}"
] | [
"0.70017314",
"0.66872716",
"0.6637492",
"0.6425813",
"0.6403793",
"0.6388049",
"0.6387312",
"0.632844",
"0.63279146",
"0.6312716",
"0.62956774",
"0.62469304",
"0.6238222",
"0.61838764",
"0.61635375",
"0.6162505",
"0.6161848",
"0.6142688",
"0.6119299",
"0.6112848",
"0.61063284",
"0.6081578",
"0.6045696",
"0.60371435",
"0.6017397",
"0.5994629",
"0.5994629",
"0.5974227",
"0.5965359",
"0.5962194",
"0.5961111",
"0.5961106",
"0.5961106",
"0.5958257",
"0.59407693",
"0.59366745",
"0.5926457",
"0.59226876",
"0.5920478",
"0.5918657",
"0.590584",
"0.5903314",
"0.589476",
"0.58923954",
"0.589122",
"0.588482",
"0.5881781",
"0.5880669",
"0.58802295",
"0.58802295",
"0.5871369",
"0.58705676",
"0.58617723",
"0.58506924",
"0.58405906",
"0.5827567",
"0.5826067",
"0.58211744",
"0.5819902",
"0.5815094",
"0.5809362",
"0.5809362",
"0.5809362",
"0.58038133",
"0.5797849",
"0.5796882",
"0.57902646",
"0.57896566",
"0.57865506",
"0.578605",
"0.5784306",
"0.5782269",
"0.57817066",
"0.5780568",
"0.5779777",
"0.5775911",
"0.57758206",
"0.5768874",
"0.57687396",
"0.57681185",
"0.576103",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.57601345",
"0.5750521",
"0.57485235",
"0.57480836",
"0.57465476",
"0.5745068",
"0.57428294",
"0.5742567",
"0.5742567",
"0.5741722"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$assignments=Assignment::orderBy('created_at')->get();
return view('back.teacher.assignment.index', compact('assignments'));
} | {
"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()
{
$classes=Stdclass::orderBy('order')->get();
return view('back.teacher.assignment.create', compact('classes'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$this->validate($request,[
'name'=>'required',
'description'=>'required',
'class'=>'required',
'file'=>'required|file|mimes:pdf,docx|max:2125',
'submission_date'=>'required|date'
]);
$input=$request->except('file','submission_date','_token');
$input['teacher_id']=Auth::guard('teacher')->user()->id;
$input['class_id']=$request->class;
$input['section_id']=$request->section;
$input['submitted_till']=$request->submission_date;
if($request->hasFile('file')){
$uploadedFile = $request->file('file');
if ($uploadedFile->isValid()) {
$input['file']=FileUpload::file($request,'file','uploads/assignments');
}
}
$input=Assignment::create($input);
$link=route('teacher.assignments.show',['assignment'=>$input->id]);
return redirect()->back()->with(['success'=>'Assignment added successfully','link'=>$link]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
$assignment=Assignment::findOrFail($id);
return view('back.teacher.assignment.view', compact('assignment'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$classes=Stdclass::orderBy('order')->get();
$assignment=Assignment::findOrFail($id);
if($assignment->teacher_id != Auth::guard('teacher')->user()->id){
abort('403');
}
return view('back.teacher.assignment.edit', compact('assignment','classes'));
} | {
"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(Form $form)\n {\n //\n }",
"public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"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($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($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(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()\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 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 edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\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 $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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\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 editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit()\n {\n return view('initializer::edit');\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_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\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.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.6834566",
"0.68116575",
"0.68075293",
"0.6805924",
"0.6801357",
"0.6796291",
"0.67915684",
"0.67915684",
"0.67874014",
"0.678544",
"0.67787844",
"0.6777662",
"0.67675763",
"0.676299",
"0.6746726",
"0.6745706",
"0.67450166",
"0.67450166",
"0.6739429",
"0.6734577",
"0.6725992",
"0.67127997",
"0.6694406",
"0.6692487",
"0.6689421",
"0.66884303",
"0.6687299",
"0.6685663",
"0.6682167",
"0.66701853",
"0.66697115",
"0.6666091",
"0.6666091",
"0.66627705",
"0.6661716",
"0.6661522",
"0.6657919",
"0.6656454",
"0.6653187",
"0.6642113",
"0.66332614",
"0.66324973",
"0.66275465",
"0.66275465",
"0.6619777",
"0.6619387",
"0.6617973",
"0.66154003",
"0.66110945",
"0.6607966",
"0.66065043",
"0.6596376",
"0.65953517",
"0.65941286",
"0.6591486",
"0.6590759",
"0.6588404",
"0.658161",
"0.6580548",
"0.6579757",
"0.6577171",
"0.65761065",
"0.657386",
"0.65686774",
"0.6567784",
"0.65672046",
"0.6566417",
"0.65615803",
"0.65615714",
"0.65615714",
"0.65592474",
"0.65586483",
"0.65568006",
"0.6556628",
"0.65564895",
"0.6555322",
"0.65551996",
"0.6555016",
"0.654888",
"0.65477645",
"0.65451735"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
$assignment=Assignment::findOrFail($id);
if($assignment->teacher_id != Auth::guard('teacher')->user()->id){
abort('403');
}
$this->validate($request,[
'name'=>'required',
'description'=>'required',
'class'=>'required',
'file'=>'nullable|file|mimes:pdf,docx|max:2125',
'submission_date'=>'required|date'
]);
$input=$request->except('file','submission_date','_token');
$input['class_id']=$request->class;
$input['section_id']=$request->section;
$input['submitted_till']=$request->submission_date;
if($request->remfile){
$input['file']=null;
//deleting image
if($assignment->file && File::exists($assignment->file)){
unlink($assignment->file);
$assignment->file=null;
}
}
if($request->hasFile('file')){
$uploadedFile = $request->file('file');
if ($uploadedFile->isValid()) {
$input['file']=FileUpload::file($request,'file','uploads/assignments');
}
if($assignment->file && File::exists($assignment->file)){
unlink($assignment->file);
}
}
$input=$assignment->update($input);
$link=route('teacher.assignments.show',['assignment'=>$assignment->id]);
return redirect()->back()->with(['success'=>'Assignment added successfully','link'=>$link]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$assignment=Assignment::findOrFail($id);
if($assignment->teacher_id != Auth::guard('teacher')->user()->id){
abort('403');
}
if($assignment->file && File::exists($assignment->file)){
unlink($assignment->file);
}
return redirect()->back()->with(['success'=>'Assignment deleted successfully']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
//
$users = User::orderBy('created_at', 'asc')->paginate(5);
return view('index')->with('users', $users);
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$result=termin::join('treners','termins.trener_id','=','treners.id')
->get(['termins.*','treners.ime','treners.prezime']);
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
$termin=new termin();
$termin->dan=$request->dan;
$termin->vreme=$request->vreme;
$termin->broj=$request->broj;
$termin->trener_id=$request->trener_id;
$termin->save();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show(Resena $resena)\n {\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function get_resource();",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function display() {\n echo $this->render();\n }",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public abstract function display();",
"abstract public function resource($resource);",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245",
"0.60389996",
"0.6016584",
"0.598783",
"0.5961788",
"0.59606946",
"0.5954321",
"0.59295714",
"0.59182066",
"0.5904556",
"0.59036547",
"0.59036547",
"0.59036547",
"0.5891874",
"0.58688277",
"0.5868107",
"0.58676815",
"0.5851883",
"0.58144855",
"0.58124036",
"0.58112013",
"0.5803467",
"0.58012545",
"0.5791527",
"0.57901084",
"0.5781528",
"0.5779676",
"0.5757105",
"0.5756208",
"0.57561266",
"0.57453394",
"0.57435393",
"0.57422745",
"0.5736634",
"0.5736634",
"0.5730559",
"0.57259274",
"0.5724891",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5722562",
"0.5718969",
"0.5713412",
"0.57091093",
"0.5706405",
"0.57057405",
"0.5704541",
"0.5704152",
"0.57026845",
"0.57026845",
"0.56981397",
"0.5693083",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962",
"0.5684962"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"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(Form $form)\n {\n //\n }",
"public function edit()\n { \n return view('admin.control.edit');\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(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"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($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($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(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()\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 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 edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\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 $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($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\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 editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit()\n {\n return view('initializer::edit');\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_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"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) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\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.7855196",
"0.76957726",
"0.7273917",
"0.7241426",
"0.71717227",
"0.7064183",
"0.70528984",
"0.69836885",
"0.694763",
"0.69469565",
"0.6941572",
"0.69301945",
"0.6903868",
"0.68989486",
"0.68989486",
"0.68787694",
"0.68641657",
"0.6860115",
"0.6857286",
"0.68464494",
"0.6834566",
"0.68116575",
"0.68075293",
"0.6805924",
"0.6801357",
"0.6796291",
"0.67915684",
"0.67915684",
"0.67874014",
"0.678544",
"0.67787844",
"0.6777662",
"0.67675763",
"0.676299",
"0.6746726",
"0.6745706",
"0.67450166",
"0.67450166",
"0.6739429",
"0.6734577",
"0.6725992",
"0.67127997",
"0.6694406",
"0.6692487",
"0.6689421",
"0.66884303",
"0.6687299",
"0.6685663",
"0.6682167",
"0.66701853",
"0.66697115",
"0.6666091",
"0.6666091",
"0.66627705",
"0.6661716",
"0.6661522",
"0.6657919",
"0.6656454",
"0.6653187",
"0.6642113",
"0.66332614",
"0.66324973",
"0.66275465",
"0.66275465",
"0.6619777",
"0.6619387",
"0.6617973",
"0.66154003",
"0.66110945",
"0.6607966",
"0.66065043",
"0.6596376",
"0.65953517",
"0.65941286",
"0.6591486",
"0.6590759",
"0.6588404",
"0.658161",
"0.6580548",
"0.6579757",
"0.6577171",
"0.65761065",
"0.657386",
"0.65686774",
"0.6567784",
"0.65672046",
"0.6566417",
"0.65615803",
"0.65615714",
"0.65615714",
"0.65592474",
"0.65586483",
"0.65568006",
"0.6556628",
"0.65564895",
"0.6555322",
"0.65551996",
"0.6555016",
"0.654888",
"0.65477645",
"0.65451735"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$termin = termin::find($id);
$termin->delete();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
SPECIAL METHODS Get formatted timestamp | public function getFormattedTimestamp()
{
/** @var \DateTime $date */
$date = $this->timestamp;
return $date->format('c');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _getFormattedTimestamp()\n {\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\n }",
"public function getTimestampFormatter();",
"private function getTimestamp()\n {\n $originalTime = microtime(true);\n $micro = sprintf(\"%06d\", ($originalTime - floor($originalTime)) * 1000000);\n $date = new DateTime(date('Y-m-d H:i:s.'.$micro, $originalTime));\n\n return $date->format($this->config['dateFormat']);\n }",
"protected function getTimeStamp() {\n return time().' ('.strftime( '%Y.%m.%d %H:%I:%S', time() ).')';\n }",
"protected function getTimeStamp()\n {\n return time() . ' (' . strftime('%Y.%m.%d %H:%I:%S', time()) . ')';\n }",
"public function getTimeFormatter();",
"private function getTimestamp() {\n\t$dateTime = new DateTime('now', new DateTimeZone(self::TIME_ZONE));\n\treturn $dateTime->format(self::DATE_FORMAT);\n }",
"protected function getTimestamp()\r\n {\r\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\r\n }",
"private static function timestamp(){\n date_default_timezone_set('Africa/Nairobi');\n $time = time();\n return date(\"Y-m-d G:i:s\", $time);\n }",
"public function freshTimestampString()\n {\n if(!is_null($this->dateFormat)){\n return date($this->dateFormat);\n }\n return time();\n }",
"public function getTimestamp();",
"public function getTimestamp();",
"public function getTimestamp();",
"static public function timestamp()\r\n {\r\n $output = date('Y-m-d H:i:s', time());\r\n return $output;\r\n }",
"private static function timeStamp() {\n return date(\"Y-m-d H:i:s\");\n }",
"abstract public function getTstamp();",
"public static function timestamp()\n {\n //$mt = microtime();\n list($mt, $tm) = explode(\" \", microtime());\n return sprintf(\"%d%03d\",$tm,(int)($mt*1000%1000));\n }",
"function timeStamp()\n {\n return date(\"YmdHis\");\n }",
"function timeStamp() {\r\n\t\t$php_timestamp = time();\r\n\t\t$stamp = date(\" h:i:s A - m/d/Y\", $php_timestamp);\r\n\t\treturn $stamp;\r\n\t}",
"function getTimestamp(){\n return date('m/d/Y G:h');\n}",
"public function getTimestampSent(): string\n {\n $temp=$this->timestampSent;\n return $temp->format('D H:i');\n }",
"public function timestamp()\n {\n list($uSecond, $second) = explode(' ', microtime());\n return (string) ($second + ($uSecond * 1000000));\n }",
"public function getTimestamp()\n {\n }",
"public static function timestamp() {}",
"public function getTimestamp()\n\t{\n\t\treturn $this->getValue('timestamp');\n\t}",
"public static function formatTimestamp($rawTimestamp) {\n $timeString = date(\"h:i a | F j, o\", strtotime($rawTimestamp));\n return $timeString;\n }",
"public function dateTimeFormat();",
"protected function formatTimestamp($timestamp)\n {\n if ($this->timestampType === 'date')\n {\n $timestamp = new MongoDate(round($timestamp));\n }\n else\n {\n if ($this->timestampType === 'string')\n {\n $timestamp = date('Y-m-d H:i:s', $timestamp);\n }\n else\n {\n $timestamp = $timestamp;\n }\n }\n\n return $timestamp;\n }",
"public function timeFormat();",
"function getTimestamp() {\n return $this->time_stamp;\n }",
"public static function formattedTimestamp($getDateTime = null)\n {\n $timestamp = '';\n if ($getDateTime != null) {\n $timestamp = \\Carbon\\Carbon::createFromFormat('m/d/Y', $getDateTime)->timestamp;\n }\n return $timestamp;\n }",
"private function format_time( $timestamp ) {\n\t if ( empty( $timestamp) ) {\n\t\t return __( 'never' , 'slp-premier' );\n\t }\n\t return date(\"d F Y H:i:s\",$timestamp);\n }",
"public function getTimestamp()\n { return $this->get('timestamp'); }",
"public static function getTimestamp(){\r\n\t\treturn time();\r\n\t}",
"public function GetAsTimestamp(){\r\n\t\t\t$timestamp = null;\r\n\t\t\tif( $this->year !== null && $this->month !== null && $this->day !== null ){\r\n\t\t\t\t$timestamp = strtotime( $this->year . '/' . $this->month . '/' . $this->day . ' ' . $this->hours . ':' . $this->minutes . ':' . $this->seconds );\r\n\t\t\t}\r\n\t\t\treturn $timestamp;\r\n\t\t}",
"function getDateTime(){\r\n return date('jS F Y\\, g:ia',$this->timestamp);\r\n }",
"public function format_timestamp($time)\n {\n }",
"public function timestamp();",
"protected static function getTimestamp()\n\t{\n\t\treturn date(\"Y-m-d H:00:00\");\n\t}",
"public function getTimestamp(): ?string;",
"function tstotime($timestamp){\n return date(\"Y-m-d H:i:s\", $timestamp);\n}",
"function formatTimestamp($time, $format = \"l\", $timeoffset = null)\n {\n global $xoopsConfig, $xoopsUser;\n\n $format_copy = $format;\n $format = strtolower($format);\n\n if ($format == 'rss' || $format == 'r') {\n return parent::formatTimestamp($time, \"rss\", $timeoffset);\n }\n\n if (($format == 'elapse' || $format == 'e') && $time < time()) {\n return XoopsLocaleJalali::Convertnumber2farsi(parent::formatTimestamp($time, \"elapse\", $timeoffset));\n }\n // disable user timezone calculation and use default timezone,\n // for cache consideration\n if ($timeoffset === null) {\n $timeoffset = ($xoopsConfig['default_TZ'] == '') ? '0.0' : $xoopsConfig['default_TZ'];\n }\n $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);\n switch ($format) {\n case 's':\n $datestring = _SHORTDATESTRING;\n break;\n\n case 'm':\n $datestring = _MEDIUMDATESTRING;\n break;\n\n case 'mysql':\n $datestring = 'Y-m-d H:i:s';\n break;\n\n case 'l':\n $datestring = _DATESTRING;\n break;\n\n case 'c':\n case 'custom':\n static $current_timestamp, $today_timestamp, $monthy_timestamp;\n if (!isset($current_timestamp)) {\n $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);\n }\n if (!isset($today_timestamp)) {\n $today_timestamp = mktime(0, 0, 0, date('m', $current_timestamp), date('d', $current_timestamp), date('Y', $current_timestamp));\n }\n\n if (abs($elapse_today = $usertimestamp - $today_timestamp) < 24 * 60 * 60) {\n $datestring = ($elapse_today > 0) ? _TODAY : _YESTERDAY;\n } else {\n if (!isset($monthy_timestamp)) {\n $monthy_timestamp[0] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp));\n $monthy_timestamp[1] = mktime(0, 0, 0, 0, 0, date('Y', $current_timestamp) + 1);\n }\n if ($usertimestamp >= $monthy_timestamp[0] && $usertimestamp < $monthy_timestamp[1]) {\n $datestring = _MONTHDAY;\n } else {\n $datestring = _YEARMONTHDAY;\n }\n }\n break;\n\n default:\n if ($format != '') {\n $datestring = $format_copy;\n } else {\n $datestring = _DATESTRING;\n }\n break;\n }\n\n\t// Start hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org\n\tif (_JDF_USE_HEGIRADATE && $format != 'mysql' ){\n\t return XoopsLocaleJalali::jdate($datestring,$usertimestamp);\n\t} else {\n\t\treturn ucfirst(date($datestring,$usertimestamp));\n }\n\t// End hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org\n\t}",
"function getDatestamp()\n{\n $d = new DateTime();\n return $d->getTimestamp() . \"\";\n}",
"function format_timestamp_for_display($timestamp)\n{\n return (new Carbon($timestamp))->format('Y-m-d');\n}",
"function getTimestamp() {\r\r\n\t\treturn $this->timestamp;\r\r\n\t}",
"function timestampToString($time) {\n\treturn date('Y-m-d H:i:s', $time);\n}",
"protected function formatTimestamp($time) {\n return date('Y-m-d H:i:s', !empty($time) ? $time : time());\n }",
"function smarty_function_sC_template_printTimestampToTime($params, &$smarty)\n{\n\t//echo \"<pre>\";print_r($params[params]);echo \"</pre>\";\n\techo $timestamp;\n if (!isset($params['timestamp']) || $params['timestamp'] <= 0) {\n $params['timestamp'] = time();\n }\n\n if (isset($params['onlytime']) && $params['onlytime']) {\n $str = date(\"H:m:s\", $params['timestamp']);\n } else {\n $str = $params['timestamp'].', '.date(\"H:i:s\", $params['timestamp']);\n }\n\n return $str;\n}",
"function convertTimestamp($ugly){\n $date = new DateTime($ugly);\n return $date->format('l, F jS, Y');\n}",
"public static function timestamp(){\n $timestamp = time();\n return $timestamp;\n }",
"function timestamp($includeTime=true, $includeDate=true) {\r\n\t$parts = array();\r\n\tif ($includeDate) {\r\n\t\t$parts[] = \"Y-m-d\";\r\n\t}\r\n\tif ($includeTime) {\r\n\t\t$parts[] = \"H:i:s\";\r\n\t}\r\n\t$format = implode(\" \", $parts);\r\n\treturn date($format);\r\n}",
"public function getTimestamp()\n {\n return time();\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"function date_get_date_time($timestamp) {\n return app_date($GLOBALS['i18']['formats']['date_time'], $timestamp);\n}",
"public function getTimestamp() \n\t{\n\t\treturn $this->timestamp;\n\t}",
"public static function timestamp() {\n return time(); \n }",
"public function getTimestamp() {\n return $this->timestamp;\n }",
"public function getTimestamp() {\n return $this->timestamp;\n }",
"public function __toString() {\n return gmdate(\"Y-m-d h:i:s\", $this->sec).sprintf(\".%09u\", $this->nsec).\"-0000\"; }",
"public function getTimestamp()\r\n {\r\n return $this->_timestamp;\r\n }",
"public function getTimestamp(){\n\t\treturn $this->_timestamp;\n\t}",
"public function getDatetimeFormat() : string\n\t{\n\t\treturn 'epoch';\n\t}",
"public function toStringShort() {\n return gmdate(\"Y-m-d h:i:s\", $this->sec); }",
"function _safe_strftime($format,$timestamp) {\r\n \r\n if ($timestamp>3600)\r\n return strftime($format,$timestamp);\r\n else\r\n return \"--\";\r\n \r\n}",
"private function formatTime($timestamp)\n {\n return date('Y-m-d', $timestamp);\n }",
"function formatTimestamp($time, $format=\"l\", $timeoffset=\"\")\r\n\t{\r\n\t global $xoopsConfig, $xoopsUser;\r\n\t if(strtolower($format) == \"rss\" ||strtolower($format) == \"r\"){\r\n \t$TIME_ZONE = \"\";\r\n \tif(!empty($GLOBALS['xoopsConfig']['server_TZ'])){\r\n\t\t\t\t$server_TZ = abs(intval($GLOBALS['xoopsConfig']['server_TZ']*3600.0));\r\n\t\t\t\t$prefix = ($GLOBALS['xoopsConfig']['server_TZ']<0)?\" -\":\" +\";\r\n\t\t\t\t$TIME_ZONE = $prefix.date(\"Hi\",$server_TZ);\r\n\t\t\t}\r\n\t\t\t$date = gmdate(\"D, d M Y H:i:s\", intval($time)).$TIME_ZONE;\r\n\t\t\treturn $date;\r\n \t}\r\n \t\r\n\t $usertimestamp = xoops_getUserTimestamp($time, $timeoffset);\r\n\t switch (strtolower($format)) {\r\n\t case 's':\r\n\t $datestring = _SHORTDATESTRING;\r\n\t break;\r\n\t case 'm':\r\n\t $datestring = _MEDIUMDATESTRING;\r\n\t break;\r\n\t case 'mysql':\r\n\t $datestring = \"Y-m-d H:i:s\";\r\n\t break;\r\n\t case 'rss':\r\n\t \t$datestring = \"r\";\r\n\t break;\r\n\t case 'l':\r\n\t $datestring = _DATESTRING;\r\n\t break;\r\n\t case 'c':\r\n\t case 'custom':\t \r\n\t $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset);\r\n\t if(date(\"Ymd\", $usertimestamp) == date(\"Ymd\", $current_timestamp)){\r\n\t\t\t\t$datestring = _TODAY;\r\n\t\t\t}elseif(date(\"Ymd\", $usertimestamp+24*60*60) == date(\"Ymd\", $current_timestamp)){\r\n\t\t\t\t$datestring = _YESTERDAY;\r\n\t\t\t}elseif(date(\"Y\", $usertimestamp) == date(\"Y\", $current_timestamp)){\r\n\t\t\t\t$datestring = _MONTHDAY;\r\n\t\t\t}else{\r\n\t\t\t\t$datestring = _YEARMONTHDAY;\r\n\t\t\t}\r\n\t break;\r\n\t default:\r\n\t if ($format != '') {\r\n\t $datestring = $format;\r\n\t } else {\r\n\t $datestring = _DATESTRING;\r\n\t }\r\n\t break;\r\n\t }\r\n\t return ucfirst(date($datestring, $usertimestamp));\r\n\t}",
"public function getTimestamp()\n {\n return strtotime($this->getValue());\n }",
"public static function formatTimestamp ($created_at, $flag){\n $tmpDate = explode(\"-\",$created_at);\n $tmpTime = explode(\":\",$tmpDate[2]);\n $day = explode(\" \",$tmpTime[0]);\n\n $date = $tmpDate[0].$tmpDate[1].$day[0];\n $time = $day[1].$tmpTime[1].$tmpTime[2];\n\n if($flag ==1) return $date.$time;\n else return $time;\n }",
"function utime2timestamp($string2format) {\n \t\treturn date(\"YmdHis\",$string2format);\n \t}",
"public function getTimestamp()\n {\n return $this->_timestamp;\n }",
"public function getTimeStamp() {\n return $this->timestamp;\n }",
"function timeStamp( $returnNow = false )\r\n {\r\n if ( $returnNow == true )\r\n return mktime();\r\n else\r\n return $this->hour() * 3600 + $this->minute() * 60 + $this->second();\r\n }",
"private function convertTimestampFormat($timestamp)\n {\n return str_replace('T', ' ', substr($timestamp, 0, 19));\n }",
"public function gettimeModifiedAttribute()\n {\n return Carbon::parse($this->time)->translatedFormat('g:i A');\n }",
"public function getTimestamp(): int;",
"public function getTimestamp(): int;",
"function showDate($timestamp) {\r\n if ($timestamp > 10000000000)\r\n $rtn = date(\"M d Y H:i:s (J)\", $timestamp/1000);\r\n else\r\n $rtn = date(\"M d Y H:i:s \", $timestamp);\r\n\r\n return $rtn;\r\n}",
"function getFormattedCreatedDateTime()\r\n {\r\n return $this->created_at->format('d/m/Y H:i:s');\r\n }",
"function timestamp(){\r\n\t\t$timestamp = round(microtime(1) * 1000);\r\n\r\n\t\treturn $timestamp;\r\n\t}",
"public function getTime() : string\r\n {\r\n return $this->format('H:i:s');\r\n }",
"public function getTimestamp()\n\t{\n\t\treturn $this->_timestamp;\n\t}",
"public static function getPrintableDatetime(): string\n {\n return (new DateTime())->format(\"Y-m-d\\TH:i:s.vP\");\n }",
"public function getTimeStamp() {\n\t\treturn $this->timeStamp;\n\t}",
"public function formatAsString()\n {\n return $this->formatTimeAsString(\n $this->value,\n $this->nanoSeconds\n );\n }",
"public function getTimestamp() {\n\n return $this->timestamp;\n }",
"static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }",
"public function getTimestamp()\n {\n return $this->timestamp;\n }",
"protected function getTimeStamp(){\n\t\t$result = $this->getFile()->getProperty('tstamp');\n\t\tif ($this->processedFile) {\n\t\t\t$result = $this->processedFile->getProperty('tstamp');\n\t\t}\n\t\treturn $result;\n\t}",
"function getTime($ts = -1)\n{\n\tif($ts == '')\n\t\treturn 'Never';\n\telse if($ts == -1)\n\t\t$ts = TIME;\n\n\treturn str_replace(' ', ' ', gmdate(TIMEFORMAT, $ts + TZOFFSET));\n}",
"public function formatTime()\n { \n return sprintf('%02d:%02d:%02d', ($this->totaltime / 3600), \n ($this->totaltime / 60 % 60), $this->totaltime % 60); \n }"
] | [
"0.8047004",
"0.78799176",
"0.78283054",
"0.7824464",
"0.777471",
"0.7606694",
"0.74534893",
"0.7443978",
"0.74056464",
"0.73787403",
"0.73418",
"0.73418",
"0.73418",
"0.73198974",
"0.7290967",
"0.728833",
"0.7263474",
"0.72567374",
"0.71935016",
"0.71570927",
"0.7120692",
"0.7108952",
"0.70485425",
"0.70393443",
"0.7012526",
"0.7009123",
"0.70035475",
"0.6990792",
"0.69878423",
"0.6977839",
"0.69438314",
"0.69402516",
"0.6929486",
"0.6926682",
"0.6922805",
"0.69209236",
"0.6920703",
"0.69165367",
"0.6868821",
"0.6854874",
"0.68469214",
"0.68325377",
"0.68220854",
"0.6810882",
"0.6807985",
"0.6796822",
"0.6796792",
"0.6773376",
"0.67581785",
"0.67571706",
"0.67404926",
"0.6734754",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.67212707",
"0.6692952",
"0.6692874",
"0.6692173",
"0.6691655",
"0.6691655",
"0.6675204",
"0.66650236",
"0.66639614",
"0.666133",
"0.66578126",
"0.66549087",
"0.6654593",
"0.6648983",
"0.6620408",
"0.661797",
"0.6616745",
"0.66142493",
"0.66128635",
"0.66105664",
"0.6601859",
"0.6592696",
"0.6588091",
"0.6588091",
"0.6586005",
"0.65807694",
"0.6576002",
"0.65725726",
"0.65660244",
"0.65637517",
"0.6562096",
"0.6537937",
"0.65246314",
"0.6522263",
"0.65161914",
"0.65137863",
"0.64997965",
"0.64979124"
] | 0.79143983 | 1 |
USER_INTERFACE METHODS Implemented from abstract class UserInterface | public function getUsername()
{
return $this->email;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function interface();",
"abstract public function user();",
"public function getUser(): UserInterface;",
"public function getUser(): UserInterface;",
"abstract protected function getUser();",
"function is_user( $user )\n {\n //Unimplemented\n }",
"protected abstract function performImpl();",
"public function getInterface();",
"public function readyForInterface() {}",
"public function __invoke(\n UserInterface $requestUser\n ): Result;",
"function AbstractUserPeer() {\n }",
"function get_user_info( $user, $key )\n {\n //Unimplemented\n }",
"public function getUser(): AccountInterface;",
"public function getUserInterface() {\r\n\t\treturn $this->interface;\r\n\t}",
"public function __construct() {\n\t\tparent::__construct();\n\n\t\t$this->name = 'userInterfaceBooter';\n\t}",
"function User ( ){\n }",
"public function getUser()\n {\n }",
"public function forUser($user);",
"public static function node_interface()\n {\n }",
"abstract public function getUserInfo();",
"abstract protected function _unimplemented() : Exception;",
"abstract protected function _unimplemented() : Exception;",
"abstract protected function _unimplemented() : Exception;",
"function chouXiang()\n {\n echo '必须继承重写的抽象类的抽象方法'.'</br>';\n }",
"function get_users()\n {\n //Unimplemented\n }",
"abstract protected function edu_up();",
"public static function user()\n {\n\n }",
"abstract public function service();",
"public function user();",
"public function user();",
"public function user();",
"public function user();",
"public function user();",
"public function user();",
"public function user();",
"public function user();",
"public function setUserInterface($interface) {\r\n\t\tif (strcmp($interface, 'EXT:')!= 0) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('Interface %s with wrong name', $interface));\r\n\t\t}\r\n\t\t\r\n\t\t$this->interfaceExtension = substr($interface, 4, strpos($interface, '/')-4);\r\n\t\t$this->interfaceName = substr($interface, strrpos($interface, '/')+1); \r\n\t\t$this->interfaceLibraryPath = t3lib_extMgm::extPath($this->interfaceExtension) . 'presentation/interfaces/'. $this->interfaceName . '/lib';\r\n\t\t\r\n\t\tif (!is_readable($this->interfaceLibraryPath)) {\r\n\t\t\tthrow new tx_auxo_presentationException(sprintf('Interface path %s not readable', $this->interfaceLibraryPath));\r\n\t\t}\r\n\t}",
"public function addUser(UserInterface $user);",
"public function addUser(UserInterface $user);",
"abstract protected function connected($user);",
"abstract protected function connected($user);",
"abstract protected function getUserInfo($username);",
"abstract protected function getUserId() ;",
"abstract public function getCruser();",
"function get_user_interface()\n\t{\n\t\t$GLOBALS['egw']->translation->add_app('addressbook');\n\n\t\t$uicontacts = new addressbook_ui();\n\n\t\t$default = $fields = array(\n\t\t\t'org_name' => lang('Company'),\n\t\t\t'org_unit' => lang('Department'),\n\t\t\t'n_fn' => lang('Prefix').', '.lang('Firstname').' + '.lang('Lastname'),\n\t\t\t'sep1' => '----------------------------',\n\t\t\t'email' => lang('email'),\n\t\t\t'tel_work' => lang('work phone'),\n\t\t\t'tel_cell' => lang('mobile phone'),\n\t\t\t'tel_fax' => lang('fax'),\n\t\t\t'tel_home' => lang('home phone'),\n\t\t\t'url' => lang('url'),\n\t\t\t'sep2' => '----------------------------',\n\t\t\t'adr_one_street' => lang('street'),\n\t\t\t'adr_one_street2' => lang('address line 2'),\n\t\t\t'adr_one_locality' => lang('city').' + '.lang('zip code'),\n\t\t\t'sep3' => '----------------------------',\n\t\t);\n\t\tforeach($uicontacts->customfields as $name => $data)\n\t\t{\n\t\t\t$fields['#'.$name] = $data['label'];\n\t\t}\n\t\t$fields += array(\n\t\t\t'sep4' => '----------------------------',\n\t\t\t'note' => lang('message'),\n\t\t\t'sep5' => '----------------------------',\n\t\t\t'captcha' => lang('Verification'),\n\t\t);\n\t\t$this->i18n = True;\n\t\t$this->arguments = array(\n\t\t\t'arg1' => array(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'label' => lang('Addressbook the contact should be saved to').' ('.lang('The anonymous user needs add rights for it!').')',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'' => lang('None'),\n\t\t\t\t)+$uicontacts->get_addressbooks(EGW_ACL_ADD)\t// add to not show the accounts!\n\t\t\t),\n\t\t\t'arg4' => array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'label' => lang('Email addresses (comma separated) to send the contact data'),\n\t\t\t\t'params' => array('size' => 80),\n\t\t\t),\n\t\t\t'arg6' => array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'label' => lang('Subject for email'),\n\t\t\t\t'params' => array('size' => 80),\n\t\t\t\t'default' => lang('Contactform'),\n\t\t\t\t'i18n' => True,\n\t\t\t),\n\t\t\t'arg2' => array(\n\t\t\t\t'type' => 'select',\n\t\t\t\t'label' => lang('Contact fields to show'),\n\t\t\t\t'multiple' => true,\n\t\t\t\t'options' => $fields,\n\t\t\t\t'default' => $default,\n\t\t\t\t'params' => array('size' => 9),\n\t\t\t),\n\t\t\t'arg3' => array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'label' => lang('Message after submitting the form'),\n\t\t\t\t'params' => array('size' => 80),\n\t\t\t\t'default' => lang('Thank you for contacting us.'),\n\t\t\t\t'i18n' => True,\n\t\t\t),\n\t\t\t'arg5' => array(\n\t\t\t\t'type' => 'textfield',\n\t\t\t\t'label' => lang('Custom eTemplate for the contactform'),\n\t\t\t\t'params' => array('size' => 40),\n\t\t\t\t'default' => 'addressbook.contactform',\n\t\t\t),\n\t\t\t'arg7' => array(\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => lang('Send emailcopy to receiver'),\n\t\t\t\t'params' => array('size' => 1),\n\t\t\t),\n\t\t);\n\t\treturn parent::get_user_interface();\n\t}",
"public function simulateUser() {}",
"public function getUserById(UserInput $userInput) {\n\n }",
"public function visit(ItemInterface $item);",
"function getOwnInterfaces();",
"abstract protected function getService();",
"public function overrideUC() {}",
"abstract public function onRegister(): void;",
"abstract protected function getEventableRepository();",
"public function __construct(UserObjectInterface $user)\n {\n $this->user = $user;\n }",
"public function testCreateUser()\n {\n }",
"function describeForApi(IUser $user, $detailed = false) {\n throw new NotImplementedError(__METHOD__);\n }",
"public function getUserInfo()\n {\n }",
"public function getInterface() {\n\t\t\treturn $this->implements;\t\n\t\t}",
"public function testUpdateUser()\n {\n }",
"function identifyUser() {\n}",
"abstract protected function execute(InputInterface $input, OutputInterface $output);",
"function user() {\r\r\r\n\t\t$this->_dao = DB_DataObject::factory('Users');\r\r\r\n\t}",
"protected function baseOperation1(): void\n {\n echo \"AbstractClass says: I am doing the bulk of the work\\n\";\n }",
"function login_user( $user, $password )\n {\n //Unimplemented\n }",
"public function __construct()\n\t{\n\t\tparent::__construct(\"user\");\n\t}",
"public function testAddUser()\n {\n }",
"public function __construct(UserInterface $user)\n {\n $this->user = $user;\n }",
"public function getUser() {}",
"abstract public function login(UserInterface $user): bool;",
"abstract protected function setRequiredGetters();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"protected abstract function getUserData(): array;",
"public function check(IUser $user);",
"function __construct(){\n\t\tparent::__construct('user');\n\t}",
"function run(User $user);",
"abstract protected function getUserProfile();",
"abstract protected function getDirectGetters();",
"public function addUser(){\n\t}",
"abstract public function isVisibleToUser(User $user);",
"public function __construct(UserDataInterface $user_data) {\n // User Data service.\n $this->userData = $user_data;\n }",
"public function testInfoUser()\n {\n }",
"abstract protected function requiredOperations1(): void;",
"public function persist( UserEntityInterface $user ): UserEntityInterface;",
"protected abstract function onExecute();",
"function UserController ()\n\t{\n\t\tparent::ItemController ();\n\t\t$this->operations = new UserServices ();\n\t\t$this->itemFactory = new UserFactory ();\n\t\t$this->rightsManager = new RightsManagerImpl();\n\t\t$this->pluginName = 'user';\n\t\t$this->title = 'Brim - Users';\n\t\t$this->itemName = 'User';\n\t}",
"abstract public function Register();",
"protected function getClassImplementations()\n {\n }",
"public function user($user);",
"function initChat(User $user){\n \n}",
"public function getBase(): void {}",
"private function selftest()\n {\n if (!is_object($this->objectUser)) {\n $tableUser = new User_Table();\n $this->objectUser = $tableUser->find( self::getGuestID() )->current();\n }\n if (!is_object($this->objectUserRole)) {\n $tableUserRole = new User_Role_Table();\n if (isset($this->objectUser->RoleID)) {\n $this->objectUserRole = $tableUserRole->find( $this->objectUser->RoleID )->current();\n } else {\n $this->objectUserRole = $tableUserRole->find( self::getGuestRoleID() )->current();\n }\n }\n if (!is_object($this->objectUser) || !is_object($this->objectUserRole)) {\n throw new Zend_Exception('System User Critical Error. Please contact support to resolve the problem.');\n }\n }",
"public function give($implementation);",
"function getByUser(User $user);",
"function describe(IUser $user, $detailed = false, $for_interface = false, $min_state = STATE_VISIBLE) {\n $project_users_table = TABLE_PREFIX . 'project_users';\n $users_table = TABLE_PREFIX . 'users';\n\n $rows = DB::execute(\"SELECT $project_users_table.* FROM $project_users_table, $users_table WHERE $project_users_table.user_id = $users_table.id AND project_id = ? AND $users_table.state >= ? ORDER BY CONCAT($users_table.first_name, $users_table.last_name, $users_table.email)\", $this->object->getId(), $min_state);\n \n if($rows) {\n $project_permissions = ProjectRoles::getPermissions();\n $result = array();\n \n foreach($rows as $row) {\n $role = $row['role_id'] ? ProjectRoles::findById($row['role_id']) : null;\n\n $project_user = array(\n 'user_id' => (integer) $row['user_id'],\n 'permissions' => array()\n );\n \n // Project role\n if($role instanceof ProjectRole) {\n $project_user['role_id'] = $role->getId();\n $project_user['role'] = $role->getName();\n \n foreach($project_permissions as $permission => $permission_text) {\n $project_user['permissions'][$permission] = $role->getPermissionValue($permission);\n } // foreach\n \n // Custom permissions\n } else {\n $project_user['role_id'] = 0;\n $project_user['role'] = lang('Custom');\n \n $project_user_permissions = $row['permissions'] ? unserialize($row['permissions']) : null;\n \n if(!is_array($project_user_permissions)) {\n $project_user_permissions = null;\n } // if\n \n foreach($project_permissions as $permission => $permission_text) {\n $project_user['permissions'][$permission] = $project_user_permissions && isset($project_user_permissions[$permission]) ? (integer) $project_user_permissions[$permission] : ProjectRole::PERMISSION_NONE;\n } // foreach\n } // if\n \n $result[] = $project_user;\n \n if($detailed) {\n foreach($result as $k => $v) {\n $project_user = $result[$k]['user_id'] ? Users::findById($result[$k]['user_id']) : null;\n \n if($project_user instanceof User) {\n $result[$k]['user'] = $project_user->describe($user, false, $for_interface);\n } else {\n $result[$k]['user'] = null;\n } // if\n } // foreach\n } // if\n } // foreach\n \n return $result;\n } // if\n \n return null;\n }",
"abstract public function object();"
] | [
"0.7331235",
"0.6790498",
"0.6502027",
"0.6502027",
"0.6417516",
"0.59312016",
"0.58290297",
"0.5781559",
"0.5766519",
"0.5659812",
"0.56468564",
"0.5589241",
"0.5551665",
"0.55471593",
"0.5546502",
"0.5481254",
"0.5480946",
"0.5472573",
"0.5470104",
"0.54681706",
"0.54401255",
"0.54401255",
"0.54401255",
"0.54196274",
"0.53736633",
"0.5361318",
"0.53558844",
"0.53132296",
"0.5301655",
"0.5301655",
"0.5301655",
"0.5301655",
"0.5301655",
"0.5301655",
"0.5301655",
"0.5301655",
"0.52817655",
"0.52778673",
"0.52778673",
"0.5276578",
"0.5276578",
"0.5267619",
"0.52665406",
"0.5263321",
"0.5254323",
"0.5238345",
"0.5234094",
"0.5227687",
"0.5225512",
"0.52032447",
"0.5183552",
"0.51745474",
"0.51647896",
"0.5130696",
"0.5126768",
"0.512446",
"0.5122353",
"0.51109946",
"0.511077",
"0.5098262",
"0.5087028",
"0.50695944",
"0.5048974",
"0.5046904",
"0.504219",
"0.50395525",
"0.50394607",
"0.5037467",
"0.5033707",
"0.5029482",
"0.5012435",
"0.5012435",
"0.5012435",
"0.5012435",
"0.5012435",
"0.5012435",
"0.5012435",
"0.5010593",
"0.50100297",
"0.5000727",
"0.50004596",
"0.499884",
"0.4997248",
"0.49959388",
"0.4994003",
"0.49900475",
"0.49886245",
"0.49825144",
"0.49810654",
"0.49796572",
"0.49790803",
"0.49730384",
"0.49604374",
"0.49544087",
"0.49495313",
"0.49488682",
"0.4946652",
"0.49429727",
"0.49376315",
"0.49345115",
"0.49336573"
] | 0.0 | -1 |
GETTERs AND SETTERs Get userId | public function getUserId()
{
return $this->userId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getUserId() {}",
"protected function getUserId() {}",
"public function getUserId()\n {\n return $this->userId;\n }",
"abstract protected function getUserId() ;",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId()\r\n {\r\n return $this->userId;\r\n }",
"public function getUserId(){\n return $this->UserId;\n }",
"public function getUserId()\n {\n }",
"public function getuserId()\n {\n return $this->userId;\n }",
"public function get_userId()\n {\n return $this->_userId;\n }",
"public function getUserId()\n {\n return $this->userId;\n }",
"function getUserId() {\n\t\treturn $this->getData('userId');\n\t}",
"public function getUserId() {\n return $this->userId;\n }",
"public function getUserId() {\n return $this->userId;\n }",
"public function getUserId() {\n return($this->userId);\n }",
"public function getUserId(): string;",
"public function getUserId(): int\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->_userId;\n }",
"public function getUserId()\n {\n return $this->_userId;\n }",
"public function getUserId()\n {\n return $this->_userId;\n }",
"public function getUserId() {\n\t\treturn $this->userId;\n\t}",
"public function getUserId () {\n\t\treturn ($this->userId);\n\t}",
"public function getUserId()\n {\n return $this->userId;\n }",
"public function getUserId() {\n\t\treturn($this->userId);\n\t}",
"public function getUserId ()\n {\n return $this->storage->get(self::$prefix . 'userId');\n }",
"public function getUserId()\n {\n return($this->userId);\n }",
"public function getUserId()\n {\n return $this->UserId;\n }",
"public function getUserId() {\n\t\treturn ($this->userId);\n\t}",
"public function getuserId()\n {\n return $this->_UserId;\n }",
"function get_userid() {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->userid;\n }",
"public function getUserId()\n {\n return $this->userid;\n }",
"public function getUserId() : int\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->id;\n }",
"Public Function UserId() {\n\t\treturn $this->userId;\n\t\n\t}",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function getUserId(){\n return $this->u_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserId()\n {\n return $this->user_id;\n }",
"public function getUserID(){\n return($this->userID);\n }",
"public function getId()\n {\n return $this->userId;\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getUserId()\n {\n return $this->get(self::_USER_ID);\n }",
"public function getId_user(){\n return $this->id_user;\n }",
"function get_user_id(){\n return $this->user_id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUserId() {\n return $this->user_id;\n }",
"public function getUserId() \n {\n if (!$this->hasUserId()) \n {\n $this->userId = 0;\n }\n\n return $this->userId;\n }",
"public function getUserId() {\n\t\treturn $this->user_id;\n\t}",
"public function getUser($userId);",
"public function getUser($userId);",
"public function getUserID () {\n return $this->id;\n }",
"function get_user () {\n\t\treturn $this->user_id;\n\t}",
"public function setUserId()\n {\n if(isset($_GET['userId']))\n {\n echo 'const userId = '.$_GET['userId'].';';\n }\n else\n {\n $config = new Config;\n echo 'const userId = '.$config->defaultUser.';';\n }\n }",
"public function getUserId()\r\n \t{\r\n \treturn $this->_client->getUser();\r\n \t}",
"public function getUserId()\r\n\t{\r\n\t\treturn $this->_userid;\r\n\t}",
"public function get_user_id();",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }"
] | [
"0.8000435",
"0.8000435",
"0.7869293",
"0.78193116",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7787202",
"0.7779641",
"0.7757321",
"0.77570593",
"0.7748218",
"0.7671871",
"0.7671739",
"0.7651008",
"0.7626259",
"0.7626259",
"0.75926626",
"0.7573734",
"0.7571294",
"0.75610167",
"0.75610167",
"0.75610167",
"0.7557309",
"0.7522152",
"0.75131744",
"0.75004464",
"0.7496697",
"0.74910516",
"0.74578285",
"0.7439378",
"0.7421977",
"0.741158",
"0.74039197",
"0.74039197",
"0.73913133",
"0.7385871",
"0.7384192",
"0.7318328",
"0.72781914",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.72644424",
"0.7263411",
"0.72529316",
"0.7243709",
"0.7243109",
"0.7243109",
"0.7243109",
"0.7234422",
"0.7219106",
"0.7214904",
"0.7214904",
"0.72102904",
"0.71939266",
"0.7180615",
"0.7180615",
"0.71504086",
"0.71030545",
"0.71030253",
"0.70996165",
"0.70938593",
"0.7072076",
"0.7063692"
] | 0.7694645 | 30 |
OBJECT REL: G & S Add pointLogs | public function addPointLog(PointLog $pointLog)
{
$this->pointLogs[] = $pointLog;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function logData() {\n\t\t/* Implement in subclasses */\n\t}",
"public function push_point_info() {\n\t\t$this->_check_access(); //拒绝非法IP执行任务\n\t\t$this->_write_log(__FUNCTION__);\n\t\t$this->load->model('soma/sales_point_model', 'sp_model');\n\t\t$res = $this->sp_model->push_point_info();\n\t\techo $res ? 'SUCCESS' : 'Failed';\n\t}",
"public function addLog($data);",
"function inbound_record_log( $title = '', $message = '', $rule_id = 0, $job_id = '', $type = null ) {\n\tglobal $inbound_automation_logs;\n\t$inbound_automation_logs->add( $title, $message, $rule_id, $job_id, $type );\n\n}",
"public function log($obj);",
"function log($cxn,$class,$id,$folder=NULL)\r\n {\r\n \r\n }",
"protected function log()\n {\n\n $this->worker\n ->setInstance($this->instance);\n // If instance can be called\n if($this->worker->ping()) {\n $infos = $this->worker->getInfos();\n $createdAt = new \\DateTime();\n\n $log = $this->logManager->createNew();\n $log->setMemory($infos['Memory']['used_memory']);\n $log->setCpu($infos['CPU']['used_cpu_sys']);\n $log->setNbClients(sizeof($this->worker->getClients()));\n $log->setCreatedAt($createdAt);\n // Add log\n $this->instance->addLog($log);\n }\n }",
"function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $mst_vendor;\n\t\t$table = 'mst_vendor';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= EW_COMPOSITE_KEY_SEPARATOR;\n\t\t$key .= $rs['kode'];\n\n\t\t// Write Audit Trail\n\t\t$filePfx = \"log\";\n\t\t$curDate = date(\"Y/m/d\");\n\t\t$curTime = date(\"H:i:s\");\n\t\t$id = ew_ScriptName();\n\t $curUser = CurrentUserName();\n\t\t$action = \"A\";\n\t\t$oldvalue = \"\";\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif ($mst_vendor->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore Blob Field\n\t\t\t\t$newvalue = ($mst_vendor->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) ? \"<MEMO>\" : $rs[$fldname]; // Memo Field\n\t\t\t\tew_WriteAuditTrail($filePfx, $curDate, $curTime, $id, $curUser, $action, $table, $fldname, $key, $oldvalue, $newvalue);\n\t\t\t}\n\t\t}\n\t}",
"function insert_audit_trail()\n {\n $parameter_array = $this->get_parameter_array();\n \n parent::insert('siis', $parameter_array);\n }",
"function add_log($source, $message)\r\n\t{\t\t\r\n\t\tglobal $wpdb;\r\n\t\t$this->ensure_log();\r\n\t\t$sql = \"insert into `$wpdb->three_strikes` \" .\r\n\t\t\t\t\"(`strike_ip`, `strike_time`, `source`, `message`) \" .\r\n\t\t\t\t\"values (\" .\r\n\t\t\t\t\"'\" . $wpdb->escape($_SERVER['REMOTE_ADDR']) . \"', \" .\r\n\t\t\t\t\"'\" . gmdate('Y-m-d H:i:s') . \"', \" .\r\n\t\t\t\t\"'\" . $wpdb->escape($source) . \"', \" .\r\n\t\t\t\t\"'\" . $wpdb->escape($message) . \"')\";\r\n\t\t$wpdb->query($sql);\r\n\t\t$sql = \"delete from $wpdb->three_strikes \" .\r\n\t\t\t\t\"where strike_time < '$this->one_week_ago_sql'\";\r\n\t\t$wpdb->query($sql);\r\n\t}",
"function insert_pnh_employee_grpsms_log($param)\r\n\t{\r\n\t\t$this->db->insert(\"pnh_employee_grpsms_log\",$param);\r\n\t}",
"public function log() {\n // data we are going to log\n $variables = func_get_args();\n $trace = debug_backtrace(null, 1);\n Yii::info(VarDumper::dump($this));\n $this->debugInternal($variables, $trace);\n }",
"function insert_log( $log_data = array() ) {\n\t\n\t\t/* Get Log From Rule ID */\t\t\n\t\t$logs_array = Inbound_Logging_Automation::get_logs( $log_data['rule_id'] );\n\t\t\n\t\t/* Push log to front of array */\n\t\t$logs_array[] = $log_data;\n\t\t\n\t\t/* Trim logs array to X entries */\n\t\tif ( count($logs_array) > self::$log_limit ) {\n\t\t\t$trim = count($logs_array) - self::$log_limit;\n\t\t\t$logs_array = array_slice($logs_array, $trim);\n\t\t}\n\t\t\n\t\t/* Update logs meta */\n\t\tupdate_post_meta( $log_data['rule_id'] , '_automation_logs' , json_encode($logs_array) );\n\n\t}",
"public static function accessLog(){\n\t\t$al = new AccessLogModel();\n\t\t$ip = new Ip();\n\t\t$type \t= 1;\n\t\t$spider = 'null';\n\t\t$ipaddr\t= self::getIp();\n\t\t$addr \t= $ip->ip2addr($ipaddr);\n\t\t$date\t= date('Y-m-d');\n\t\tif(self::is_spider()){\n\t\t\t$spider = self::robot();\n\t\t\t$type = 2;\n\t\t}\n\t\t$data = [\n\t\t\t\t'ip'\t\t=> $ipaddr,\n\t\t\t\t'type'\t\t=> $type,\n\t\t\t\t'spider'\t=> $spider,\n\t\t\t\t'num'\t\t=> 1,\n\t\t\t\t'country'\t=> $addr['country'],\n\t\t\t\t'area'\t\t=> $addr['area'],\n\t\t\t\t'cdate' \t=> $date,\n\t\t];\n\t\t$find = $al->where(\"ip = '\".$ipaddr.\"' AND cdate = '\".$date.\"'\")->fRow();\n\t\tif($find){\n\t\t\t$data['num'] = $find['num'] + 1;\n\t\t\t$al->where('id ='.$find['id'])->update($data);\n\t\t}else{\n\t\t\t$al->insert($data);\n\t\t}\t\t\n\t}",
"public function addLog ( $keys, $received, $sent, $base_string, $notes, $user_id = null ) { }",
"function logMe($comment, $status_id = 0, $data = array(), $update_process = 0) {\n\n if (!class_exists('systemToolkit')) {\n return; // not loaded (cache fix)\n }\n $toolkit = systemToolkit::getInstance();\n $centerLogMapper = $toolkit->getMapper('log', 'log');\n\n if(count($data)) {\n ob_start();\n $i = 1;\n foreach($data as $d) {\n var_dump($d);\n if($i < count($data)) {\n echo \"<br />===<br />\";\n }\n $i++;\n }\n $err_content = ob_get_contents();\n ob_end_clean();\n $comment .= \"<br />{$err_content}\";\n }\n\n $log = $centerLogMapper->create();\n $log->setTime(new SQLFunction('UNIX_TIMESTAMP'));\n $log->setModule($toolkit->getRequest()->getModule());\n $log->setAction($toolkit->getRequest()->getAction());\n $log->setComment($comment);\n $log->setStatus($status_id);\n if ($user = systemToolkit::getInstance()->getUser()) {\n $log->setUser($user);\n }\n if ($update_process) {\n $log->setProcessId($update_process);\n }\n $centerLogMapper->save($log);\n}",
"function __saveLog() {\n $this->__UserLog->save($this->__UserLog->data,false);\n }",
"function create_run_log() {\n\n\t\t$this->log = new Log();\n\t\t$this->log->set_workflow_id( $this->get_id() );\n\t\t$this->log->set_date( new DateTime() );\n\n\t\tif ( $this->is_tracking_enabled() ) {\n\t\t\t$this->log->set_tracking_enabled( true );\n\n\t\t\tif ( $this->is_conversion_tracking_enabled() ) {\n\t\t\t\t$this->log->set_conversion_tracking_enabled( true );\n\t\t\t}\n\t\t}\n\n\t\t$this->log->save();\n\t\t$this->log->store_data_layer( $this->data_layer() );\n\n\t\tdo_action( 'automatewoo_create_run_log', $this->log, $this );\n\t}",
"function SaveLog( $logRef, & $savedLogs ) {\r\n\tarray_push( $savedLogs, $logRef );\r\n}",
"function logger_sensor_add($meter, $uid, $device, $created, $token, $permissions, $function = NULL, $type = ENERGY_CONSUMPTION_SENSOR_TYPE, $virtual = 1, $forecast = 0, $latitude = LOGGER_DEFAULT_LATITUDE, $longitude = LOGGER_DEFAULT_LONGITUDE, $price = 0.18) {\n\n module_load_include('inc', 'logger', 'logger.rrd');\n\n $error = db_insert('logger_meters')\n ->fields(array(\n 'meter' => $meter,\n 'uid' => $uid,\n 'device' => $device,\n 'external_id' => $meter,\n 'created' => $created,\n 'function' => $function,\n 'type' => $type,\n 'virtual' => $virtual,\n 'unit_id' => WH_UNIT_ID,\n 'forecast' => $forecast,\n 'latitude' => $latitude,\n 'longitude' => $longitude,\n 'price' => $price\n ))\n ->execute();\n\n if (!$error) {\n $error = db_insert('logger_tokens')\n ->fields(array(\n 'token' => $token,\n 'meter' => $meter,\n 'permissions' => $permissions\n ))\n ->execute();\n }\n\n if (!$error) {\n\n foreach (logger_rrd_get_storage_periods() as $resolution => $period) {\n\n $error = db_insert('logger_meter_storage_period')\n ->fields(array(\n 'meter' => $meter,\n 'resolution' => $resolution,\n 'period' => $period\n ))\n ->execute();\n\n if ($error) {\n break; \n }\n }\n }\n return !$error;\n}",
"public function addTrackPoint(TrackPoint $point){\n $this->trackPoints[] = $point; \n return $point;\n }",
"function log()\n {\n }",
"function WriteAuditTrailOnAdd(&$rs) {\n\t\tglobal $Language;\n\t\tif (!$this->AuditTrailOnAdd) return;\n\t\t$table = 't_gaji_detail';\n\n\t\t// Get key value\n\t\t$key = \"\";\n\t\tif ($key <> \"\") $key .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t$key .= $rs['gjd_id'];\n\n\t\t// Write Audit Trail\n\t\t$dt = ew_StdCurrentDateTime();\n\t\t$id = ew_ScriptName();\n\t\t$usr = CurrentUserName();\n\t\tforeach (array_keys($rs) as $fldname) {\n\t\t\tif (array_key_exists($fldname, $this->fields) && $this->fields[$fldname]->FldDataType <> EW_DATATYPE_BLOB) { // Ignore BLOB fields\n\t\t\t\tif ($this->fields[$fldname]->FldHtmlTag == \"PASSWORD\") {\n\t\t\t\t\t$newvalue = $Language->Phrase(\"PasswordMask\"); // Password Field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_MEMO) {\n\t\t\t\t\tif (EW_AUDIT_TRAIL_TO_DATABASE)\n\t\t\t\t\t\t$newvalue = $rs[$fldname];\n\t\t\t\t\telse\n\t\t\t\t\t\t$newvalue = \"[MEMO]\"; // Memo Field\n\t\t\t\t} elseif ($this->fields[$fldname]->FldDataType == EW_DATATYPE_XML) {\n\t\t\t\t\t$newvalue = \"[XML]\"; // XML Field\n\t\t\t\t} else {\n\t\t\t\t\t$newvalue = $rs[$fldname];\n\t\t\t\t}\n\t\t\t\tew_WriteAuditTrail(\"log\", $dt, $id, $usr, \"A\", $table, $fldname, $key, \"\", $newvalue);\n\t\t\t}\n\t\t}\n\t}",
"public function logPerformance();",
"public function logPerformance();",
"function pushCurrentTimeLog()\n\t{\n\t\tarray_push($this->Time_Log, $this->Current_TimeLog);\n\t\t$this->setCurrentTimeLog(NULL);\n\t}",
"protected function log() {\n }",
"public function toLogEntry();",
"public function logManagerAction() {\r\n $key = $this->object ? $this->object->get($this->primaryKeyField) :\r\n $this->getProperty('elementType') . ' ' . $this->getProperty('elementId') . ' Default';\r\n $this->modx->logManagerAction($this->objectType.'_update_from_element', $this->classKey, $key);\r\n }",
"function getInterceptionPoints() ;",
"function add_log_entry(log_op_move $entry) {\n array_unshift($this->log_op_list, $entry);\n }",
"function firephp_ep_log()\n{\n global $REX, $firephp;\n\n ob_start();\n\n if(!$firephp) {\n $firephp = firephp_init();\n }\n\n // EP LOG\n ////////////////////////////////////////////////////////////////////////////\n if(is_object($firephp))\n {\n if(isset($REX['EXTENSION_POINT_LOG']))\n {\n $focus = explode(',',$REX[\"ADDON\"][\"__firephp\"][\"settings\"][\"ep_log_focus\"]);\n if(count($focus)===1 && $focus[0]==''){\n $focus = null;\n }\n\n function focus_match($name,$focus){\n foreach($focus as $pattern){\n $pattern = str_replace('*','(.)*',$pattern);\n if(preg_match('/'.$pattern.'/',$name)){\n return true;\n }\n }\n return false;\n }\n\n $registered_eps = array();\n $table = array();\n $table[] = array('#','Type','Timing','ExtensionPoint','Callable','$subject','$params','$read_only','$REX[EXTENSIONS]','$result');\n\n foreach($REX['EXTENSION_POINT_LOG'] as $k=>$v)\n {\n $i = $k+1;\n switch($v['type'])\n {\n case'EP':\n if($focus!==null && (!in_array($v['name'],$focus) && focus_match($v['name'],$focus)===false) ) {\n break;\n }\n $registered_eps[] = $v['name'];\n $table[] = array($i,$v['type'],'–',$v['name'],'–',$v['$subject'],$v['$params'],$v['$read_only'],$v['$REX[EXTENSIONS]'],$v['$result']);\n break;\n\n case'EXT':\n if($focus!==null && (!in_array($v['name'],$focus) && focus_match($v['name'],$focus)===false) ) {\n break;\n }\n $timing = in_array($v['name'],$registered_eps) ? 'late' : 'ok';\n if(is_array($v['$callable']))\n {\n if(is_object($v['$callable'][0])){\n $v['$callable'][0] = get_class($v['$callable'][0]);\n }\n $v['$callable'] = implode('::',$v['$callable']);\n }\n $table[] = array($i,$v['type'],$timing,$v['name'],$v['$callable'],'–',$v['$params'],'–','–','–');\n break;\n }\n }\n\n $firephp->table('EP LOG ('.$i.' calls)',$table);\n }\n else\n {\n $firephp->warn('EP Log nicht verfügbar.. vermutl. ist die gepatchte Datei \"function_rex_extension.inc.php\" nicht installiert worden.');\n }\n }\n\n}",
"function account_log()\n {\n }",
"private function add_log($log) {\n $this->log .= \" \" . $log;\n }",
"function track_log_entries($type=array()) {\r\n $args = func_get_args();\r\n $mkt_id ='';\r\n //if one of the arguments is marketing ID, then we need to filter by it\r\n foreach($args as $arg){\r\n if(isset($arg['EMAIL_MARKETING_ID_VALUE'])){\r\n $mkt_id = $arg['EMAIL_MARKETING_ID_VALUE'];\r\n }\r\n }\r\n\t\tif (empty($type)) \r\n\t\t\t$type[0]='targeted';\r\n\t\t$this->load_relationship('log_entries');\r\n\t\t$query_array = $this->log_entries->getQuery(true);\r\n\t\t$query_array['select'] =\"SELECT campaign_log.* \";\r\n\t\t$query_array['where'] = $query_array['where']. \" AND activity_type='{$type[0]}' AND archived=0\";\r\n //add filtering by marketing id, if it exists\r\n if (!empty($mkt_id)) $query_array['where'] = $query_array['where']. \" AND marketing_id ='$mkt_id' \";\r\n\t\treturn (implode(\" \",$query_array));\r\n\t}",
"public function olog( $obj )\n\t{\n\t\t$this->buffer .= $this->log( json_encode($obj) );\n\t}",
"public function __invoke($param)\n {\n $this->addLog($param);\n }",
"public function log($log) {\n //$this->log = $log;\n }",
"public function actionLog()\n {\n $searchModel = new LogGeoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('log', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'users' => (new User())->getUsers('name'),\n 'severities' => ArrayHelper::map(Severity::find()->all(), 'name', 'name'),\n 'actions' => LogGeo::find()->select('action')->indexBy('action')->asArray()->column()\n ]);\n }",
"public function __construct()\n {\n parent::__construct('Log', 'gems__log_activity', 'gla', true);\n $this->addTable('gems__log_setup', array('gla_action' => 'gls_id_action'))\n ->addLeftTable('gems__respondents', array('gla_respondent_id' => 'grs_id_user'))\n ->addLeftTable('gems__staff', array('gla_by' => 'gsf_id_user'));\n\n $this->setKeys(array(\\Gems_Model::LOG_ITEM_ID => 'gla_id'));\n }",
"function shipments_transit_log()\r\n\t\t{\r\n\t\t\t$this->erpm->auth(PNH_SHIPMENT_MANAGER|CALLCENTER_ROLE);\r\n\t\t\t$data['page']='pnh_shipments_transit_log';\r\n\t\t\t$this->load->view('admin',$data);\r\n\t\t}",
"function econsole_add_instance($econsole) {\r\n \r\n // temp added for debugging\r\n\t//echo \"ADD INSTANCE CALLED\";\r\n \t// print_object($econsole);\r\n \r\n $econsole->timecreated = time();\r\n\r\n # May have to add extra stuff in here #\r\n \r\n return insert_record(\"econsole\", $econsole);\r\n}",
"abstract public function logData( $data );",
"public function logActionLogItem($actionLogItem) {\n\t\tif ($actionLogItem === null) {\n\t\t\tthrow new Exception(\"actionlogitem must not be null\");\n\t\t}\n\t\t$validationState = new ValidationState();\n\t\t$actionLogItem = $this->repository->createActionLogItem($actionLogItem, $validationState);\n\t\t$this->repository->addUserPoints($actionLogItem->userId, $actionLogItem->points);\n\t\treturn $actionLogItem->points;\n\t}",
"static function add_a_lead($lead_id, $log){\n\t\tglobal $wpdb;\n\t\t$table = self::get_offline_table();\n\t\t\n\t\treturn $wpdb->insert($table, array('lead_id'=>$lead_id, 'log'=>serialize($log)), array('%d', '%s'));\n\t}",
"private function log($endpoint,$response)\n\t{\n\t\t$data =\n\t\t[\n\t\t\t'key_id'\t=> $this->key_id,\n\t\t\t'endpoint'\t=> $endpoint,\n\t\t\t'date'\t\t=> date('Y-m-d H:m:s'),\n\t\t\t'result'\t=> $response\n\t\t];\n\t\t$this->db->insert('nct_api_requests',$data);\n\t}",
"private static function addLog($msg) {\n\t\tself::$log[] = '\"'.formatTimestamp(time()).' - '.$msg.'\"';\n\t}",
"function logDimension()\r\n {\r\n \r\n }",
"function addPoint()\r\n{\r\n\t// --------- GLOBALIZE ---------\r\n\tglobal $db;\r\n\t// The 1st alias\r\n\t$name = GET_INC('name');\r\n\t// City? Lng? Lat?\r\n\t$city = GET_INC('city');\r\n\t$lng = GET_INC('lng');\r\n\t$lat = GET_INC('lat');\r\n\t// We need user ID\r\n\t$uid = GET_INC('uid');\r\n\t// Query?\r\n\t// Looks simple...\r\n\t$db->connDB();\r\n\t// insert into db\r\n\t$db->insert('bus_station', \"NULL,{$city},{$lng},{$lat}\");\r\n\t// get ID\r\n\t$db->query('SELECT MAX(id) FROM bus_station;');\r\n\t$res = $db->fetch_array();\r\n\t// insert 1st alias\r\n\t$db->insert('bus_sname', \"{$res[0]},{$name}\");\r\n\t// close db\r\n\t$db->closeDB();\r\n}",
"public function add($data){\n\t\t$this->db->insert('projects_pledges_log', $data); \n\t}",
"function Homelog($user_name,$action,$class_name,$class_obj,$result){\n if(empty($user_name)||empty($action)||empty($class_name)||empty($class_obj)||empty($result)){\n return false;\n }\n $data=array(\n \"user_name\"=>$user_name,\n \"action\"=>$action,\n \"class_name\"=>$class_name,\n \"class_obj\"=>$class_obj,\n \"result\"=>$result,\n \"op_time\"=>time()\n );\n $res=M(\"Sys_log\")->add($data);\n return $res;\n}",
"protected function AutoLog(){\r\n \r\n //DEPRECATED for test\r\n \r\n }",
"public function __construct() {\n\t\t$view_event = ( isset( \\REALTY_BLOC_LOG::$option['view_event'] ) ? \\REALTY_BLOC_LOG::$option['view_event'] : array() );\n\n\t\t// Property Page view log\n\t\tif ( isset( $view_event['property'] ) and $view_event['property'] == \"on\" ) {\n\t\t\tadd_action( 'rb_page_view_property_log', array( $this, 'save_property' ), 10, 5 );\n\t\t}\n\n\t\t// building Page View log\n\t\tif ( isset( $view_event['building'] ) and $view_event['building'] == \"on\" ) {\n\t\t\tadd_action( 'rb_page_view_building_log', array( $this, 'save_building' ), 10, 5 );\n\t\t}\n\t}",
"function add_point($data)\n {\n // $this->db->insert('kegiatan',$params);\n // return $this->db->insert_id();\n return $this->db->insert('point', $data);\n }",
"public function afterSave() \n {\n LogProduct::log($this);\n }",
"public function log($hook_name, $point = '')\n {\n $this->backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n unset($this->backtrace[0], $this->backtrace[1]);\n $caller = $this->registerHook($hook_name, $point);\n return ['hook_name' => $hook_name, 'point' => $point, 'caller' => $caller, 'time' => microtime(true)];\n }",
"public function log_query()\n\t{\n\t\t$query = $this->get_query();\n\n\t\tif ( ! $query ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! is_array( $query ) && ! is_object( $query ) ) {\n\t\t\t$query = [ $query ];\n\t\t}\n\n\t\t$log = new Charcoal_Log;\n\t\t$log->event_type = $this->event_type;\n\t\t$log->data = $query;\n\t\t$log->save();\n\t}",
"public function logPush($userId) {\n\n $data = array(\n 'dl_agentid' => $userId,\n 'dl_access' => new Zend_Db_Expr('NOW()')\n );\n\n return $this->insert($data);\n }",
"public function log_activity() {\n\t\t$data = array();\n\t\t$data['page'] = current_url();\n\t\t$data['ip_address'] = $this->_ci->input->ip_address();\n\t\t$data['user_agent'] = $this->_ci->agent->agent_string(); \n\t\t$data['request_method'] = $this->_ci->input->server('REQUEST_METHOD');\n\t\t$data['request_params'] = serialize($this->_ci->input->get_post(NULL, TRUE)); \n\t\t$data['uri_string'] = $this->_ci->uri->uri_string();\n\t\t$data['created_at'] = date('Y-m-d h:i:s');\n\n\t\tif($this->verify_activity()) {\n\t\t\t// And write it to the database\n\t\t\t$this->_ci->db->insert('hooks', $data);\n\t\t}\n\t}",
"public function log()\n {\n $this->appendLog('log', \\func_get_args());\n }",
"public function addLog($msg, $type, $comments = '', $funcName = '')\n {\n \tLog::LogEntity($this, $msg, $type, $comments, $funcName);\n \treturn $this;\n }",
"function wpgeoip_add_log($action, $message) {\n\tglobal $wpdb;\n\t$action = $wpdb->escape($action);\n\t$message = $wpdb->escape($message);\n\t$wpdb->query(\"INSERT INTO wpgeoip_log VALUES (null, '$action', '$message')\");\n}",
"public static function rs_insert_google_plus_share_points($pointsredeemed,$getregularprice,$postid, $level,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail){\n \n $rewardpoints = array('0');\n $rewardpercents = array('0'); \n\n //Product Level Points and Percent\n $gettype = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($postid, '_social_rewardsystem_options_google');\n $getpoints = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($postid, '_socialrewardsystempoints_google');\n $getpercent = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($postid, '_socialrewardsystempercent_google');\n $pointconversion = get_option('rs_earn_point');\n $pointconversionvalue = get_option('rs_earn_point_value');\n $getaverage = $getpercent / 100;\n $getaveragepoints = $getaverage * $getregularprice;\n $pointswithvalue = $getaveragepoints * $pointconversion;\n $rewardpercentsforproductlevel = $pointswithvalue / $pointconversionvalue;\n\n //Category Level Points and Percent\n $categorylist = wp_get_post_terms($postid, 'product_cat');\n $getcount = count($categorylist);\n $term = get_the_terms($postid,'product_cat');\n if(is_array($term)) {\n foreach ($term as $terms) {\n $termid = $terms->term_id; \n $categorylevelrewardtype = RSFunctionForSavingMetaValues::rewardsystem_get_woocommerce_term_meta($termid, 'social_google_enable_rs_rule');\n $categorylevelrewardpoints = RSFunctionForSavingMetaValues::rewardsystem_get_woocommerce_term_meta($termid, 'social_google_rs_category_points');\n $categorylevelrewardpercents = RSFunctionForSavingMetaValues::rewardsystem_get_woocommerce_term_meta($termid, 'social_google_rs_category_percent');\n $pointconversion = get_option('rs_earn_point');\n $pointconversionvalue = get_option('rs_earn_point_value');\n $getaverage = $categorylevelrewardpercents / 100;\n $getaveragepoints = $categorylevelrewardpercents * $getregularprice;\n $pointswithvalue = $getaveragepoints * $pointconversion;\n $rewardpercentsforcategorylevel = $pointswithvalue / $pointconversionvalue;\n \n //Global Level Points and Percent\n $global_reward_type = get_option('rs_global_social_reward_type_google');\n $global_reward_points = get_option('rs_global_social_google_reward_points');\n $global_reward_percent = get_option('rs_global_social_google_reward_percent');\n $pointconversion = get_option('rs_earn_point');\n $pointconversionvalue = get_option('rs_earn_point_value');\n $getaverage = $global_reward_percent / 100;\n $getaveragepoints = $global_reward_percent * $getregularprice;\n $pointswithvalue = $getaveragepoints * $pointconversion;\n $rewardpercentsforgloballevel = $pointswithvalue / $pointconversionvalue;\n \n if($getcount > 1){ \n if($categorylevelrewardpoints == ''){\n $rewardpoints[] = $global_reward_points;\n }else{\n $rewardpoints[] = $categorylevelrewardpoints;\n }\n \n if($categorylevelrewardpercents == ''){\n $rewardpercents[] = $rewardpercentsforgloballevel;\n } else{\n $rewardpercents[] = $rewardpercentsforcategorylevel;\n } \n } else { \n if($categorylevelrewardpoints == ''){\n $rewardpoints[] = $global_reward_points;\n }else{\n $rewardpoints[] = $categorylevelrewardpoints;\n }\n \n if($categorylevelrewardpercents == ''){\n $rewardpercents[] = $rewardpercentsforgloballevel;\n } else{\n $rewardpercents[] = $rewardpercentsforcategorylevel;\n } \n }\n }\n }else {\n $global_reward_type = get_option('rs_global_social_reward_type_google');\n $global_reward_points = get_option('rs_global_social_google_reward_points');\n $global_reward_percent = get_option('rs_global_social_google_reward_percent');\n $pointconversion = get_option('rs_earn_point');\n $pointconversionvalue = get_option('rs_earn_point_value');\n $getaverage = $global_reward_percent / 100;\n $getaveragepoints = $global_reward_percent * $getregularprice;\n $pointswithvalue = $getaveragepoints * $pointconversion;\n $rewardpercentsforgloballevel = $pointswithvalue / $pointconversionvalue;\n }\n \n $getcategorypoints = max($rewardpoints);\n $getcategorypercent = max($rewardpercents);\n $restrictuserpoints = get_option('rs_max_earning_points_for_user');\n $enabledisablemaxpoints = get_option('rs_enable_disable_max_earning_points_for_user');\n $order_id = '0';\n $variationid = '0';\n $refuserid = '0';\n $equredeemamt = '0';\n $pointsredeemed = '0';\n $totalearnedpoints = '0';\n $totalredeempoints = '0';\n $reasonindetail = '';\n $noofdays = get_option('rs_point_to_be_expire');\n if(($noofdays != '0')&& ($noofdays != '')){\n $date = time() + ($noofdays * 24 * 60 * 60); \n }else{\n $date = '999999999999';\n }\n switch ($level) {\n case '1':\n if ($gettype == '1') { \n if($enabledisablemaxpoints == 'yes'){\n if(($restrictuserpoints != '') && ($restrictuserpoints != '0')){\n $getoldpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n if($getoldpoints <= $restrictuserpoints){\n $totalpointss = $getoldpoints + $getpoints;\n if($totalpointss <= $restrictuserpoints){\n $productlevelrewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $getpoints); \n RSPointExpiry::insert_earning_points($currentuserid, $productlevelrewardpointss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($productlevelrewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $productlevelrewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }else{\n $insertpoints = $restrictuserpoints - $getoldpoints;\n RSPointExpiry::insert_earning_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$order_id,$totalearnedpoints,$totalredeempoints,'');\n $equearnamt = RSPointExpiry::earning_conversion_settings($insertpoints);\n $equredeemamt = RSPointExpiry::redeeming_conversion_settings($pointsredeemed); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$equearnamt,$equredeemamt,$order_id,$productid,'0','0','',$totalpoints,'','0'); \n }\n }else{\n RSPointExpiry::insert_earning_points($currentuserid,'0','0',$date,'MREPFU',$order_id,'0','0','');\n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, '0','0',$date,'MREPFU','0','0',$order_id,'0','0','0','',$totalpoints,'','0'); \n }\n }else{\n $productlevelrewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $getpoints); \n RSPointExpiry::insert_earning_points($currentuserid, $productlevelrewardpointss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($productlevelrewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $productlevelrewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }\n }else{\n $productlevelrewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $getpoints); \n RSPointExpiry::insert_earning_points($currentuserid, $productlevelrewardpointss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($productlevelrewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $productlevelrewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n } \n } else {\n \n if($enabledisablemaxpoints == 'yes'){\n if(($restrictuserpoints != '') && ($restrictuserpoints != '0')){\n $getoldpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n if($getoldpoints <= $restrictuserpoints){\n $totalpointss = $getoldpoints + $rewardpercentsforproductlevel;\n if($totalpointss <= $restrictuserpoints){\n $productlevelrewardpercentss = RSMemberFunction::user_role_based_reward_points($currentuserid, $rewardpercentsforproductlevel); \n RSPointExpiry::insert_earning_points($currentuserid, $productlevelrewardpercentss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($productlevelrewardpercentss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $productlevelrewardpercentss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }else{\n $insertpoints = $restrictuserpoints - $getoldpoints;\n RSPointExpiry::insert_earning_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$order_id,$totalearnedpoints,$totalredeempoints,'');\n $equearnamt = RSPointExpiry::earning_conversion_settings($insertpoints);\n $equredeemamt = RSPointExpiry::redeeming_conversion_settings($pointsredeemed); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$equearnamt,$equredeemamt,$order_id,$productid,'0','0','',$totalpoints,'','0'); \n }\n }else{\n RSPointExpiry::insert_earning_points($currentuserid,'0','0',$date,'MREPFU',$order_id,'0','0','');\n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, '0','0',$date,'MREPFU','0','0',$order_id,'0','0','0','',$totalpoints,'','0'); \n }\n }else{\n $productlevelrewardpercentss = RSMemberFunction::user_role_based_reward_points($currentuserid, $rewardpercentsforproductlevel); \n RSPointExpiry::insert_earning_points($currentuserid, $productlevelrewardpercentss,$pointsredeemed, $date,'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($productlevelrewardpercentss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $productlevelrewardpercentss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }\n }else{\n $productlevelrewardpercentss = RSMemberFunction::user_role_based_reward_points($currentuserid, $rewardpercentsforproductlevel); \n RSPointExpiry::insert_earning_points($currentuserid, $productlevelrewardpercentss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($productlevelrewardpercentss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $productlevelrewardpercentss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n } \n }\n break;\n case '2':\n if ($categorylevelrewardtype == '1') {\n if($enabledisablemaxpoints == 'yes'){\n if(($restrictuserpoints != '') && ($restrictuserpoints != '0')){\n $getoldpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n if($getoldpoints <= $restrictuserpoints){\n $totalpointss = $getoldpoints + $getcategorypoints;\n if($totalpointss <= $restrictuserpoints){\n $categorylevelrewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $getcategorypoints); \n RSPointExpiry::insert_earning_points($currentuserid, $categorylevelrewardpointss,$pointsredeemed, $date,'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($categorylevelrewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $categorylevelrewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }else{\n $insertpoints = $restrictuserpoints - $getoldpoints;\n RSPointExpiry::insert_earning_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$order_id,$totalearnedpoints,$totalredeempoints,'');\n $equearnamt = RSPointExpiry::earning_conversion_settings($insertpoints);\n $equredeemamt = RSPointExpiry::redeeming_conversion_settings($pointsredeemed); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$equearnamt,$equredeemamt,$order_id,$productid,'0','0','',$totalpoints,'','0'); \n }\n }else{\n RSPointExpiry::insert_earning_points($currentuserid,'0','0',$date,'MREPFU',$order_id,'0','0','');\n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, '0','0',$date,'MREPFU','0','0',$order_id,'0','0','0','',$totalpoints,'','0'); \n }\n }else{\n $categorylevelrewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $getcategorypoints); \n RSPointExpiry::insert_earning_points($currentuserid, $categorylevelrewardpointss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($categorylevelrewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $categorylevelrewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }\n }else{\n $categorylevelrewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $getcategorypoints); \n RSPointExpiry::insert_earning_points($currentuserid, $categorylevelrewardpointss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($categorylevelrewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $categorylevelrewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n } \n } else {\n if($enabledisablemaxpoints == 'yes'){\n if(($restrictuserpoints != '') && ($restrictuserpoints != '0')){\n $getoldpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n if($getoldpoints <= $restrictuserpoints){\n $totalpointss = $getoldpoints + $getcategorypercent;\n if($totalpointss <= $restrictuserpoints){\n $categorylevelrewardpercents = RSMemberFunction::user_role_based_reward_points($currentuserid, $getcategorypercent); \n RSPointExpiry::insert_earning_points($currentuserid, $categorylevelrewardpercents,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($categorylevelrewardpercents); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $categorylevelrewardpercents,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }else{\n $insertpoints = $restrictuserpoints - $getoldpoints;\n RSPointExpiry::insert_earning_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$order_id,$totalearnedpoints,$totalredeempoints,'');\n $equearnamt = RSPointExpiry::earning_conversion_settings($insertpoints);\n $equredeemamt = RSPointExpiry::redeeming_conversion_settings($pointsredeemed); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$equearnamt,$equredeemamt,$order_id,$productid,'0','0','',$totalpoints,'','0'); \n }\n }else{\n RSPointExpiry::insert_earning_points($currentuserid,'0','0',$date,'MREPFU',$order_id,'0','0','');\n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, '0','0',$date,'MREPFU','0','0',$order_id,'0','0','0','',$totalpoints,'','0'); \n }\n }else{\n $categorylevelrewardpercents = RSMemberFunction::user_role_based_reward_points($currentuserid, $getcategorypercent); \n RSPointExpiry::insert_earning_points($currentuserid, $categorylevelrewardpercents,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($categorylevelrewardpercents); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $categorylevelrewardpercents,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }\n }else{\n $categorylevelrewardpercents = RSMemberFunction::user_role_based_reward_points($currentuserid, $getcategorypercent); \n RSPointExpiry::insert_earning_points($currentuserid, $categorylevelrewardpercents,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($categorylevelrewardpercents); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $categorylevelrewardpercents,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n } \n }\n break;\n case '3':\n if ($global_reward_type == '1') {\n if($enabledisablemaxpoints == 'yes'){\n if(($restrictuserpoints != '') && ($restrictuserpoints != '0')){\n $getoldpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n if($getoldpoints <= $restrictuserpoints){\n $totalpointss = $getoldpoints + $global_reward_points;\n if($totalpointss <= $restrictuserpoints){\n $global_rewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $global_reward_points); \n RSPointExpiry::insert_earning_points($currentuserid, $global_rewardpointss,$pointsredeemed, $date,'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($global_rewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $global_rewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }else{\n $insertpoints = $restrictuserpoints - $getoldpoints;\n RSPointExpiry::insert_earning_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$order_id,$totalearnedpoints,$totalredeempoints,'');\n $equearnamt = RSPointExpiry::earning_conversion_settings($insertpoints);\n $equredeemamt = RSPointExpiry::redeeming_conversion_settings($pointsredeemed); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$equearnamt,$equredeemamt,$order_id,$productid,'0','0','',$totalpoints,'','0'); \n }\n }else{\n RSPointExpiry::insert_earning_points($currentuserid,'0','0',$date,'MREPFU',$order_id,'0','0','');\n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, '0','0',$date,'MREPFU','0','0',$order_id,'0','0','0','',$totalpoints,'','0'); \n }\n }else{\n $global_rewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $global_reward_points); \n RSPointExpiry::insert_earning_points($currentuserid, $global_rewardpointss,$pointsredeemed, $date,'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($global_rewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $global_rewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }\n }else{\n $global_rewardpointss = RSMemberFunction::user_role_based_reward_points($currentuserid, $global_reward_points); \n RSPointExpiry::insert_earning_points($currentuserid, $global_rewardpointss,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($global_rewardpointss); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $global_rewardpointss,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n } \n } else {\n if($enabledisablemaxpoints == 'yes'){\n if(($restrictuserpoints != '') && ($restrictuserpoints != '0')){\n $getoldpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n if($getoldpoints <= $restrictuserpoints){\n $totalpointss = $getoldpoints + $rewardpercentsforgloballevel;\n if($totalpointss <= $restrictuserpoints){\n $global_rewardpercents = RSMemberFunction::user_role_based_reward_points($currentuserid, $rewardpercentsforgloballevel); \n RSPointExpiry::insert_earning_points($currentuserid, $global_rewardpercents,$pointsredeemed,$date, 'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($global_rewardpercents); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $global_rewardpercents,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }else{\n $insertpoints = $restrictuserpoints - $getoldpoints;\n RSPointExpiry::insert_earning_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$order_id,$totalearnedpoints,$totalredeempoints,'');\n $equearnamt = RSPointExpiry::earning_conversion_settings($insertpoints);\n $equredeemamt = RSPointExpiry::redeeming_conversion_settings($pointsredeemed); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $insertpoints,$pointsredeemed,$date,'MREPFU',$equearnamt,$equredeemamt,$order_id,$productid,'0','0','',$totalpoints,'','0'); \n }\n }else{\n RSPointExpiry::insert_earning_points($currentuserid,'0','0',$date,'MREPFU',$order_id,'0','0','');\n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, '0','0',$date,'MREPFU','0','0',$order_id,'0','0','0','',$totalpoints,'','0'); \n }\n }else{\n $global_rewardpercents = RSMemberFunction::user_role_based_reward_points($currentuserid, $rewardpercentsforgloballevel); \n RSPointExpiry::insert_earning_points($currentuserid, $global_rewardpercents,$pointsredeemed, $date,'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($global_rewardpercents); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $global_rewardpercents,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n }\n }else{\n $global_rewardpercents = RSMemberFunction::user_role_based_reward_points($currentuserid, $rewardpercentsforgloballevel); \n RSPointExpiry::insert_earning_points($currentuserid, $global_rewardpercents,$pointsredeemed, $date,'RPGPOS',$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n $equearnamt = RSPointExpiry::earning_conversion_settings($global_rewardpercents); \n $totalpoints = RSPointExpiry::get_sum_of_total_earned_points($currentuserid);\n RSPointExpiry::record_the_points($currentuserid, $global_rewardpercents,$pointsredeemed,$date,'RPGPOS',$equearnamt,$equredeemamt,$order_id,$productid,$variationid,$refuserid,'',$totalpoints,'','0');\n } \n }\n break;\n }\n }",
"function cp_admin_logs()\n{\n?>\n\n\t<div class=\"wrap\">\n\t\t<h2>CubePoints - <?php _e('Logs', 'cp'); ?></h2>\n\t\t<?php _e('View recent point transactions.', 'cp'); ?><br /><br />\n\t\t<?php cp_show_logs('all', apply_filters('cp_admin_logs_limit', 0 ) , true); ?>\n\t</div>\n\t\n\t<?php do_action('cp_admin_logs'); ?>\n\t\n\t<?php\n}",
"protected function _initLog()\n {\n }",
"function save(){\n\t\tif (isset($this->id) && !$this->_new) {\n\t\t\t$sql = \"UPDATE `layer_points` set \";\n\t\t\t$i = 0;\n\t\t\tforeach($this->UPDATE as $u){\n\t\t\t\tif ($i>0) $sql = $sql.\" , \";\n\t\t\t\t$sql = $sql.$u;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$sql = $sql.\" WHERE `id`='\".addslashes($this->id).\"'\";\n\t\t}else{\n\t\t\t$sql = \"INSERT into `layer_points` values('\".addslashes($this->id).\"' , '\".addslashes($this->lid).\"' , '\".addslashes($this->name).\"' , '\".addslashes($this->lat).\"' , '\".addslashes($this->lon).\"' , '\".addslashes($this->alt).\"' , '\".addslashes($this->bf).\"' , '\".addslashes($this->lp_image).\"' , '\".addslashes($this->notes).\"')\";\n\t\t}\n\t\t$this->connection->send_query($sql);\n\t}",
"function turnitintooltwo_add_to_log($courseid, $eventname, $link, $desc, $cmid, $userid = 0) {\n global $USER;\n\n $eventname = str_replace(' ', '_', $eventname);\n $eventpath = '\\mod_turnitintooltwo\\event\\\\'.$eventname;\n\n $data = array(\n 'objectid' => $cmid,\n 'context' => ( $cmid == 0 ) ? context_course::instance($courseid) : context_module::instance($cmid),\n 'other' => array('desc' => $desc)\n );\n if (!empty($userid) && ($userid != $USER->id)) {\n $data['relateduserid'] = $userid;\n }\n $event = $eventpath::create($data);\n $event->trigger();\n}",
"public function log() {\r\n\t\t$this->resource->log();\r\n\t}",
"private function add_to_log($action) {\n if ($action) {\n $event = \\mod_simplecertificate\\event\\course_module_viewed::create(\n array(\n 'objectid' => $this->get_course_module()->instance,\n 'context' => $this->get_context(),\n 'other' => array('certificatecode' => $this->get_issue()->code)));\n $event->add_record_snapshot('course', $this->get_course());\n }\n\n if (!empty($event)) {\n $event->trigger();\n }\n }",
"function konversi_data($spout, $status = 0)\n{\n\n $spout_log = array();\n $spout_log[ kode ] = ($spout[ kode ]);\n $spout_log[ kode2 ] = ($spout[ kode2 ]);\n $spout_log[ kode3 ] = ($spout[ kode3 ]);\n $spout_log[ kode4 ] = ($spout[ kode4 ]);\n $spout_log[ kode5 ] = ($spout[ kode5 ]);\n $spout_log[ Uraian ] = ($spout[ Uraian ]);\n if($status == 0) {\n $spout_log[ no_aset ] = ($spout[ no_aset ]);\n $spout_log[ riwayat ] = ($spout[ riwayat ]);\n } else {\n $spout_log[ no_aset ] = ($spout[ Aset_ID ]);\n $spout_log[ riwayat ] = ($spout[ log_id ]);\n }\n $spout_log[ saldo_awal_jml ] = abs ($spout[ saldo_awal_jml ]);\n $spout_log[ saldo_awal_nilai ] = abs ($spout[ saldo_awal_nilai ]);\n $spout_log[ saldo_awal_akm ] = abs ($spout[ saldo_awal_akm ]);\n $spout_log[ saldo_awal_nilaibuku ] = abs ($spout[ saldo_awal_nilaibuku ]);\n\n $spout_log[ koreksi_tambah_jml ] = abs ($spout[ koreksi_tambah_jml ]);\n $spout_log[ koreksi_tambah_nilai ] = abs ($spout[ koreksi_tambah_nilai ]);\n \n $spout_log[ bj_aset_baru ] = abs ($spout[ bj_aset_baru ]);\n $spout_log[ bj_aset_kapitalisasi ] = abs ($spout[ bj_aset_kapitalisasi ]);\n\n $spout_log[ bj_total_brg ] = abs ($spout[ bj_total_brg ]);\n $spout_log[ bj_total_nilai ] = abs ($spout[ bj_total_nilai ]);\n\n $spout_log[ bm_aset_baru ] = abs ($spout[ bm_aset_baru ]);\n $spout_log[ bm_aset_kapitalisasi ] = abs ($spout[ bm_aset_kapitalisasi ]);\n $spout_log[ bm_total_nilai ] = abs ($spout[ bm_total_nilai ]);\n $spout_log[ bm_total_brg ] = abs ($spout[ bm_total_brg ]);\n \n $spout_log[ hibah_jml ] = abs ($spout[ hibah_jml ]);\n $spout_log[ hibah_nilai ] = abs ($spout[ hibah_nilai ]);\n $spout_log[ transfer_skpd_tambah_jml ] = abs ($spout[ transfer_skpd_tambah_jml ]);\n $spout_log[ transfer_skpd_tambah_nilai ] = abs ($spout[ transfer_skpd_tambah_nilai ]);\n\n $spout_log[ reklas_aset_tambah_jml ] = abs ($spout[ reklas_aset_tambah_jml ]);\n $spout_log[ reklas_aset_tambah_nilai ] = abs ($spout[ reklas_aset_tambah_nilai ]);\n\n\n $spout_log[ inventarisasi_jml ] = abs ($spout[ inventarisasi_jml ]);\n $spout_log[ inventarisasi_nilai ] = abs ($spout[ inventarisasi_nilai ]);\n \n $spout_log[ jumlah_mutasi_tambah_jml ] = abs ($spout[ jumlah_mutasi_tambah_jml ]);\n $spout_log[ jumlah_mutasi_tambah_nilai ] = abs ($spout[ jumlah_mutasi_tambah_nilai ]);\n $spout_log[ koreksi_penyusutan_tambah ] = abs ($spout[ koreksi_penyusutan_tambah ]);\n $spout_log[ bp_penyusutan_tambah ] = abs ($spout[ bp_penyusutan_tambah ]);\n $spout_log[ bp_berjalan ] = abs ($spout[ bp_berjalan ]);\n\n $spout_log[ koreksi_kurang_jml ] = abs ($spout[ koreksi_kurang_jml ]);\n $spout_log[ koreksi_kurang_nilai ] = abs ($spout[ koreksi_kurang_nilai ]);\n \n $spout_log[ hapus_hibah_nilai ] = abs ($spout[ hapus_hibah_nilai ]);\n $spout_log[ hapus_lelang_nilai ] = abs ($spout[ hapus_lelang_nilai ]);\n $spout_log[ hapus_hilang_musnah_nilai ] = abs ($spout[ hapus_hilang_musnah_nilai ]);\n $spout_log[ hapus_total_jml ] = abs ($spout[ hapus_total_jml ]);\n $spout_log[ hapus_total_nilai ] = abs ($spout[ hapus_total_nilai ]);\n \n $spout_log[ transfer_skpd_kurang_jml ] = abs ($spout[ transfer_skpd_kurang_jml ]);\n $spout_log[ transfer_skpd_kurang_nilai ] = abs ($spout[ transfer_skpd_kurang_nilai ]);\n\n $spout_log[ reklas_krg_aset_tetap ] = abs ($spout[ reklas_krg_aset_tetap ]);\n $spout_log[ reklas_krg_ekstra ] = abs ($spout[ reklas_krg_ekstra ]);\n $spout_log[ reklas_krg_aset_lain ] = abs ($spout[ reklas_krg_aset_lain ]);\n $spout_log[ reklas_krg_aset_bm_tdk_dikapitalisasi ] = abs ($spout[ reklas_krg_aset_bm_tdk_dikapitalisasi ]);\n\n $spout_log[ reklas_krg_jml ] = abs ($spout[ reklas_krg_jml ]);\n $spout_log[ reklas_krg_nilai ] = abs ($spout[ reklas_krg_nilai ]);\n \n $spout_log[ jumlah_mutasi_kurang_jml ] = abs ($spout[ jumlah_mutasi_kurang_jml ]);\n $spout_log[ jumlah_mutasi_kurang_nilai ] = abs ($spout[ jumlah_mutasi_kurang_nilai ]);\n $spout_log[ koreksi_penyusutan_kurang ] = abs ($spout[ koreksi_penyusutan_kurang ]);\n $spout_log[ bp_penyusutan_kurang ] = abs ($spout[ bp_penyusutan_kurang ]);\n \n $spout_log[ NilaiPerolehan ] = abs ($spout[ NilaiPerolehan ]);\n $spout_log[ Saldo_akhir_jml ] = abs ($spout[ Saldo_akhir_jml ]);\n $spout_log[ AkumulasiPenyusutan ] = abs ($spout[ AkumulasiPenyusutan ]);\n $spout_log[ NilaiBuku ] = abs ($spout[ NilaiBuku ]);\n\n\n $spout_log[ Kd_Riwayat ] = ($spout[ Kd_Riwayat ]);\n $spout_log[ log_data ] = ($spout[ log_data ]);\n return $spout_log;\n}",
"public function logDataView($external_id_value=null, $md_ids_viewed=array())\r\n\t{\r\n\t\t// Keep count of data points logged\r\n\t\t$num_logged = 0;\r\n\t\tif (!empty($md_ids_viewed)) \r\n\t\t{\r\n\t\t\t// Get the timestamp and external source field names for the md_id's\r\n\t\t\t$md_ids_data = array();\r\n\t\t\t$sql = \"select d.md_id, m.external_source_field_name, d.source_timestamp \r\n\t\t\t\t\tfrom redcap_ddp_records_data d, redcap_ddp_mapping m \r\n\t\t\t\t\twhere m.map_id = d.map_id and d.md_id in (\".prep_implode(array_unique($md_ids_viewed)).\") \r\n\t\t\t\t\tand m.project_id = \".$this->project_id.\"\";\r\n\t\t\t$q = db_query($sql);\r\n\t\t\tif (db_num_rows($q) < 1) return $num_logged;\r\n\t\t\twhile ($row = db_fetch_assoc($q)) {\r\n\t\t\t\t$md_ids_data[$row['md_id']] = array('field'=>$row['external_source_field_name'], 'timestamp'=>$row['source_timestamp']);\r\n\t\t\t}\r\n\t\t\t// Get ui_id of user\r\n\t\t\t$userInfo = User::getUserInfo(USERID);\r\n\t\t\t// Now log all these md_ids in mapping_logging table\r\n\t\t\t$sql = \"insert into redcap_ddp_log_view (time_viewed, user_id, project_id, source_id)\r\n\t\t\t\t\tvalues ('\".NOW.\"', \".checkNull($userInfo['ui_id']).\", \".$this->project_id.\", '\".prep($external_id_value).\"')\";\r\n\t\t\tif (db_query($sql)) {\r\n\t\t\t\t// Get ml_id from insert\r\n\t\t\t\t$ml_id = db_insert_id();\r\n\t\t\t\t// Now add each data point to mapping_logging_data table\r\n\t\t\t\tforeach ($md_ids_data as $md_id=>$attr) {\r\n\t\t\t\t\t$sql = \"insert into redcap_ddp_log_view_data (ml_id, source_field, source_timestamp, md_id)\r\n\t\t\t\t\t\t\tvalues ($ml_id, '\".prep($attr['field']).\"', \".checkNull($attr['timestamp']).\", $md_id)\";\r\n\t\t\t\t\tif (db_query($sql)) $num_logged++;\r\n\t\t\t\t}\r\n\t\t\t\t// If somehow no data points were logged, then remove this instance from logging table\r\n\t\t\t\tif ($num_logged == 0) {\r\n\t\t\t\t\t$sql = \"delete from redcap_ddp_log_view where ml_id = $ml_id\";\r\n\t\t\t\t\tdb_query($sql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Return count of data points that were logged as having been viewed\r\n\t\treturn $num_logged;\r\n\t}",
"function log_guest_pageview($op, $var){\r\n\t// op: getbydate, var: 2012-03-28\r\n\t// op: inc, var: ...\r\n\t\r\n\tif(!isset($op)){\r\n\t\t$op = func_arg(0);\r\n\t}\r\n\t\r\n\tif(!isset($var)){\r\n\t\t$var = func_arg(1);\r\n\t}\r\n\t\r\n\t$lilo_mongo = new LiloMongo();\r\n\t$lilo_mongo->selectDB('Logs');\r\n\t$lilo_mongo->selectCollection('PageView');\t// \r\n\t\r\n\t\r\n\t\r\n\t\r\n\t// jika ada, dapatkan dulu current value\r\n\t$criteria = array('tipe' => $achievement_type, 'userid' => $user_id);\r\n\t$curr_ach = $lilo_mongo->findOne($criteria);\r\n\t\r\n\tif(!($op == '' || $op == 'get') && count($curr_ach)){\r\n\t\t$lilo_mongo->selectCollection('AchievementLog');\r\n\t\t// sebelum isi db diubah, backup dulu ke table AchievementLog\r\n\t\t$curr_ach_log = array_merge((array)$curr_ach, array('q' => $_REQUEST['q'], 'time' => time()));\r\n\t\t$lilo_mongo->insert($curr_ach_log);\r\n\t}\r\n\t\r\n\t$lilo_mongo->selectCollection('Achievement');\r\n\r\n\tswitch($op){\r\n\t\tcase '':\r\n\t\tcase 'get':\r\n\t\t\treturn $curr_ach['value'];\r\n\t\t\tbreak;\r\n\t\tcase 'set':\r\n\t\t\t$lilo_mongo->update_set($criteria, array('value' => $value));\r\n\t\t\tbreak;\r\n\t\tcase 'inc':\r\n\t\t\t$lilo_mongo->update_set($criteria, array('value' => (int)$curr_ach['value'] + (int)$value));\r\n\t\t\tbreak;\r\n\t\tcase 'dec':\r\n\t\t\t$lilo_mongo->update_set($criteria, array('value' => (int)$curr_ach['value'] - (int)$value));\r\n\t\t\tbreak;\r\n\t}\r\n\t\r\n\treturn \"1\";\r\n\r\n\t\r\n}",
"public function setRecordLog() {\n \t$msg = '';\n \t$defaultFilterFields = array( 'id', 'modify_user_id' ,'modify_time', 'create_user_id', 'create_time','check_user_id','check_time');\n \t$addFilterFields = !empty($this->filterFields) ? $this->filterFields : array();\n \t$filterFields = array_merge($defaultFilterFields,$addFilterFields);\n \tforeach ( $this->getAttributes() as $key => $val ) {\n \t\tif ( ! $this->getIsNewRecord() && $val == $this->beforeSaveInfo[$key] ) {\n \t\t\tcontinue;\n \t\t}\n// \t\t$label = $this->getAttributeLabel($key);\n $label = get_class($this) . ':'.$key; //by shenll\n \t\tif (in_array($key, $filterFields)) {\n \t\t\tcontinue;\n \t\t}else {\n \t\t\tif ( $this->getIsNewRecord() ) {\n \t\t\t\t$msg .= MHelper::formatInsertFieldLog($label, $val);\n \t\t\t} else {\n \t\t\t\t$msg .= MHelper::formatUpdateFieldLog($label, $this->beforeSaveInfo[$key], $val);\n \t\t\t}\n \t\t}\n \t}\n //\treturn $msg;\n \t$this->addLogMsg($msg);\n }",
"function log_event( $plugin_name, $log_msg, $log_type, $file, $line ) {\t\t$allowed = get_transient( 'ti_log_allowed' );\n\t\tif ( is_array( $allowed ) && in_array( $plugin_name, $allowed ) ) {\n\t\t\t$logs = get_transient( 'ti_log' . $plugin_name );\n\t\t\tif ( ! $logs ) {\n\t\t\t\t$logs = array();\n\t\t\t}\n\t\t\t$logs[] = array(\n\t\t\t\t'type' => $log_type,\n\t\t\t\t'msg' => $log_msg,\n\t\t\t\t'time' => date( 'F j, Y H:i:s', current_time( 'timestamp', true ) ),\n\t\t\t\t'file' => $file,\n\t\t\t\t'line' => $line,\n\t\t\t);\n\t\t\t// keep only the last LOG_LENGTH logs\n\t\t\t$logs = array_slice( $logs, 0 - self::LOG_LENGTH );\n\t\t\tset_transient( 'ti_log' . $plugin_name, $logs, self::LOG_OPTION_EXPIRY_MINS * MINUTE_IN_SECONDS );\n\t\t}\n\t}",
"function pluginSuperLogger(){\n global $user,$settings,$db,$currentPage;\n $ip = ipCheck();\n if(!$user->isLoggedIn()){\n if($settings->plg_sl_guest == 1){\n $user_id = 0;\n }else{\n return false;\n }\n }else{\n if($settings->plg_sl_opt_out == 1 && $user->data()->plg_sl_opt_out == 1){\n return false;\n }else{\n $user_id = $user->data()->id;\n }\n}\n $getdata = [];\n foreach($_GET as $k=>$v){\n $getdata[$k] = Input::sanitize($v);\n }\n $getdata = json_encode($getdata);\n\n $postdata = [];\n foreach($_POST as $k=>$v){\n if($k != 'password' && $k != 'password_confirm' && $k != 'confirm'){\n $postdata[$k] = Input::sanitize($v);\n }\n }\n $postdata = json_encode($postdata);\n$fields = array(\n 'user_id'=>$user_id,\n 'page'=>$currentPage,\n 'get_data'=>$getdata,\n 'post_data'=>$postdata,\n 'ip'=>$ip,\n 'ts'=>date(\"Y-m-d H:i:s\"),\n);\n$db->insert('plg_sl_logs',$fields);\n\n}",
"public function recordHit()\n {\n global $configArray;\n\n if ($configArray['Statistics']['enabled']) {\n // Setup Statistics Index Connection\n $solrStats = ConnectionManager::connectToIndex('SolrStats');\n\n // Save Record View\n $solrStats->saveRecordView($this->recordDriver->getUniqueID());\n unset($solrStats);\n }\n }",
"public function setLoggedInUserTrackingLog(){\n\n\t\t$main_qry = TrackingPageId::on('bk-log')\n\t\t ->orderby('date', 'asc')\n\t\t ->whereBetween('date', ['2015-02-14', '2015-02-24'])\n\t\t ->get();\n\n\n\t\tforeach ($main_qry as $key) {\n\n\t\t\t$start_date = $key->tp_id;\n\t\t\t\n\t\t $dt = Carbon::parse($key->date);\n\t\t\t$dt = $dt->addDay(1);\n\t\t\t$dt = $dt->toDateString();\n\n\t\t\t$sub_qry = TrackingPageId::on('bk-log')\n\t\t ->where('date', $dt)\n\t\t ->first()->tp_id;\n\n\t\t if (!isset($sub_qry)) {\n\t\t \t$end_date = TrackingPage::on('bk-log')\n\t\t \t\t\t\t\t\t\t->first()->id;\n\t\t }else{\n\t\t \t$end_date = $sub_qry;\n\t\t }\n\n\t\t $tp = TrackingPage::on('bk-log')\n\t\t ->whereBetween('id', [$start_date, $end_date])\n\t\t ->where('user_id', '!=', 0)\n\t\t ->groupBy('user_id')\n\t\t ->select('ip', DB::raw(\"count(*) as cnt\"), 'user_id')\n\t\t ->get();\n\n\t\t foreach ($tp as $k) {\n\t\t \t$arr = $this->iplookup($k->ip);\n\t\t \t$attr = array('ip' => $k->ip, 'user_id' => $k->user_id, 'city' => $arr['cityName'], 'state' => $arr['stateAbbr'],\n\t\t \t 'zip' => $arr['cityAbbr'], 'country' => $arr['countryAbbr'], 'cnt' =>$k->cnt, 'tpi_id' => $key->id, \n\t\t \t 'tpt_id' => 1);\n\n\t\t \tTrackingPageLog::on('log')->updateOrCreate($attr, $attr);\n\t\t }\n\n\t\t $tp = TrackingPage::on('bk-log')\n\t\t ->whereBetween('id', [$start_date, $end_date])\n\t\t ->where('user_id', 0)\n\t\t ->groupBy('ip')\n\t\t ->select('ip', DB::raw(\"count(*) as cnt\"), 'user_id')\n\t\t ->get();\n\n\t\t foreach ($tp as $k) {\n\t\t \t$arr = $this->iplookup($k->ip);\n\t\t \t$attr = array('ip' => $k->ip, 'user_id' => $k->user_id, 'city' => $arr['cityName'], 'state' => $arr['stateAbbr'],\n\t\t \t 'zip' => $arr['cityAbbr'], 'country' => $arr['countryAbbr'], 'cnt' =>$k->cnt, 'tpi_id' => $key->id, \n\t\t \t 'tpt_id' => 2);\n\n\t\t \tTrackingPageLog::on('log')->updateOrCreate($attr, $attr);\n\t\t }\n\t\t \n\n\t\t // dd($start_date. ' === '. $end_date);\n\t\t}\n\t}",
"public function getLogObjectData() : array {\n return [\n 'objId' => $this->_id,\n 'objName' => $this->scope\n ];\n }",
"function logVisit(array $params)\n {\n\n $dbLogger = function($pdo) use ($params) {\n\n $query = \"INSERT INTO visits SET route_id = :routeId, ip = :ip\";\n $dbh = $pdo->prepare($query);\n return $dbh->execute(\n [':routeId' => $params['routeId'], ':ip' => $params['ip']]\n );\n };\n\n $db = $this->service(self::DATABASE, $dbLogger);\n $db->handle();\n }",
"function logAddEquipment($userid, $equipid){\n\n\t$mysqldate = getCurrentMySQLDateTime();\n\t\n\taddToLog($userid, \"equipment\", \"Created Equipment \".$equipid);\n\t\n}",
"function alog($line){\n $cur_user = $_SESSION['user']['user_username'];\n $time = getTimestamp();\n writeLineToLog(\"$time - $cur_user - $line\");\n}",
"public static function debugTrail() {}",
"public function AddTotalPoints($points){\r\n\t\t$this -> totalPoints += $points; \r\n\t }",
"public function get_query_log()\n {\n }",
"function insert_audit_trail($params=array()) {\n\t\tif (empty($params)) return false;\n\t\t$required_params = array('asset', 'asset_id', 'action_taken');\n\t\tforeach ($required_params as $param) {\n\t\t\tif (!isset($params[$param])) return false;\n\t\t}\n\t\t$model = &NModel::factory($this->name);\n\t\t// apply fields in the model\n\t\t$fields = $model->fields();\n\t\tforeach ($fields as $field) {\n\t\t\t$model->$field = isset($params[$field])?$params[$field]:null;\n\t\t}\n\t\t$model->user_id = $this->website_user_id;\n\t\t$model->ip = NServer::env('REMOTE_ADDR');\n\t\tif (in_array('cms_created', $fields)) {\n\t\t\t$model->cms_created = $model->now();\n\t\t}\n\t\tif (in_array('cms_modified', $fields)) {\n\t\t\t$model->cms_modified = $model->now();\n\t\t}\n\t\t// set the user id if it's applicable and available\n\t\tif (in_array('cms_modified_by_user', $fields)) {\n\t\t\t$model->cms_modified_by_user = $this->website_user_id;\n\t\t}\n\t\t$model->insert();\n\t}",
"public function addPoints($pid,$pid_table,$points)\n {\n Point::create([\n 'pid' => $pid,\n 'pid_table' => $pid_table,\n 'amount' => $points,\n 'user_id' => $this->id\n ]);\n\n }",
"public function onTP_Storelog($data)\n\t{\n\t\t$log_write = $this->params->get('log_write', '0');\n\n\t\tif ($log_write == 1)\n\t\t{\n\t\t\t$plgPaymentAuthorizenetHelper = new plgPaymentAuthorizenetHelper;\n\t\t\t$log = $plgPaymentAuthorizenetHelper->Storelog($this->_name, $data);\n\t\t}\n\t}",
"function __log($alias, $action, $details, $foreign_key=null){\n if($this->__isLogRequired($action)) {\n $this->__UserLog->create();\n $this->__UserLog->data = array(\n 'user_id' => User::get('id'),\n 'resource' => $alias,\n 'resource_type' => 'model',\n 'action' => $action,\n 'foreign_key' => $foreign_key,\n 'details' => $this->__isLogDetailsRequired($alias,$action) ? $details : null\n );\n if(!$this->__deferred) {\n $this->__saveLog();\n }\n }\n }",
"public function save(){\r\n\t\t\t$query = DB::connection()->prepare(\r\n\t\t\t\t\"INSERT INTO Logs (comp_id, user_id, datum) \r\n\t\t\t\tVALUES (:comp_id, :user_id, :datum)\"\r\n\t\t\t);\r\n\t\t\t$query->execute(array(\r\n\t\t\t\t'comp_id' \t=>\t$this->comp_id,\r\n\t\t\t\t'user_id'\t=>\t$this->user_id,\r\n\t\t\t\t'datum' \t=>\t$this->datum\r\n\t\t\t));\r\n\t\t}",
"public function log($log);",
"function insert_user_loging(){\n /*\n * Algorithm:\n * get all information about user\n * restructure query based on which fields are filled out\n * execute insert on user_logging\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n */\n\n}",
"function uLog($site_id, $up_id, $action, $info)\n{\n $toolkit = systemToolkit::getInstance();\n $updateLogMapper = $toolkit->getMapper('update', 'updateLog');\n\n $log = $updateLogMapper->create();\n $log->setSiteId($site_id);\n $log->setUpId($up_id);\n $log->setAction($action);\n $log->setInfo($info);\n $log->setTime(new SQLFunction(\"UNIX_TIMESTAMP\"));\n\n $updateLogMapper->save($log);\n}",
"private function addnotification($action , $type , $model_obj ){\n\n\t\t$notification = new Log();\n\t\t$notification->type = $type ;\n\t\t$notification->action = $action;\n\t\t$notification->name = $model_obj->name;\n\t\t$notification->type_id = $model_obj['id'];\n\t\t$notification->user_id = Auth::user()->id;\n\t\t$notification->save();\n\n\t}",
"public static function point();",
"function add_success(&$log, $message){\n if(!is_array($log)) return;\n\n $log[] = array(\n \"type\" => \"success\",\n \"message\" => $message\n );\n}",
"public function __toString()\n\t{\n \t$r = \"Object \\\"\".get_class($this).\"\\\"\\n\";\n \t$r .= \"Log of events:\\n\";\n\t\tforeach($this->arrLogMessages as $m)\n\t\t{\n\t\t\t$r .= $m.\"\\n\";\n\t\t}\n\t\treturn $r;\n\t}",
"private function saveSourceReferencePoiMetric(){\n $sourceReference = $this->sourceReferenceFactory->getSourceReferenceById($sourceReferencePoi->source_reference_id);\n $sourceMetrics = $this->sourceMetricFactory->createSourceMetricsBySourceId($sourceReference->source_id);\n foreach($sourceMetrics as $sourceMetric){\n $sourceReferencePoiMetric = new \\source\\model\\SourceReferencePoiMetric();\n $sourceReferencePoiMetric->source_reference_poi_id = $sourceReferencePoi->source_reference_poi_id;\n $sourceReferencePoiMetric->metric_id = $sourceMetric->metric_id;\n $this->sourceReferencePoiMetricFactory->saveSourceReferencePoiMetric($sourceReferencePoiMetric);\n }\n }",
"protected function printLogMgm() {}",
"function addPoint($x, $y = false, $ID = false)\n {\n }",
"function aggregate_info($object)\n{\n}"
] | [
"0.5882027",
"0.5845073",
"0.5776313",
"0.55127645",
"0.5450185",
"0.5422141",
"0.5414006",
"0.54099333",
"0.53733206",
"0.5344187",
"0.5336569",
"0.532173",
"0.5271386",
"0.52552986",
"0.5253111",
"0.5253002",
"0.52490354",
"0.52489287",
"0.52283686",
"0.5225554",
"0.52239895",
"0.52237296",
"0.5199015",
"0.51871544",
"0.51871544",
"0.51719713",
"0.5171291",
"0.51656926",
"0.51530844",
"0.5149696",
"0.5137657",
"0.5133981",
"0.5125476",
"0.511789",
"0.5115093",
"0.5107397",
"0.51039237",
"0.5090427",
"0.5083726",
"0.5078842",
"0.5068493",
"0.5068489",
"0.50684696",
"0.50664115",
"0.50496083",
"0.5028508",
"0.5013367",
"0.501286",
"0.5011325",
"0.5006867",
"0.50026464",
"0.5000335",
"0.49984977",
"0.49975765",
"0.49960384",
"0.49948704",
"0.49941006",
"0.49906135",
"0.49864298",
"0.49601698",
"0.49561644",
"0.49453306",
"0.49414152",
"0.4928335",
"0.49277538",
"0.49270293",
"0.49157062",
"0.4909673",
"0.4909025",
"0.49063307",
"0.48795646",
"0.48762137",
"0.48747757",
"0.487015",
"0.4866307",
"0.4863764",
"0.48627385",
"0.48575288",
"0.4855706",
"0.48547772",
"0.4852305",
"0.48474154",
"0.4834173",
"0.48331916",
"0.48259157",
"0.48223144",
"0.48205954",
"0.48150873",
"0.48051792",
"0.47961596",
"0.47945893",
"0.4794283",
"0.4792502",
"0.47909498",
"0.47903368",
"0.47784477",
"0.4778062",
"0.47734344",
"0.47693983",
"0.47687736"
] | 0.5963407 | 0 |
Returns DB table name for entity. | public static function getTableName()
{
return 'b_timeman_monitor_comment';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTableName(): string\n {\n return $this->getEntityDao()->getTableName();\n }",
"public static function getTableName()\n {\n return _DB_PREFIX_ . self::$definition['table'];\n }",
"public static function getTableName()\n {\n return self::getDatabaseName() . '.' . self::NAME;\n }",
"public static function getTableName()\n\t{\n\t\treturn 'b_timeman_monitor_entity';\n\t}",
"public function getTable($entityName)\n {\n $tableName = '';\n //echo $entityName. '<br/>';\n\n if (strpos($entityName, '/')) {\n $modelEntity = $entityName;\n $tableName = $this->_resources->getTableName($modelEntity);\n }\n else if( !empty($this->_resourceModel) ) {\n $entityName = sprintf('%s/%s', $this->_resourceModel, $entityName);\n $tableName = $this->_resources->getTableName($entityName);\n }\n else {\n $tableName = $entityName;\n }\n\n return $tableName;\n }",
"public function get_table_name()\n {\n return $this->prefix . $this->table;\n }",
"protected function getTableName(): string {\n return self::TABLE_NAME;\n }",
"function table_name() {\n\t\tif ($this->table) {\n\t\t\treturn $this->table;\n\t\t} else {\n\t\t\treturn $this->_get_type();\n\t\t}\n\n\t}",
"public static function get_table_name()\n {\n return self::TABLE_NAME;\n }",
"private static function get_table_name() {\n\n $class = get_called_class();\n\n return strtolower($class);\n\n }",
"public function get_table_name(){\n return $this->table_name();\n }",
"public static function getTableName()\n {\n $type = static::getType();\n return $type::getTableName();\n }",
"public function getTableName()\n {\n return $this->__get(\"table_name\");\n }",
"protected function table(): string\n {\n return $this->tableName;\n }",
"public function get_table_name() {\n return $this->table_name;\n }",
"protected function table () : string {\n return $this->guessName();\n }",
"public function getTableName() : string\n {\n if ($this->tableName !== null) {\n return $this->tableName;\n }\n\n return $this->reflectionClass->getShortName();\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"function get_table_name()\n {\n global $table_prefix;\n global $wpdb;\n $prefix = $table_prefix;\n if ($wpdb != null && $wpdb->prefix != null) {\n $prefix = $wpdb->prefix;\n }\n return apply_filters('ngg_datamapper_table_name', $prefix . $this->_object_name, $this->_object_name);\n }",
"public static function getTableName(){\n\t\treturn self::$table_name;\n\t}",
"function getTableName(): string;",
"public static function table()\n\t{\n\t\treturn self::em()->getRepository(static::class)->getMetadata()->getTable();\n\t}",
"public static function getTableName()\n {\n return self::getConfig()->get('scheme/tableName');\n }",
"public static function getTableName()\n\t{\n\t\treturn 'b_sale_entity_marker';\n\t}",
"public static function getTableName() {\n return self::$tableName;\n }",
"public function getTableName();",
"public function getTableName();",
"public function getTableName() {\n\t\t$table = strtolower(get_called_class());\n\t\tif ($table == 'person')\n\t\t\treturn 'people';\n\t\tswitch (substr($table, -1)) {\n\t\t\tcase 'y': return substr($table, 0, -1) . 'ies';\n\t\t\tcase 's': return $table . 'es';\n\t\t}\n\t\treturn $table . 's';\n\t}",
"public function getTableName() {\n\t\treturn $this -> _name;\n\t}",
"public function getTableName(): string;",
"public function getTableName(): string;",
"public function table_name()\n\t{\n\t\treturn $this->table_name;\n\t}",
"public function getTableName() ;",
"public static function getTableName()\n {\n return ((new self)->getTable());\n }",
"public static function tablename() {\n return self::TABLE;\n }",
"public function getTableName() {}",
"public function getTableName() {}",
"public function table_name ()\n {\n return $this->app->table_names->entries;\n }",
"public static function get_db_table_name(){\n global $TFUSE;\n return $TFUSE->ext->seek->get_db_table_name();\n }",
"function getTableName()\r\n\t{\r\n\t\tif ( $this->table == null ) return (null );\r\n\t\treturn( $this->table->table_name());\r\n\t}",
"public static function table_name() {\n $table_name = strtolower(get_called_class());\n\n if (!in_array($table_name, ApplicationSql::tablenames()))\n throw new TableNotFoundException(\"Veritabanında böyle bir tablo mevcut değil\", $table_name);\n\n return $table_name;\n }",
"public function getTableName( )\n {\n return $this->table_name;\n }",
"protected static function table_name(): mixed\n\t{\n\t\treturn self::$query->table_name;\n\t}",
"protected function getTableName () {\n $class = explode('\\\\', get_class($this));\n\n return strtolower(end($class));\n }",
"public static function getTableName()\n {\n return Str::snake(Str::pluralStudly(class_basename(get_called_class())));\n }",
"public function table() {\n\t\treturn static::$table ?: strtolower(Str::plural(class_basename($this)));\n\t}",
"public static function getTableName() {\n return str_replace(\"-\", '_', self::getFolderName()) . 's';\n }",
"public function getTableName()\n {\n return $this->table_name;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function _tablename() {\n if (isset($this->_table) && !isNull($this->_table)) {\n return $this->_table;\n } else {\n return camel_case_to_underscore(get_class($this));\n }\n }",
"public function getTableName() {\n return $this->mapping['table'];\n }",
"public function getTable(): string\n {\n return $this->prefix . $this->table;\n }",
"public function getTableName() {\n\t\t$dbName = empty($this->_dbName) ? '' : ($this->_dbName . '.');\n\t\t$tableName = $dbName . $this->_tableName;\n\t\treturn ($tableName);\n\t}",
"public function getTableName() {\n if (isset($this->table)) {\n return $this->table;\n } else return $this->name;\n }",
"public function getTableName(){\r\n\t\treturn strtolower(get_class($this));\r\n\t}",
"public function getTblName()\n {\n return $this->tbl_name;\n }",
"public function getTableName()\n {\n return $this->tableName;\n }",
"public function getEntityName(SchemaTable $table) {\n\t\t$dbName = $table->getDatabase()->getDatabaseName();\n\t\t$tableName = $table->getTableName();\n\t\t\n\t\t// Check if a custom entity name is set via the configuration, if not, then use strip_table_name_prefixes option.\n\t\t$entityName = $this->getConfigValue('entity_name', $dbName, $tableName, CoughConfig::SCOPE_TABLE);\n\t\tif (is_null($entityName)) {\n\t\t\t// If a prefix exists in the table name, remove it\n\t\t\t$prefixes = $this->getConfigValue('class_names/strip_table_name_prefixes', $dbName, $tableName);\n\t\t\t$entityName = $this->getTableNameWithoutPrefix($tableName, $prefixes);\n\t\t}\n\t\t\n\t\treturn $entityName;\n\t}",
"public function getTableName()\r\n {\r\n return $this->tableName;\r\n }",
"public static function getTableName()\n {\n return static::getConfig()[self::CONFIG_TABLE_NAME];\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function getTableName()\n {\n return $this->_name;\n }",
"public function tableName()\n\t{\n\t\treturn '{{'.$this->getTableName().'}}';\n\t}",
"protected function getTableName()\n {\n return $this->database->getPrefix() . $this->table;\n }",
"private function getTableName()\n {\n $class = get_class($this);\n\n $mem = new Cache();\n if ($tableName = $mem->get($class . '-table-name')) {\n return $tableName;\n }\n\n $break = explode('\\\\', $class);\n $ObjectName = end($break);\n $className = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $ObjectName));\n $tableName = Inflect::pluralize($className);\n\n $mem->add($class . '-table-name', $tableName, 1440);\n\n return $tableName;\n }",
"public function dataTableName()\n {\n $tableName = 'pd2_' . Utils::normalizeString($this->product()->name)\n . '__' . Utils::normalizeString($this->name);\n return strtolower($tableName);\n }",
"function get_table_name() {\n\n\t\tglobal $wpdb;\n\n\t\treturn $wpdb->prefix . $this->table_name;\n\t}",
"abstract public static function getTableName();",
"abstract public static function getTableName();",
"public function getTableName()\n\t{\n\t\treturn $this->getPrefix().$this->tableName;\n\t}",
"protected static function get_table_name() {\n return null;\n }",
"protected function get_table_name() {\n\t\treturn Model::get_table_name( 'Indexable_Hierarchy' );\n\t}",
"private function setTableName()\n {\n // Get table name from name of entity if not defined\n if (!$this->tableName) {\n $path = explode('\\\\', get_class($entity));\n $this->tableName = strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', array_pop($path))).'s';\n }\n\n // Set table to be used\n $this->adapter->setTable($this->tableName);\n }",
"public function getTable()\n {\n if (! isset($this->table)) {\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }\n\n return $this->table;\n }",
"public static function getTableName()\n\t{\n\t\t//called from users, keyword self:: returns model\n\t\t// return self::$table;\n\t\t//called from users, keyword static:: returns users\n\t\treturn static::$table;\n\t}",
"abstract public function getTableName();",
"abstract public function getTableName();",
"abstract public function getTableName();",
"public function getTableName():string;",
"public function getTableName(): string\n {\n return $this->tableNames[0];\n }",
"public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}",
"public function getTableName(){\n\t\t $table = get_class($this);\n\t\treturn strtolower(substr($table, strripos($table, \"\\\\\")+1));\n\t}",
"public function getTableName()\n {\n if ($this->tableName) {\n return $this->tableName;\n }\n\n return $this->namingStrategy->classToTableName($this->name);\n }",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTableName() {\n\t\treturn $this->tableName;\n\t}",
"public function getTableName() {\n return $this->table;\n }",
"public function getTable()\n {\n if (isset($this->table)) {\n return $this->table;\n }\n\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }",
"public function getTable(): string\n {\n return $this->table;\n }",
"public function getTable(): string\n {\n return $this->table;\n }",
"public function getTableName()\n {\n return $this->_tableName;\n }",
"function getTableName() {\n return $this->tableName;\n }",
"public function getTable()\n\t{\n\t\treturn empty($this->table) ? $this->table = Db_Inflector::pluralize($this->getSingular()) : $this->table;\n\t}",
"public static function table_name(): string {\n\t\tglobal $wpdb;\n\t\treturn $wpdb->prefix . 'sb_' . static::TABLE;\n\t}",
"private static function getFullyQualifiedTableName() {\n $database_name = static::getDatabaseName();\n $table_name = static::getTableName();\n return static::genFullyQualifiedTableName($database_name, $table_name);\n }",
"public function getTable(): string\n {\n return $this->_table;\n }"
] | [
"0.8195651",
"0.7825781",
"0.77575964",
"0.77522725",
"0.7682072",
"0.7679911",
"0.7655929",
"0.7643668",
"0.7620185",
"0.7599329",
"0.7584867",
"0.7509939",
"0.7507627",
"0.74633884",
"0.7452192",
"0.74252176",
"0.74170417",
"0.7393153",
"0.7393153",
"0.7393153",
"0.73864293",
"0.73712116",
"0.7370553",
"0.73693115",
"0.7358379",
"0.7349888",
"0.73483044",
"0.73419654",
"0.73419654",
"0.7338124",
"0.73287576",
"0.7316768",
"0.7316768",
"0.73074764",
"0.73038787",
"0.7298196",
"0.729584",
"0.7291168",
"0.7291168",
"0.72896117",
"0.7288463",
"0.72752833",
"0.7265767",
"0.72649336",
"0.7264169",
"0.7261446",
"0.7257704",
"0.72548395",
"0.7251026",
"0.723936",
"0.7222342",
"0.7222342",
"0.7222342",
"0.7222342",
"0.7222033",
"0.72216",
"0.7221569",
"0.72214365",
"0.7219204",
"0.7215103",
"0.7198257",
"0.7192169",
"0.718763",
"0.7171944",
"0.71655643",
"0.71602714",
"0.71602714",
"0.71602714",
"0.71540445",
"0.714903",
"0.7148506",
"0.7145862",
"0.71423095",
"0.7141627",
"0.7141627",
"0.71405226",
"0.71356136",
"0.71308565",
"0.71238136",
"0.7118735",
"0.71150875",
"0.71109736",
"0.71109736",
"0.71109736",
"0.7109311",
"0.710795",
"0.7091069",
"0.70900244",
"0.7077742",
"0.70729494",
"0.70729494",
"0.70725775",
"0.70714164",
"0.70622957",
"0.70622957",
"0.70513076",
"0.7049081",
"0.7047363",
"0.70382166",
"0.70325637",
"0.70311403"
] | 0.0 | -1 |
Returns entity map definition. | public static function getMap()
{
return [
new IntegerField(
'ID',
[
'primary' => true,
'autocomplete' => true,
'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_ID_FIELD')
]
),
new IntegerField(
'USER_LOG_ID',
[
'required' => true,
'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_LOG_ID_FIELD')
]
),
new IntegerField(
'USER_ID',
[
'required' => true,
'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_USER_ID_FIELD')
]
),
new TextField(
'COMMENT',
[
'title' => Loc::getMessage('MONITOR_COMMENT_ENTITY_COMMENT_FIELD')
]
),
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'ORDER_NEW_TASK' => new Entity\\StringField('ORDER_NEW_TASK', array(\n\t\t\t\t'required' => true\n\t\t\t))\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\t'PROFILE_ID' => new Entity\\IntegerField('PROFILE_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'PROFILE_EXEC_ID' => new Entity\\IntegerField('PROFILE_EXEC_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'DATE_EXEC' => new Entity\\DateTimeField('DATE_EXEC', array(\n\t\t\t\t'default_value' => ''\n\t\t\t)),\n\t\t\t'TYPE' => new Entity\\StringField('TYPE', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'ENTITY_ID' => new Entity\\IntegerField('ENTITY_ID', array(\n\t\t\t\t'required' => true\n\t\t\t)),\n\t\t\t'FIELDS' => new Entity\\TextField('FIELDS', array()),\n\t\t\t'PROFILE' => new Entity\\ReferenceField(\n\t\t\t\t'PROFILE',\n\t\t\t\t'\\Bitrix\\EsolImportxml\\ProfileTable',\n\t\t\t\tarray('=this.PROFILE_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'PROFILE_EXEC' => new Entity\\ReferenceField(\n\t\t\t\t'PROFILE_EXEC',\n\t\t\t\t'\\Bitrix\\EsolImportxml\\ProfileExecTable',\n\t\t\t\tarray('=this.PROFILE_EXEC_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'IBLOCK_ELEMENT' => new Entity\\ReferenceField(\n\t\t\t\t'IBLOCK_ELEMENT',\n\t\t\t\t'\\Bitrix\\Iblock\\ElementTable',\n\t\t\t\tarray('=this.ENTITY_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t\t'IBLOCK_SECTION' => new Entity\\ReferenceField(\n\t\t\t\t'IBLOCK_SECTION',\n\t\t\t\t'\\Bitrix\\Iblock\\SectionTable',\n\t\t\t\tarray('=this.ENTITY_ID' => 'ref.ID'),\n\t\t\t\tarray('join_type' => 'LEFT')\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\tarray(\n\t\t\t\t 'autocomplete' => true,\n\t\t\t\t 'primary' => true,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('ORDER_ID'),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'ENTITY_TYPE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 25,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('ENTITY_ID'),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'TYPE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 10,\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'CODE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 255,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateComment')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'MESSAGE',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 255,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateMessage')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\StringField(\n\t\t\t\t'COMMENT',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 500,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateComment')\n\t\t\t\t)\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\IntegerField('USER_ID'),\n\n\t\t\tnew Main\\Entity\\DatetimeField(\n\t\t\t\t'DATE_CREATE'\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\DatetimeField(\n\t\t\t\t'DATE_UPDATE'\n\t\t\t),\n\n\t\t\tnew Main\\Entity\\BooleanField(\n\t\t\t\t'SUCCESS',\n\t\t\t\tarray(\n\t\t\t\t\t'size' => 1,\n\t\t\t\t\t'validation' => array(__CLASS__, 'validateSuccess')\n\t\t\t\t)\n\t\t\t),\n\t\t);\n\t}",
"public function getMapping() {}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\tnew Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_CHAT_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('CONNECTOR', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t\tnew Entity\\StringField('EXTERNAL_MESSAGE_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateVarChar')\n\t\t\t)),\n\t\t);\n\t}",
"public static function getMap()\n { \n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ID_FIELD'),\n ),\n 'DATE_CHANGE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CHANGE_FIELD'),\n ),\n 'DATE_CREATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DATE_CREATE_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_ACTIVE_FIELD'),\n ),\n 'SORT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_SORT_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateName'),\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_NAME_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'PARENT_CATEGORY_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SEOMETA_SECTION_CHPU_ENTITY_PARENT_CATEGORY_ID_FIELD'),\n ), \n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'NAME' => new ORM\\Fields\\StringField(\n\t\t\t\t'NAME',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn [\n\t\t\t\t\t\t\tnew ORM\\Fields\\Validators\\LengthValidator(null, 50),\n\t\t\t\t\t\t];\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERCENTAGE' => new ORM\\Fields\\FloatField(\n\t\t\t\t'PERCENTAGE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('EXTRA_ENTITY_PERCENTAGE_FIELD'),\n\t\t\t\t]\n\t\t\t)\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Main\\Entity\\IntegerField('TEMPLATE_ID', [\n\t\t\t\t'primary' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PROVIDER', [\n\t\t\t\t'primary' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\ReferenceField('TEMPLATE', '\\Bitrix\\DocumentGenerator\\Model\\Template',\n\t\t\t\t['=this.TEMPLATE_ID' => 'ref.ID']\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ID_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateUser'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_USER_ID_FIELD'),\n ),\n 'ELEMENT_CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateElementCode'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_ELEMENT_CODE_FIELD'),\n ),\n 'TITLE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateTitle'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_TITLE_FIELD'),\n ),\n 'PASSWORD_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validatePassword'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_PASSWORD_ID_FIELD'),\n ),\n 'APP_ID' => array(\n 'data_type' => 'integer',\n 'validation' => array(__CLASS__, 'validateApp'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APP_ID_FIELD'),\n ),\n 'SCOPE' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_SCOPE_FIELD'),\n ),\n 'QUERY' => array(\n 'data_type' => 'text',\n 'serialized' => true,\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_QUERY_FIELD'),\n ),\n 'OUTGOING_EVENTS' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_EVENTS_FIELD'),\n ),\n 'OUTGOING_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingQueryNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_NEEDED_FIELD'),\n ),\n 'OUTGOING_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateOutgoingHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_OUTGOING_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_NEEDED_FIELD'),\n ),\n 'WIDGET_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateWidgetHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_HANDLER_URL_FIELD'),\n ),\n 'WIDGET_LIST' => array(\n 'data_type' => 'text',\n 'save_data_modification' => function () {\n return array(\n function ($value) {\n return is_array($value) ? implode(',', $value) : '';\n }\n );\n },\n 'fetch_data_modification' => function () {\n return array(\n function ($value) {\n return explode(',', $value);\n }\n );\n },\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_WIDGET_LIST_FIELD'),\n ),\n 'APPLICATION_TOKEN' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationToken'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_TOKEN_FIELD'),\n ),\n 'APPLICATION_NEEDED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationNeeded'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_NEEDED_FIELD'),\n ),\n 'APPLICATION_ONLY_API' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateApplicationOnlyApi'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_APPLICATION_ONLY_API_FIELD'),\n ),\n 'BOT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_ID_FIELD'),\n ),\n 'BOT_HANDLER_URL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateBotHandlerUrl'),\n 'title' => Loc::getMessage('INTEGRATION_ENTITY_BOT_HANDLER_URL_FIELD'),\n ),\n 'USER' => new ReferenceField(\n 'USER',\n '\\Bitrix\\Main\\UserTable',\n array('=this.USER_ID' => 'ref.ID')\n ),\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\n\t\t\t(new Fields\\IntegerField('ADDRESS_ID'))\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\StringField('ENTITY_ID'))\n\t\t\t\t->configurePrimary(true)\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(1, 100)),\n\n\t\t\t// todo: int\n\t\t\t(new Fields\\StringField('ENTITY_TYPE'))\n\t\t\t\t->configurePrimary(true)\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(1, 50)),\n\n\t\t\t// Ref\n\n\t\t\t(new Fields\\Relations\\Reference('ADDRESS', AddressTable::class,\n\t\t\t\tJoin::on('this.ADDRESS_ID', 'ref.ID')))\n\t\t\t\t->configureJoinType('inner')\n\t\t];\n\t}",
"public static function getMap()\n {\n return [\n 'ID' => [\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ID_FIELD'),\n ],\n 'STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_STEP_FIELD'),\n ],\n 'STATUS' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_STATUS_FIELD'),\n ],\n 'ITEMS_PER_STEP' => [\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_ITEMS_PER_STEP_FIELD'),\n ],\n 'CREATED' => [\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('GENERATOR_ENTITY_CREATED_FIELD'),\n ],\n ];\n }",
"public function getMappingEntityBundle();",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'STORE_ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'STORE_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_STORE_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PRODUCT_ID' => new ORM\\Fields\\IntegerField(\n\t\t\t\t'PRODUCT_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_PRODUCT_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'AMOUNT' => new ORM\\Fields\\FloatField(\n\t\t\t\t'AMOUNT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_AMOUNT_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'QUANTITY_RESERVED' => new ORM\\Fields\\FloatField(\n\t\t\t\t'QUANTITY_RESERVED',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('STORE_PRODUCT_ENTITY_QUANTITY_RESERVED_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'STORE' => new ORM\\Fields\\Relations\\Reference(\n\t\t\t\t'STORE',\n\t\t\t\tStoreTable::class,\n\t\t\t\tORM\\Query\\Join::on('this.STORE_ID', 'ref.ID')\n\t\t\t),\n\t\t\t'PRODUCT' => new ORM\\Fields\\Relations\\Reference(\n\t\t\t\t'PRODUCT',\n\t\t\t\tProductTable::class,\n\t\t\t\tORM\\Query\\Join::on('this.PRODUCT_ID', 'ref.ID')\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => new Main\\Entity\\IntegerField('ID', array(\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ID_FIELD')\n\t\t\t)),\n\t\t\t'XML_ID' => new Main\\Entity\\StringField('XML_ID', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateXmlId'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_XML_ID_FIELD')\n\t\t\t)),\n\t\t\t'SITE_ID' => new Main\\Entity\\StringField('SITE_ID', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_SITE_ID_FIELD')\n\t\t\t)),\n\t\t\t'TYPE' => new Main\\Entity\\IntegerField('TYPE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => self::TYPE_DISCOUNT,\n\t\t\t\t'validation' => array(__CLASS__, 'validateType'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_TYPE_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE' => new Main\\Entity\\BooleanField('ACTIVE', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'Y',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE_FROM' => new Main\\Entity\\DatetimeField('ACTIVE_FROM', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_FROM_FIELD')\n\t\t\t)),\n\t\t\t'ACTIVE_TO' => new Main\\Entity\\DatetimeField('ACTIVE_TO', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_ACTIVE_TO_FIELD')\n\t\t\t)),\n\t\t\t'RENEWAL' => new Main\\Entity\\BooleanField('RENEWAL', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_RENEWAL_FIELD')\n\t\t\t)),\n\t\t\t'NAME' => new Main\\Entity\\StringField('NAME', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateName'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_NAME_FIELD')\n\t\t\t)),\n\t\t\t'SORT' => new Main\\Entity\\IntegerField('SORT', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_SORT_FIELD')\n\t\t\t)),\n\t\t\t'MAX_DISCOUNT' => new Main\\Entity\\FloatField('MAX_DISCOUNT', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_MAX_DISCOUNT_FIELD')\n\t\t\t)),\n\t\t\t'VALUE_TYPE' => new Main\\Entity\\EnumField('VALUE_TYPE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'values' => array(self::VALUE_TYPE_PERCENT, self::VALUE_TYPE_FIX, self::VALUE_TYPE_SALE),\n\t\t\t\t'default_value' => self::VALUE_TYPE_PERCENT,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_VALUE_TYPE_FIELD')\n\t\t\t)),\n\t\t\t'VALUE' => new Main\\Entity\\FloatField('VALUE', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_VALUE_FIELD')\n\t\t\t)),\n\t\t\t'CURRENCY' => new Main\\Entity\\StringField('CURRENCY', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateCurrency'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CURRENCY_FIELD')\n\t\t\t)),\n\t\t\t'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n\t\t\t\t'required' => true,\n\t\t\t\t'default_value' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new Main\\Type\\DateTime();\n\t\t\t\t\t},\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_TIMESTAMP_X_FIELD')\n\t\t\t)),\n\t\t\t'COUNT_PERIOD' => new Main\\Entity\\EnumField('COUNT_PERIOD', array(\n\t\t\t\t'values' => array(self::COUNT_PERIOD_TYPE_ALL, self::COUNT_PERIOD_TYPE_INTERVAL, self::COUNT_PERIOD_TYPE_PERIOD),\n\t\t\t\t'default_value' => self::COUNT_PERIOD_TYPE_ALL\n\t\t\t)),\n\t\t\t'COUNT_SIZE' => new Main\\Entity\\IntegerField('COUNT_SIZE', array(\n\t\t\t\t'default_value' => 0\n\t\t\t)),\n\t\t\t'COUNT_TYPE' => new Main\\Entity\\EnumField('COUNT_TYPE', array(\n\t\t\t\t'values' => array(self::COUNT_TYPE_SIZE_DAY, self::COUNT_TYPE_SIZE_MONTH, self::COUNT_TYPE_SIZE_YEAR),\n\t\t\t\t'default_value' => self::COUNT_TYPE_SIZE_YEAR\n\t\t\t)),\n\t\t\t'COUNT_FROM' => new Main\\Entity\\DatetimeField('COUNT_FROM', array(\n\t\t\t\t'default_value' => null\n\t\t\t)),\n\t\t\t'COUNT_TO' => new Main\\Entity\\DatetimeField('COUNT_TO', array(\n\t\t\t\t'default_value' => null\n\t\t\t)),\n\t\t\t'ACTION_SIZE' => new Main\\Entity\\IntegerField('ACTION_SIZE', array(\n\t\t\t\t'default_value' => 0\n\t\t\t)),\n\t\t\t'ACTION_TYPE' => new Main\\Entity\\EnumField('ACTION_TYPE', array(\n\t\t\t\t'values' => array(self::ACTION_TYPE_SIZE_DAY, self::ACTION_TYPE_SIZE_MONTH, self::ACTION_TYPE_SIZE_YEAR),\n\t\t\t\t'default_value' => self::ACTION_TYPE_SIZE_YEAR\n\t\t\t)),\n\t\t\t'MODIFIED_BY' => new Main\\Entity\\IntegerField('MODIFIED_BY', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_MODIFIED_BY_FIELD')\n\t\t\t)),\n\t\t\t'DATE_CREATE' => new Main\\Entity\\DatetimeField('DATE_CREATE', array(\n\t\t\t\t'default_value' => null,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_DATE_CREATE_FIELD')\n\t\t\t)),\n\t\t\t'CREATED_BY' => new Main\\Entity\\IntegerField('CREATED_BY', array(\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CREATED_BY_FIELD')\n\t\t\t)),\n\t\t\t'PRIORITY' => new Main\\Entity\\IntegerField('PRIORITY', array(\n\t\t\t\t'default_value' => 1,\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_PRIORITY_FIELD')\n\t\t\t)),\n\t\t\t'LAST_DISCOUNT' => new Main\\Entity\\BooleanField('LAST_DISCOUNT', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'Y',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_LAST_DISCOUNT_FIELD')\n\t\t\t)),\n\t\t\t'VERSION' => new Main\\Entity\\EnumField('VERSION', array(\n\t\t\t\t'values' => array(self::OLD_VERSION, self::ACTUAL_VERSION),\n\t\t\t\t'default_value' => self::ACTUAL_VERSION\n\t\t\t)),\n\t\t\t'NOTES' => new Main\\Entity\\StringField('NOTES', array(\n\t\t\t\t'validation' => array(__CLASS__, 'validateNotes'),\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_NOTES_FIELD')\n\t\t\t)),\n\t\t\t'CONDITIONS' => new Main\\Entity\\TextField('CONDITIONS', array()),\n\t\t\t'CONDITIONS_LIST' => new Main\\Entity\\TextField('CONDITIONS_LIST', array(\n\t\t\t\t'serialized' => true,\n\t\t\t\t'column_name' => 'CONDITIONS',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_CONDITIONS_LIST_FIELD')\n\t\t\t)),\n\t\t\t'UNPACK' => new Main\\Entity\\TextField('UNPACK', array()),\n\t\t\t'USE_COUPONS' => new Main\\Entity\\BooleanField('USE_COUPONS', array(\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'default_value' => 'N',\n\t\t\t\t'title' => Loc::getMessage('DISCOUNT_ENTITY_USE_COUPONS_FIELD')\n\t\t\t)),\n\t\t\t'SALE_ID' => new Main\\Entity\\IntegerField('SALE_ID'),\n\t\t\t'CREATED_BY_USER' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'CREATED_BY_USER',\n\t\t\t\t'\\Bitrix\\Main\\User',\n\t\t\t\tarray('=this.CREATED_BY' => 'ref.ID')\n\t\t\t),\n\t\t\t'MODIFIED_BY_USER' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'MODIFIED_BY_USER',\n\t\t\t\t'\\Bitrix\\Main\\User',\n\t\t\t\tarray('=this.MODIFIED_BY' => 'ref.ID')\n\t\t\t),\n\t\t\t'SALE_DISCOUNT' => new Main\\Entity\\ReferenceField(\n\t\t\t\t'SALE_DISCOUNT',\n\t\t\t\t'Bitrix\\Sale\\Internals\\DiscountTable',\n\t\t\t\tarray('=this.SALE_ID' => 'ref.ID')\n\t\t\t)\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TIMESTAMP_X' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => false,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t),\n\t\t\t'EVENT' => array(\n\t\t\t\t'data_type' => 'text',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('LOG_ENTITY_EVENT_FIELD'),\n\t\t\t),\n\t\t);\n\t}",
"function tradeoff_map($definition)\n {\n return app(Models\\Resolution\\Map\\Map::class)->setData($definition);\n }",
"public function mapEntity(Entity $entity) {\n\t\t$entity['_loc'] = $this->_table->getUrl($entity);\n\t\t$entity['_lastmod'] = $entity->{$this->_config['lastmod']};\n\t\t$entity['_changefreq'] = $this->_config['changefreq'];\n\t\t$entity['_priority'] = $this->_config['priority'];\n\n\t\treturn $entity;\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew Main\\Entity\\IntegerField('ID', [\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\IntegerField('REGION_ID', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('CODE', [\n\t\t\t\t'required' => true,\n\t\t\t]),\n\t\t\tnew Main\\Entity\\StringField('PHRASE'),\n\t\t\tnew Main\\Entity\\ReferenceField('REGION', '\\Bitrix\\DocumentGenerator\\Model\\Region',\n\t\t\t\t['=this.REGION_ID' => 'ref.ID']\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'LID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateLid'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_LID_FIELD'),\n ),\n 'ACTIVE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_FIELD'),\n ),\n 'BONUS' => array(\n 'data_type' => 'float',\n 'required' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_BONUS_FIELD'),\n ),\n 'USERID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_USERID_FIELD'),\n ),\n 'ACTIVE_FROM' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_FROM_FIELD'),\n ),\n 'ACTIVE_TO' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_ACTIVE_TO_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_NAME_FIELD'),\n ),\n 'PROMOCODE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validatePromocode'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_PROMOCODE_FIELD'),\n ),\n 'DOMAINE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomaine'),\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_DOMAINE_FIELD'),\n ),\n 'URL' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_URL_FIELD'),\n ),\n 'COMMISIA' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_COMMISIA_FIELD'),\n ),\n 'COMMISIAPROMO' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('AFFILIATE_ENTITY_COMMISIAPROMO_FIELD'),\n ),\n );\n }",
"abstract protected function getMapping();",
"abstract protected function getMapping();",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'SESSION_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_SESSION_ID_FIELD'),\n\t\t\t),\n\t\t\t'CHAT_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CHAT_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_MESSAGE_ID_FIELD'),\n\t\t\t),\n\t\t\t'MESSAGE_ORIGIN_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_MESSAGE_ORIGIN_ID_FIELD'),\n\t\t\t),\n\t\t\t'USER_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_USER_ID_FIELD'),\n\t\t\t),\n\t\t\t'ACTION' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateAction'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_ACTION_FIELD'),\n\t\t\t),\n\t\t\t'CRM_ENTITY_TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateCrmEntityType'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CRM_ENTITY_TYPE_FIELD'),\n\t\t\t),\n\t\t\t'CRM_ENTITY_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_CRM_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_TYPE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateValue'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_FIELD_NAME_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validateValue'),\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_FIELD_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'DATE_CREATE' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'title' => Loc::getMessage('TRACKER_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t\t'default_value' => array(__CLASS__, 'getCurrentDate'),\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_ID_FIELD'),\n ),\n 'LID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateLid'),\n 'title' => Loc::getMessage('BASKET_ENTITY_LID_FIELD'),\n ),\n 'DATATIME_INSERT' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_DATATIME_INSERT_FIELD'),\n ),\n 'DATATIME_UPDATE' => array(\n 'data_type' => 'datetime',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_DATATIME_UPDATE_FIELD'),\n ),\n 'ORDER_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_ORDER_ID_FIELD'),\n ),\n 'PRODUCT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_PRODUCT_ID_FIELD'),\n ),\n 'NAME' => array(\n 'data_type' => 'string',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_NAME_FIELD'),\n ),\n 'PRICE' => array(\n 'data_type' => 'float',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_PRICE_FIELD'),\n ),\n 'PRICEOLD' => array(\n 'data_type' => 'float',\n\n 'title' => Loc::getMessage('BASKET_ENTITY_PRICEOLD_FIELD'),\n ),\n 'OWNER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('BASKET_ENTITY_OWNER_ID_FIELD'),\n ),\n 'QUANTITY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_QUANTITY_FIELD'),\n ),\n 'XML_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateXmlId'),\n 'title' => Loc::getMessage('BASKET_ENTITY_XML_ID_FIELD'),\n ),\n 'PROPERTY' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('BASKET_ENTITY_PROPERTY_FIELD'),\n 'serialized' => true\n ),\n 'DELAY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_DELAY_FIELD'),\n ),\n 'DETAIL_PAGE_URL' => array(\n 'data_type' => 'string',\n 'title' => Loc::getMessage('BASKET_ENTITY_DETAIL_PAGE_URL_FIELD'),\n ),\n 'PICTURE' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('BASKET_ENTITY_PICTURE_FIELD'),\n ),\n );\n }",
"protected function getMap()\n {\n if (! $this->map) {\n $this->load();\n }\n\n return $this->map;\n }",
"public static function getMap()\n {\n return self::$map;\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateType'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TYPE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'PUBLIC_CODE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePublicCode'],\n\t\t\t\t\t'title' => Loc::getMessage('MONITOR_ENTITY_ENTITY_PUBLIC_CODE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'autocomplete' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_ID_FIELD'),\n\t\t\t),\n\t\t\t'TIMESTAMP_X' => array(\n\t\t\t\t'data_type' => 'datetime',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_TIMESTAMP_X_FIELD'),\n\t\t\t),\n\t\t\t'LID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateLid'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_LID_FIELD'),\n\t\t\t),\n\t\t\t'ACTIVE' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N', 'Y'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_ACTIVE_FIELD'),\n\t\t\t),\n\t\t\t'USERID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_USERID_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULTBONUS' => array(\n\t\t\t\t'data_type' => 'float',\n\t\t\t\t'required' => true,\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_DEFAULTBONUS_FIELD'),\n\t\t\t),\n\t\t\t'BONUSACCOUNTS' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_BONUSACCOUNTS_FIELD'),\n\t\t\t),\n\t\t\t'NUM' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'required' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateNum'),\n\t\t\t\t'title' => Loc::getMessage('CARD_ENTITY_NUM_FIELD'),\n\t\t\t),\n\t\t);\n\t}",
"public function getMapping()\n {\n return $this->mapping;\n }",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true\n ),\n 'APP_ID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateVarchar128'),\n ),\n 'TYPE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateType'),\n ),\n 'HANDLER' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateHandler'),\n ),\n 'DATE_ADD' => array(\n 'data_type' => 'datetime',\n 'default_value' => new Main\\Type\\DateTime(),\n ),\n 'AUTHOR_ID' => array(\n 'data_type' => 'integer',\n 'default_value' => 0,\n ),\n 'AUTHOR' => array(\n 'data_type' => '\\Bitrix\\Main\\UserTable',\n 'reference' => array(\n '=this.AUTHOR_ID' => 'ref.ID'\n ),\n 'join_type' => 'LEFT',\n ),\n );\n }",
"public function mapFor()\n {\n // Here we tell Doctrine that this mapping is for the Scientist object.\n return Article::class;\n }",
"public static function get_map_explorer_definition() {\n return array(\n 'title' => 'Map explorer',\n 'category' => 'Reporting',\n 'description' => 'A map plus grid of data, with various options for exploring the data. This is designed to integrate with the Easy Login feature\\'s '.\n 'preferred taxon groups and locality for the logged in user and is therefore specific to Drupal.'\n );\n }",
"public function getMapping() {\n return $this->mapping;\n }",
"public function getMappings();",
"public function getMappings();",
"function mapper($entity, $entityMap = null)\n {\n return Manager::getMapper($entity, $entityMap);\n }",
"public static function getMap()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'SEARCH_CONTENT_ID' => array(\r\n\t\t\t\t'data_type' => 'integer',\r\n\t\t\t\t'primary' => true,\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_ID_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCH_CONTENT_MD5' => array(\r\n\t\t\t\t'data_type' => 'string',\r\n\t\t\t\t'required' => true,\r\n\t\t\t\t'validation' => array(__CLASS__, 'validateSearchContentMd5'),\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCH_CONTENT_MD5_FIELD'),\r\n\t\t\t),\r\n\t\t\t'SEARCHABLE_CONTENT' => array(\r\n\t\t\t\t'data_type' => 'text',\r\n\t\t\t\t'title' => Loc::getMessage('CONTENT_TEXT_ENTITY_SEARCHABLE_CONTENT_FIELD'),\r\n\t\t\t),\r\n\t\t\t'CONTENT' => array(\r\n\t\t\t\t'data_type' => SearchTable::getEntity(),\r\n\t\t\t\t'reference' => array('=this.SEARCH_CONTENT_ID' => 'ref.ID'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function getMap()\n {\n return $this->map;\n }",
"public function getMap()\n {\n return $this->map;\n }",
"public function getDtdMapping();",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_ID_FIELD'),\n ),\n 'TIMESTAMP_X' => new Main\\Entity\\DatetimeField('TIMESTAMP_X', array(\n 'default_value' => new Main\\Type\\DateTime(),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_TIMESTAMP_X_FIELD'),\n )),\n 'SOCIAL' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateSocial'),\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIAL_FIELD'),\n ),\n 'USER_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_USER_ID_FIELD'),\n ),\n 'SOCIALTEXT' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('SOCIALPUSH_ENTITY_SOCIALTEXT_FIELD'),\n ),\n );\n }",
"protected function getMap()\n {\n return config('codegenerator.eloquent_type_to_html_type');\n }",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'FORUM_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_FORUM_ID'),\n\t\t\t),\n\t\t\t'SITE_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateSiteId'),\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_SITE_ID'),\n\t\t\t),\n\t\t\t'PATH2FORUM_MESSAGE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'validation' => array(__CLASS__, 'validatePath'),\n\t\t\t\t'title' => Loc::getMessage('FORUM_SITE_TABLE_FIELD_SITE_ID'),\n\t\t\t),\n\t\t\t'FORUM' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Forum\\Forum',\n\t\t\t\t'reference' => array('=this.FORUM_ID' => 'ref.ID')\n\t\t\t),\n\t\t\t'SITE' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Main\\Site',\n\t\t\t\t'reference' => array('=this.SITE_ID' => 'ref.LID'),\n\t\t\t),\n\t\t);\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t'ID' => new IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ID_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_TYPE' => new EnumField(\n\t\t\t\t'PERSON_TYPE',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'values' => static::getTypes(),\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_TYPE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_NAME' => new StringField(\n\t\t\t\t'PERSON_NAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonName'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_NAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_LASTNAME' => new StringField(\n\t\t\t\t'PERSON_LASTNAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonLastname'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_LASTNAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PERSON_MIDDLENAME' => new StringField(\n\t\t\t\t'PERSON_MIDDLENAME',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePersonMiddlename'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PERSON_MIDDLENAME_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'EMAIL' => new StringField(\n\t\t\t\t'EMAIL',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateEmail'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_EMAIL_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'PHONE' => new StringField(\n\t\t\t\t'PHONE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePhone'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_PHONE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'POST_INDEX' => new StringField(\n\t\t\t\t'POST_INDEX',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validatePostIndex'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_POST_INDEX_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COUNTRY' => new StringField(\n\t\t\t\t'COUNTRY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCountry'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COUNTRY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CITY' => new StringField(\n\t\t\t\t'CITY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCity'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CITY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'COMPANY' => new StringField(\n\t\t\t\t'COMPANY',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateCompany'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_COMPANY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'INN' => new StringField(\n\t\t\t\t'INN',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateInn'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_INN_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'KPP' => new StringField(\n\t\t\t\t'KPP',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateKpp'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_KPP_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'ADDRESS' => new StringField(\n\t\t\t\t'ADDRESS',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateAddress'],\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_ADDRESS_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_MODIFY' => new DatetimeField(\n\t\t\t\t'DATE_MODIFY',\n\t\t\t\t[\n\t\t\t\t\t'default' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_MODIFY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'DATE_CREATE' => new DatetimeField(\n\t\t\t\t'DATE_CREATE',\n\t\t\t\t[\n\t\t\t\t\t'default_value' => function()\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new DateTime();\n\t\t\t\t\t},\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_DATE_CREATE_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'CREATED_BY' => new IntegerField(\n\t\t\t\t'CREATED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_CREATED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t\t'MODIFIED_BY' => new IntegerField(\n\t\t\t\t'MODIFIED_BY',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('CONTRACTOR_ENTITY_MODIFIED_BY_FIELD'),\n\t\t\t\t]\n\t\t\t),\n\t\t];\n\t}",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'SEO_TEXT_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_SEO_TEXT_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'SECTION_ID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('SMARTSEO_SEO_TEXT_IBLOCK_SECTIONS_ENTITY_SECTION_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n (new Reference('SEO_TEXT', SmartseoSeoTextTable::class, Join::on('this.SEO_TEXT_ID', 'ref.ID')))\n ->configureJoinType('left'),\n (new Reference('SECTION', \\Bitrix\\Iblock\\SectionTable::class, Join::on('this.SECTION_ID', 'ref.ID')))\n ->configureJoinType('left'),\n\t\t];\n\t}",
"public function getMap() {\n\t\treturn is_array($this -> _referenceMap) ? $this -> _referenceMap : array();\n\t}",
"function tradeoff_map_node($definition)\n {\n return app(Models\\Resolution\\Map\\MapNode::class)->setData($definition);\n }",
"public static function getMap()\n {\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true\n ),\n 'OBJECT_ID' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'TASK_ID' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'ACCESS_CODE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateAccessCode')\n ),\n 'DOMAIN' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateDomain')\n ),\n 'NEGATIVE' => array(\n 'data_type' => 'integer',\n 'required' => true\n ),\n 'OBJECT' => array(\n 'data_type' => 'Bitrix\\Disk\\DiskObject',\n 'reference' => array('=this.OBJECT_ID' => 'ref.ID'),\n ),\n 'TASK' => array(\n 'data_type' => 'Bitrix\\Task\\Task',\n 'reference' => array('=this.TASK_ID' => 'ref.ID'),\n ),\n );\n }",
"abstract protected function defineMapping();",
"public static function getMap()\n\t{\n\t\treturn array(\n\t\t\t'IBLOCK_ID' => array(\n\t\t\t\t'data_type' => 'integer',\n\t\t\t\t'primary' => true,\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IBLOCK_ID_FIELD'),\n\t\t\t),\n\t\t\t'FIELD_ID' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'primary' => true,\n\t\t\t\t'validation' => array(__CLASS__, 'validateFieldId'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_FIELD_ID_FIELD'),\n\t\t\t),\n\t\t\t'IS_REQUIRED' => array(\n\t\t\t\t'data_type' => 'boolean',\n\t\t\t\t'values' => array('N','Y'),\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_IS_REQUIRED_FIELD'),\n\t\t\t),\n\t\t\t'DEFAULT_VALUE' => array(\n\t\t\t\t'data_type' => 'string',\n\t\t\t\t'title' => Loc::getMessage('IBLOCK_FIELD_ENTITY_DEFAULT_VALUE_FIELD'),\n\t\t\t),\n\t\t\t'IBLOCK' => array(\n\t\t\t\t'data_type' => 'Bitrix\\Iblock\\Iblock',\n\t\t\t\t'reference' => array('=this.IBLOCK_ID' => 'ref.ID')\n\t\t\t),\n\t\t);\n\t}",
"public function getIdentityMap()\n {\n return $this->identityMap;\n }",
"public function getIdentityMap()\n {\n return $this->identityMap;\n }",
"public function entity()\n {\n $data = $this->morphMany('\\ApprovalSequence\\Models\\Entity', 'entity')->get();\n $data = $data->map(function ($item) {\n return $item->entity;\n });\n return $data;\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\n\t\t\t(new Fields\\IntegerField('LOCATION_ID'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\IntegerField('TYPE'))\n\t\t\t\t->configureRequired(true)\n\t\t\t\t->configurePrimary(true),\n\n\t\t\t(new Fields\\StringField('VALUE'))\n\t\t\t\t->addValidator(new Main\\ORM\\Fields\\Validators\\LengthValidator(null, 255)),\n\n\t\t\t// Ref\n\n\t\t\t(new Fields\\Relations\\Reference('LOCATION', LocationTable::class,\n\t\t\t\tJoin::on('this.LOCATION_ID', 'ref.ID')))\n\t\t\t\t->configureJoinType('inner')\n\t\t];\n\t}",
"public function getMappingEntityType();",
"function getEntityList()\n\t{\n\t\tif($this->entityList === null)\n\t\t{\n\t\t\t$event = new \\Bitrix\\Main\\Event('main', 'onUserTypeEntityOrmMap');\n\t\t\t$event->send();\n\n\t\t\tforeach($event->getResults() as $eventResult)\n\t\t\t{\n\t\t\t\tif($eventResult->getType() == \\Bitrix\\Main\\EventResult::SUCCESS)\n\t\t\t\t{\n\t\t\t\t\t$result = $eventResult->getParameters(); // [ENTITY_ID => 'SomeTable']\n\t\t\t\t\tforeach($result as $entityId => $entityClass)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(mb_substr($entityClass, 0, 1) !== '\\\\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$entityClass = '\\\\' . $entityClass;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->entityList[$entityId] = $entityClass;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->entityList;\n\t}",
"public function getIdentityMap()\n {\n if (null == $this->identityMap) {\n $this->setIdentityMap(new IdentityMap());\n }\n return $this->identityMap;\n }",
"public function entityFor(): string;",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\t(new StringField('EXTERNAL_HASH'))\n\t\t\t\t->configurePrimary()\n\t\t\t\t->configureAutocomplete()\n\t\t\t\t->configureSize(128)\n\t\t\t,\n\t\t\tnew IntegerField('OBJECT_ID'),\n\t\t\tnew IntegerField('VERSION_ID'),\n\t\t\t(new IntegerField('OWNER_ID'))\n\t\t\t\t->configureRequired()\n\t\t\t,\n\t\t\t(new DatetimeField('CREATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new DatetimeField('UPDATE_TIME'))\n\t\t\t\t->configureRequired()\n\t\t\t\t->configureDefaultValue(function() {\n\t\t\t\t\treturn new DateTime();\n\t\t\t\t})\n\t\t\t,\n\t\t\t(new IntegerField('USERS'))\n\t\t\t\t->configureDefaultValue(0)\n\t\t\t,\n\t\t\t(new IntegerField('CONTENT_STATUS'))\n\t\t\t\t->configureDefaultValue(self::CONTENT_STATUS_INIT)\n\t\t\t,\n\t\t];\n\t}",
"function getEntityMappings()\n {\n return [\n 'Icarus\\QueueMailer' => __DIR__ . '/../Model/'\n ];\n }",
"public function getMapping($sEntityClassName = null)\n {\n return (isset($this->aMappingConfiguration[$sEntityClassName]) === true)\n ? $this->aMappingConfiguration[$sEntityClassName]\n : $this->aMappingConfiguration;\n }",
"public function get_postmeta_mapping() {\n\t\treturn $this->postmeta_mapping;\n\t}",
"public function map()\n {\n return [\n 'full' => ['key' => 'address'],\n 'city' => ['key' => 'city'],\n 'state' => ['key' => 'state'],\n 'zip' => ['key' => 'zip'],\n 'country' => ['key' => 'country'],\n ];\n }",
"abstract protected function buildMap();",
"public function getFilePositionMap(): FilePositionMap\n {\n return $this->file_position_map ?? ($this->file_position_map = new FilePositionMap($this->contents));\n }",
"static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'rev' => array(\n 'type' => 'integer',\n ),\n 'cover' => array(\n 'type' => 'string',\n ),\n 'wiki_id' => array(\n 'type' => 'integer',\n ),\n 'title' => array(\n 'type' => 'string',\n ),\n 'html_cache' => array(\n 'type' => 'string',\n ),\n 'content' => array(\n 'type' => 'string',\n ),\n 'tags' => array(\n 'type' => 'raw',\n ),\n 'comment_tags' => array(\n 'type' => 'raw',\n ),\n 'model' => array(\n 'type' => 'string',\n ),\n 'has_video' => array(\n 'type' => 'integer',\n ),\n 'like_num' => array(\n 'type' => 'integer',\n ),\n 'dislike_num' => array(\n 'type' => 'integer',\n ),\n 'watched_num' => array(\n 'type' => 'integer',\n ),\n 'admin_id' => array(\n 'type' => 'integer',\n ),\n 'do_date' => array(\n 'type' => 'date',\n ),\n 'source' => array(\n 'type' => 'raw',\n ),\n 'tvsou_id' => array(\n 'type' => 'string',\n ),\n 'first_letter' => array(\n 'type' => 'string',\n ),\n 'douban_id' => array(\n 'type' => 'string',\n ),\n 'verify' => array(\n 'type' => 'integer',\n ),\n 'created_at' => array(\n 'type' => 'date',\n ),\n 'updated_at' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }",
"public function getMap() {\n return [\n 'sku' => 'itemNo',\n 'shortDescription' => 'description',\n 'longDescription' => 'description2',\n 'measurementUnit' => 'unitOfMeasure',\n 'mpn' => 'vendorItemNo',\n 'ean' => 'eanNo',\n ];\n }",
"public function GenerateEntity() {\n return $this->entity->Generate();\n }",
"public static function createFromDOM( \\DOMElement $element, Metadata $metadata ): EntityMap {\n $map = new static();\n\n $x = new \\DOMXPath( $element->ownerDocument );\n $x->registerNamespace( 'edmx', Metadata::NS_EDMX );\n $x->registerNamespace( 'edm', Metadata::NS_EDM );\n\n $map->name = $element->getAttribute( 'Name' );\n $map->key = $x->evaluate( 'string(edm:Key/edm:PropertyRef/@Name)', $element );\n if ( $map->key === '' ) {\n $map->key = null;\n }\n\n $map->isAbstract = $element->hasAttribute( 'Abstract' ) && $element->getAttribute( 'Abstract' ) === 'true';\n $map->baseEntity = $element->hasAttribute( 'BaseType' )? $metadata->stripNamespace( $element->getAttribute( 'BaseType' ) ) : null;\n\n $propertiesList = $x->query( 'edm:Property', $element );\n foreach ( $propertiesList as $propertyElement ) {\n /**\n * @var \\DOMElement $propertyElement\n */\n $propertyName = $propertyElement->getAttribute( 'Name' );\n $concretePropertyName = preg_replace( '~^_(.*)_value$~', '$1', $propertyName );\n\n /*\n * Build the inbound map.\n *\n * As-is properties by default, _(.*)_value => $1\n */\n $map->inboundMap[$propertyName] = $concretePropertyName;\n\n /**\n * Build the field type map. Mapped are the real CRM field names.\n */\n $map->fieldTypes[$concretePropertyName] = $propertyElement->getAttribute( 'Type' );\n\n /*\n * Build the outbound map.\n *\n * As-is properties by default.\n * For _(.*)_value, find corresponding navigation properties.\n * We get a map $1 => [ Type => NavigationPropertyName ]\n */\n $referentialConstraints = $x->query( \"edm:NavigationProperty/edm:ReferentialConstraint[@Property='{$propertyName}']\", $element );\n if ( !$referentialConstraints->length ) {\n $map->outboundMap[$propertyName] = $propertyName;\n continue;\n }\n $map->outboundMap[$concretePropertyName] = [];\n foreach ( $referentialConstraints as $referentialConstraint ) {\n /**\n * @var \\DOMElement $referentialConstraint\n */\n $navigationProperty = $referentialConstraint->parentNode;\n $navType = $metadata->stripNamespace( $navigationProperty->getAttribute( 'Type' ) );\n\n $map->outboundMap[$concretePropertyName][$navType] = $navigationProperty->getAttribute( 'Name' );\n\n /*\n * Resolve possible abstract types into concrete types. E.g. principal => systemuser, team.\n */\n if ( array_key_exists( $navType, $metadata->parentTypesMap ) ) {\n foreach ( $metadata->parentTypesMap[$navType] as $concreteType ) {\n $map->outboundMap[$concretePropertyName][$concreteType] = $navigationProperty->getAttribute( 'Name' );\n }\n }\n }\n }\n\n return $map;\n }",
"protected function classMap()\n {\n $class_map = new ClassMap();\n\n return $class_map->getMap();\n }",
"public function definition()\n {\n return [\n 'entity' => $this->faker->word,\n 'entity_id' => $this->faker->numberBetween(1, 1000),\n 'field' => $this->faker->word,\n 'name' => $this->faker->word,\n 'nameOriginal' => $this->faker->word,\n 'publicPath' => $this->faker->word,\n 'extension' => $this->faker->countryCode,\n 'data' => $this->faker->text,\n ];\n }",
"public static function getMap()\n {\n return [\n (new Fields\\StringField('HASH'))\n ->configurePrimary(true),\n\n new Fields\\IntegerField('RELIABILITY'),\n new Fields\\StringField('ADDRESS'),\n new Fields\\StringField('FULL_NAME'),\n new Fields\\StringField('PHONE'),\n new Fields\\DatetimeField('UPDATED_AT')\n ];\n }",
"public function getEntity( )\n {\n\n return $this->entity;\n\n }",
"public function getMap() : Map {\n // return the private property as-is\n return $this->map;\n }",
"public function getEntities();",
"public function getEntities();",
"public static function getMap()\n {\n $map = [\n 'project' => ProjectResource::class,\n 'issue' => IssueResource::class\n ];\n return $map;\n }",
"public function definition()\n {\n return [\n 'name' => 'Goblin',\n 'damage_stat' => 'str',\n 'xp' => 10,\n 'str' => 1,\n 'dur' => 1,\n 'dex' => 1,\n 'chr' => 1,\n 'int' => 1,\n 'agi' => 1,\n 'focus' => 1,\n 'ac' => 1,\n 'health_range' => '1-8',\n 'attack_range' => '1-6',\n 'gold' => 25,\n 'drop_check' => 6,\n 'max_level' => 0,\n 'game_map_id' => null,\n 'criticality' => 0.03,\n 'accuracy' => 0.01,\n 'dodge' => 0.01,\n 'casting_accuracy' => 0.01,\n ];\n }",
"public function entity ()\n {\n return $this->_entity;\n }",
"public function testBuildMarshalMapBuildEntities(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->addBehavior('Translate', ['fields' => ['title', 'body']]);\n $translate = $table->behaviors()->get('Translate');\n\n $map = $translate->buildMarshalMap($table->marshaller(), [], []);\n $entity = $table->newEmptyEntity();\n $data = [\n 'en' => [\n 'title' => 'English Title',\n 'body' => 'English Content',\n ],\n 'es' => [\n 'title' => 'Titulo Español',\n 'body' => 'Contenido Español',\n ],\n ];\n $result = $map['_translations']($data, $entity);\n $this->assertEmpty($entity->getErrors(), 'No validation errors.');\n $this->assertCount(2, $result);\n $this->assertArrayHasKey('en', $result);\n $this->assertArrayHasKey('es', $result);\n $this->assertSame('English Title', $result['en']->title);\n $this->assertSame('Titulo Español', $result['es']->title);\n }",
"public function getDefinition() {}",
"public function entity()\r\n {\r\n return $this->entity;\r\n }",
"public function getEntity() {\n return $this->entity;\n }",
"public static function &entityInfo($entity_name)\n\t{\n\t\tif(isset(self::$entity_info[$entity_name])) {\n\t\t\treturn self::$entity_info[$entity_name];\n\t\t}\n\t\t\n\t\t$class = Collection::loadEntity($entity_name);\n\t\t\n\t\tif(class_exists($class)) {\n\t\t\t$object = new $class($entity_name);\n\t\t\t\n\t\t\tif(!is_subclass_of($object, Orm::ENTITY_BASE_CLASS) && get_class($object) != Orm::ENTITY_BASE_CLASS) {\n\t\t\t\tthrow new BakedCarrotOrmException(\"Class $class is not a subclass of \" . Orm::ENTITY_BASE_CLASS);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$class = Orm::ENTITY_BASE_CLASS;\n\t\t\t$object = new $class($entity_name);\n\t\t}\n\t\t\n\t\tself::$entity_info[$entity_name] = $object->info();\n\t\t\n\t\tunset($object);\n\t\t\n\t\treturn self::$entity_info[$entity_name];\n\t}",
"function section__map(){\n return array(\n 'content'=>\"<div style='width:300px; height:300px' style='\n margin-left:auto; margin-right:auto;' id='map'></div>\",\n 'class'=>'main',\n 'label'=>'Map',\n 'order'=>'1'\n );\n }",
"public static function getMap()\n\t{\n\t\treturn [\n\t\t\tnew IntegerField(\n\t\t\t\t'ID',\n\t\t\t\t[\n\t\t\t\t\t'primary' => true,\n\t\t\t\t\t'autocomplete' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_ID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'TITLE',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateTitle'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_TITLE_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew StringField(\n\t\t\t\t'YEAR',\n\t\t\t\t[\n\t\t\t\t\t'validation' => [__CLASS__, 'validateYear'],\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_YEAR_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'COPIES_CNT',\n\t\t\t\t[\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_COPIES_CNT_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew IntegerField(\n\t\t\t\t'PUBLISHINGID',\n\t\t\t\t[\n\t\t\t\t\t'required' => true,\n\t\t\t\t\t'title' => Loc::getMessage('BOOK_ENTITY_PUBLISHINGID_FIELD')\n\t\t\t\t]\n\t\t\t),\n\t\t\tnew ReferenceField(\n\t\t\t\t'PUBLISHING_ID',\n\t\t\t\t'Listbooks\\PublishingTable',\n\t\t\t\tarray('=this.PUBLISHINGID' => 'ref.ID'),\n\t\t\t)\n\t\t];\n\t}",
"public function getElasticaMapping() {\n\t\t$mapping = new Mapping();\n\n $fields = $this->getElasticaFields();\n\n\t\t$mapping->setProperties($fields);\n\n $callable = get_class($this->owner).'::updateElasticsearchMapping';\n if(is_callable($callable))\n {\n $mapping = call_user_func($callable, $mapping);\n }\n\n\t\treturn $mapping;\n\t}",
"public static function getMap()\n{\n return array(\n 'ID' => array(\n 'data_type' => 'integer',\n 'primary' => true,\n 'autocomplete' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_ID_FIELD'),\n ),\n 'TITLE' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateTitle'),\n 'title' => Loc::getMessage('TASKS_ENTITY_TITLE_FIELD'),\n ),\n 'DESCRIPTION' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_DESCRIPTION_FIELD'),\n ),\n 'DESCRIPTION_IN_BBCODE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_DESCRIPTION_IN_BBCODE_FIELD'),\n ),\n 'PRIORITY' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validatePriority'),\n 'title' => Loc::getMessage('TASKS_ENTITY_PRIORITY_FIELD'),\n ),\n 'STATUS' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateStatus'),\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_FIELD'),\n ),\n 'RESPONSIBLE_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_RESPONSIBLE_ID_FIELD'),\n ),\n 'DATE_START' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_DATE_START_FIELD'),\n ),\n 'DURATION_PLAN' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_PLAN_FIELD'),\n ),\n 'DURATION_FACT' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_FACT_FIELD'),\n ),\n 'DURATION_TYPE' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateDurationType'),\n 'title' => Loc::getMessage('TASKS_ENTITY_DURATION_TYPE_FIELD'),\n ),\n 'TIME_ESTIMATE' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_TIME_ESTIMATE_FIELD'),\n ),\n 'REPLICATE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_REPLICATE_FIELD'),\n ),\n 'DEADLINE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_DEADLINE_FIELD'),\n ),\n 'START_DATE_PLAN' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_START_DATE_PLAN_FIELD'),\n ),\n 'END_DATE_PLAN' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_END_DATE_PLAN_FIELD'),\n ),\n 'CREATED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CREATED_BY_FIELD'),\n ),\n 'CREATED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CREATED_DATE_FIELD'),\n ),\n 'CHANGED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CHANGED_BY_FIELD'),\n ),\n 'CHANGED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CHANGED_DATE_FIELD'),\n ),\n 'STATUS_CHANGED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_CHANGED_BY_FIELD'),\n ),\n 'STATUS_CHANGED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_STATUS_CHANGED_DATE_FIELD'),\n ),\n 'CLOSED_BY' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_CLOSED_BY_FIELD'),\n ),\n 'CLOSED_DATE' => array(\n 'data_type' => 'datetime',\n 'title' => Loc::getMessage('TASKS_ENTITY_CLOSED_DATE_FIELD'),\n ),\n 'GUID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateGuid'),\n 'title' => Loc::getMessage('TASKS_ENTITY_GUID_FIELD'),\n ),\n 'XML_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateXmlId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_XML_ID_FIELD'),\n ),\n 'EXCHANGE_ID' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateExchangeId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_EXCHANGE_ID_FIELD'),\n ),\n 'EXCHANGE_MODIFIED' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateExchangeModified'),\n 'title' => Loc::getMessage('TASKS_ENTITY_EXCHANGE_MODIFIED_FIELD'),\n ),\n 'OUTLOOK_VERSION' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_OUTLOOK_VERSION_FIELD'),\n ),\n 'MARK' => array(\n 'data_type' => 'string',\n 'validation' => array(__CLASS__, 'validateMark'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MARK_FIELD'),\n ),\n 'ALLOW_CHANGE_DEADLINE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ALLOW_CHANGE_DEADLINE_FIELD'),\n ),\n 'ALLOW_TIME_TRACKING' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ALLOW_TIME_TRACKING_FIELD'),\n ),\n 'MATCH_WORK_TIME' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MATCH_WORK_TIME_FIELD'),\n ),\n 'TASK_CONTROL' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_TASK_CONTROL_FIELD'),\n ),\n 'ADD_IN_REPORT' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ADD_IN_REPORT_FIELD'),\n ),\n 'GROUP_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_GROUP_ID_FIELD'),\n ),\n 'PARENT_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_PARENT_ID_FIELD'),\n ),\n 'FORUM_TOPIC_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_FORUM_TOPIC_ID_FIELD'),\n ),\n 'MULTITASK' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_MULTITASK_FIELD'),\n ),\n 'SITE_ID' => array(\n 'data_type' => 'string',\n 'required' => true,\n 'validation' => array(__CLASS__, 'validateSiteId'),\n 'title' => Loc::getMessage('TASKS_ENTITY_SITE_ID_FIELD'),\n ),\n 'DECLINE_REASON' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_DECLINE_REASON_FIELD'),\n ),\n 'FORKED_BY_TEMPLATE_ID' => array(\n 'data_type' => 'integer',\n 'title' => Loc::getMessage('TASKS_ENTITY_FORKED_BY_TEMPLATE_ID_FIELD'),\n ),\n 'ZOMBIE' => array(\n 'data_type' => 'boolean',\n 'values' => array('N', 'Y'),\n 'title' => Loc::getMessage('TASKS_ENTITY_ZOMBIE_FIELD'),\n ),\n 'DEADLINE_COUNTED' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_DEADLINE_COUNTED_FIELD'),\n ),\n 'STAGE_ID' => array(\n 'data_type' => 'integer',\n 'required' => true,\n 'title' => Loc::getMessage('TASKS_ENTITY_STAGE_ID_FIELD'),\n ),\n 'SEARCH_INDEX' => array(\n 'data_type' => 'text',\n 'title' => Loc::getMessage('TASKS_ENTITY_SEARCH_INDEX_FIELD'),\n ),\n );\n}",
"public function getPropertyMappingConfiguration() {}",
"protected function getMap()\n\t{\n\t\treturn array(\n\t\t\t'USE' => new Field\\Checkbox('USE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_USE')\n\t\t\t)),\n\t\t\t'CODE' => new Field\\Textarea('CODE', array(\n\t\t\t\t'title' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE'),\n\t\t\t\t'help' => Loc::getMessage('LANDING_HOOK_HEADBLOCK_CODE_HELP2'),\n\t\t\t\t'placeholder' => '<script>\n\tvar googletag = googletag || {};\n\tgoogletag.cmd = googletag.cmd || [];\n</script>'\n\t\t\t))\n\t\t);\n\t}",
"static public function getDataMap()\n {\n return array(\n 'fields' => array(\n 'channel_code' => array(\n 'type' => 'string',\n ),\n 'time' => array(\n 'type' => 'date',\n ),\n ),\n 'references' => array(\n\n ),\n 'embeddeds' => array(\n\n ),\n 'relations' => array(\n\n ),\n );\n }",
"public function getDefinition();",
"public function getDefinition();",
"public function getEntity();",
"public function getEntity();",
"public function getEntity();",
"function tradeoff_map_node_coordinates($definition)\n {\n return app(Models\\Resolution\\Map\\MapNodeCoordinates::class)->setData($definition);\n }",
"public function getEntity()\n\t{\n\t \treturn $this->entity;\n\t}",
"public function getEntity()\r\n {\r\n return $this->entity;\r\n }",
"public function entity() {\n\t\t\treturn $this->entity;\n\t\t}",
"public function definition()\n {\n return [\n 'article_id' => rand(1, 100),\n 'article_cathegory_id' => rand(1, 10)\n ];\n }"
] | [
"0.6637542",
"0.6594023",
"0.648225",
"0.64311457",
"0.64077604",
"0.6392645",
"0.6384917",
"0.6319827",
"0.629275",
"0.6263408",
"0.6239673",
"0.6159177",
"0.61396015",
"0.6062293",
"0.60510415",
"0.59983045",
"0.59882057",
"0.5968825",
"0.59648436",
"0.596274",
"0.596274",
"0.59273875",
"0.58843434",
"0.5866129",
"0.58216625",
"0.58002514",
"0.57921517",
"0.57575846",
"0.5735735",
"0.5691033",
"0.56899387",
"0.56801575",
"0.56779796",
"0.56779796",
"0.5661703",
"0.5661584",
"0.565367",
"0.565367",
"0.5631635",
"0.5623792",
"0.56103766",
"0.559742",
"0.5584529",
"0.5560778",
"0.55528533",
"0.5515704",
"0.54982084",
"0.54512745",
"0.5447925",
"0.5438778",
"0.5438778",
"0.54332536",
"0.54223657",
"0.53965104",
"0.5378425",
"0.53581494",
"0.5351258",
"0.5350025",
"0.53452766",
"0.53439736",
"0.53414345",
"0.53382355",
"0.5338195",
"0.5332099",
"0.53153455",
"0.5301299",
"0.53006434",
"0.52931714",
"0.5280523",
"0.5276008",
"0.5267977",
"0.5265466",
"0.5258486",
"0.525734",
"0.525734",
"0.5240745",
"0.5239523",
"0.52392167",
"0.52205896",
"0.5220305",
"0.5218102",
"0.52163374",
"0.5208456",
"0.52074546",
"0.5195835",
"0.51945716",
"0.518896",
"0.51729476",
"0.5171026",
"0.5164451",
"0.5163174",
"0.5163174",
"0.51510704",
"0.51510704",
"0.51510704",
"0.5141416",
"0.51409626",
"0.51373607",
"0.5135745",
"0.513485"
] | 0.5309036 | 65 |
Create a new controller instance. | public function __construct()
{
$this->middleware('auth');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createController()\n {\n $this->createClass('controller');\n }",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }",
"private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }",
"protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }",
"protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }",
"public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }",
"public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}",
"public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}",
"public function createController( ezcMvcRequest $request );",
"public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }",
"public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}",
"private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }",
"public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}",
"public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}",
"private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }",
"public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }",
"public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se creó 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 |
Show the application dashboard. | public function index()
{
$is_current_month = !request()->get('next');
$days_in_month = date('t', strtotime($is_current_month ? 'now' : '+1 month'));
$month_number = date('n', strtotime($is_current_month ? 'now' : '+1 month'));
$year_number = date('y', strtotime($is_current_month ? 'now' : '+1 month'));
$shifts = [];
foreach (range(1,$days_in_month) as $day_number) {
$date = mktime(0, 0, 0, $month_number, $day_number, $year_number);
$shifts[date('j.n.y', $date)] = [
'date_without_year' => date('j.n', $date),
'date' => date('j.n.y', $date),
'day_of_week' => str_replace(['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], ['ראשון', 'שני', 'שלישי', 'רביעי', 'חמישי', 'שישי', 'שבת'], date('l', $date)),
'shift1' => [
'saturday' => date('w', $date) == 6,
'title' => NULL,
'users' => []
],
'shift2' => [
'saturday' => date('w', $date) == 6,
'title' => NULL,
'users' => []
],
'shift3' => [
'saturday' => date('w', $date) == 5 || date('w', $date) == 6,
'title' => NULL,
'users' => []
],
];
}
$registered = Shift::with('user')
->where('date_str', 'LIKE', "%.$month_number.$year_number")
->get();
foreach ($registered as $register) {
$shifts[$register['date_str']]['shift'.$register['shift_id']]['users'][] = [
'user_id' => $register['user_id'],
'status' => $register['status'],
'name' => array_get($register, 'user.name', 'משתמש נמחק'),
];
}
$is_admin = request()->get('admin') && Auth::user()->is_admin;
return view('home')
->with('shifts', array_values($shifts))
->with('current_user_id', Auth::user()->id)
->with('is_current_month', $is_current_month)
->with('can_admin', Auth::user()->is_admin)
->with('users', $is_admin ? User::orderBy('name')->get() : [])
->with('is_admin', $is_admin);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }",
"function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}",
"public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }",
"public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }",
"public function dashboard()\n {\n return view('backend.dashboard.index');\n }",
"public function index() {\n return view(\"admin.dashboard\");\n }",
"public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }",
"public function dashboard(){\n return view('backend.admin.index');\n }",
"public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }",
"public function dashboard()\n {\n return view('dashboard.index');\n }",
"public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }",
"public function dashboard() \r\n {\r\n return view('admin.index');\r\n }",
"public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}",
"public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }",
"public function dashboard()\n {\n\n return view('admin.dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function dashboard()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('adm.dashboard');\n }",
"public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }",
"public function show()\n {\n return view('dashboard');\n }",
"public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}",
"public function index() {\n return view('modules.home.dashboard');\n }",
"public function show()\n {\n return view('dashboard.dashboard');\n \n }",
"public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }",
"public function dashboard()\n { \n return view('jobposter.dashboard');\n }",
"public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}",
"public function index()\n {\n return view('pages.admin.dashboard');\n }",
"public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }",
"public function index()\n {\n //\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('admin.dashboard.index');\n }",
"public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }",
"public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }",
"public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }",
"public function getDashboard() {\n return view('admin.dashboard');\n }",
"public function index()\n {\n return view('smartcrud.auth.dashboard');\n }",
"public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }",
"public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }",
"public function index()\n {\n return view('board.pages.dashboard-board');\n }",
"public function index()\n {\n return view('admin::settings.development.dashboard');\n }",
"public function index()\n {\n return view('dashboard.dashboard');\n }",
"public function show()\n {\n return view('dashboard::show');\n }",
"public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }",
"public function dashboard()\n {\n return view('Admin.dashboard');\n }",
"public function show()\n {\n return view('admins\\auth\\dashboard');\n }",
"public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }",
"public function index()\n {\n return view('bitaac::account.dashboard');\n }",
"public function index()\n { \n return view('admin-views.dashboard');\n }",
"public function getDashboard()\n {\n return view('dashboard');\n }",
"function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }",
"public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }",
"public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index()\n {\n return view('dashboard');\n }",
"public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }",
"public function index()\r\n {\r\n return view('user.dashboard');\r\n }",
"public function index() {\n return view('dashboard', []);\n }",
"public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }",
"public function index()\n {\n return view('back-end.dashboard.index');\n //\n }",
"public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}",
"public function index() {\n return view('dashboard.index');\n }",
"public function index()\n {\n return view('page.dashboard.index');\n }",
"public function index()\n {\n\n return view('dashboard');\n }",
"public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }",
"public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }",
"public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}",
"public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }",
"public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}",
"public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }",
"public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }",
"public function index()\n {\n return view('dashboard.index');\n }",
"public function index()\n {\n return view('dashboard.index');\n }",
"public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }",
"public function index()\n {\n return view('/dashboard');\n }",
"public function index()\n {\n \treturn view('dashboard');\n }",
"public function index()\n {\n return view('ketua.ketua-dashboard');\n }",
"public function index(){\n return View::make('admin.authenticated.dashboardview');\n }",
"public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }",
"public function index()\n {\n return view('adminpanel.home');\n }",
"public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}",
"public function index()\n {\n return view('dashboard.home');\n }",
"public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }",
"public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }",
"public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }",
"public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }",
"public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }",
"public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }",
"public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }",
"public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }"
] | [
"0.77850926",
"0.7760142",
"0.7561336",
"0.75147176",
"0.74653697",
"0.7464913",
"0.73652893",
"0.7351646",
"0.7346477",
"0.73420244",
"0.7326711",
"0.7316215",
"0.73072463",
"0.7287626",
"0.72826403",
"0.727347",
"0.727347",
"0.727347",
"0.727347",
"0.7251768",
"0.7251768",
"0.7251768",
"0.7251768",
"0.7251768",
"0.7241342",
"0.7236133",
"0.7235562",
"0.7218318",
"0.71989936",
"0.7197427",
"0.71913266",
"0.71790016",
"0.71684825",
"0.71577966",
"0.7146797",
"0.7133428",
"0.7132746",
"0.71298903",
"0.71249074",
"0.71218014",
"0.71170413",
"0.7110151",
"0.7109032",
"0.7107029",
"0.70974076",
"0.708061",
"0.7075653",
"0.70751685",
"0.7064041",
"0.70550334",
"0.7053102",
"0.7051273",
"0.70484304",
"0.7043605",
"0.70393986",
"0.70197886",
"0.70185125",
"0.70139873",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.700917",
"0.6992477",
"0.6979631",
"0.69741416",
"0.69741327",
"0.6968815",
"0.6968294",
"0.69677526",
"0.69652885",
"0.69586027",
"0.6944985",
"0.69432825",
"0.69419175",
"0.6941512",
"0.6941439",
"0.6938837",
"0.6937524",
"0.6937456",
"0.6937456",
"0.69276494",
"0.6921651",
"0.69074917",
"0.69020325",
"0.6882262",
"0.6869339",
"0.6867868",
"0.68557185",
"0.68479055",
"0.684518",
"0.68408877",
"0.6838798",
"0.6833479",
"0.6832326",
"0.68309164",
"0.6826798",
"0.6812457"
] | 0.0 | -1 |
Proporciona ciertos datos de cualquier OrdenCompra a travez de su id | public function obteterDatos($id_OrdenCompra){
echo '---'.$id_OrdenCompra.'---';
$conexion = $this->conn;
$sth = $conexion->prepare('SELECT id_OrdenCompra, nombre_OrdenCompra as nombre, fecha_registro ,prop.tipo_procedencia , rfc, telefono , email , direccion , tipop.tipo , nickname , password , url_image from '.$this->nombreTabla.' OrdenCompra , procendias_OrdenCompra prop, tipos tipop where estado = 1 and OrdenCompra.id_tipo_procedencia= prop.id_tipo_procedencia and OrdenCompra.id_tipo = tipop.id_tipo and id_OrdenCompra = :id_OrdenCompra', array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$sth->bindParam(':id_OrdenCompra', $id_OrdenCompra, PDO::PARAM_INT );
$sth->execute();
$row = $sth->fetch(PDO::FETCH_ASSOC);
return $row;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function CreditosPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.direccliente, clientes.emailcliente, ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.tipopagove, ventas.formapagove, ventas.fechaventa, ventas.fechavencecredito, ventas.statusventa, usuarios.nombres, cajas.nrocaja, abonoscreditos.codventa as cod, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (ventas LEFT JOIN clientes ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN usuarios ON ventas.codigo = usuarios.codigo WHERE ventas.codventa =? GROUP BY cod\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function traerEmpleados($id)\n {\n if ($id == Auth()->user()->cz1_id_empleado || Gate::allows('isAdmin') ||\n Gate::allows('isRRHH') || Gate::allows('isSST')) {\n\n $estado = 1;\n $contratoV = Contrato::find($id)->where('c0550_ind_estado', 2)->first();\n\n $contratoA = Contrato::where('c0550_rowid_tercero', $id)->where('c0550_ind_estado', 1)->first();\n if (empty($contratoA)) {\n $estado = 2;\n };\n\n $id_depto = Empleados::select(\"c0540_id_depto_exp_identif\")\n ->where(\"c0540_rowid_tercero\", $id)->first();\n\n // return Paises::with('departamentos')->get();\n $user = Terceros_mm::select(\n \"dbo.t015_mm_contactos.f015_contacto\",\n \"dbo.t015_mm_contactos.f015_direccion1\",\n \"dbo.t015_mm_contactos.f015_id_barrio\",\n \"dbo.t015_mm_contactos.f015_telefono\",\n \"dbo.t015_mm_contactos.f015_email\",\n \"dbo.t015_mm_contactos.f015_celular\",\n \"dbo.t015_mm_contactos.f015_id_pais\",\n \"dbo.t015_mm_contactos.f015_id_depto\",\n \"dbo.t015_mm_contactos.f015_id_ciudad\",\n \"dbo.t015_mm_contactos.f015_id_barrio\",\n \"f200_apellido2\",\n \"f200_apellido1\",\n \"f200_nombres\",\n 'dbo.w0540_empleados.c0540_rowid_tercero',\n \"c0540_fecha_exp_identif\",\n \"c0540_ind_sexo\",\n \"c0763_descripcion\",\n \"c0550_fecha_ingreso\",\n \"c0550_fecha_contrato_hasta\",\n \"c0550_rowid_centros_trabajo\",\n \"c0515_id\",\n \"c0516_id\",\n \"c0517_id\",\n \"f284_descripcion\",\n \n \"c0504_descripcion\",\n \"f011_descripcion\",\n \"f012_descripcion\",\n \"f013_descripcion\",\n 'f200_id',\n 'c0550_rowid',\n 'c0550_salario',\n \"c0540_id_ciudad_nacimiento\",\n \"c0540_id_ciudad_exp_identif\",\n \"c0540_id_depto_exp_identif\",\n \"c0540_id_pais_exp_identif\",\n \"f285_descripcion\",\n \"c0540_fecha_nacimiento\",\n \"c0550_ind_termino_contrato\"\n\n )->join(\n 'dbo.t200_mm_terceros',\n 'dbo.t015_mm_contactos.f015_rowid',\n '=',\n 'dbo.t200_mm_terceros.f200_rowid_contacto'\n\n )->join(\n 'dbo.w0540_empleados',\n 'dbo.t200_mm_terceros.f200_rowid',\n '=',\n 'dbo.w0540_empleados.c0540_rowid_tercero'\n\n )->join(\n 'dbo.w0550_contratos',\n 'dbo.w0540_empleados.c0540_rowid_tercero',\n '=',\n 'dbo.w0550_contratos.c0550_rowid_tercero'\n\n )->join(\n 'dbo.w0763_gh01_cargos',\n 'dbo.w0763_gh01_cargos.c0763_rowid',\n '=',\n 'dbo.w0550_contratos.c0550_rowid_cargo'\n )->join(\n 'dbo.w0515_entidades_eps',\n 'dbo.w0550_contratos.c0550_rowid_entidad_eps',\n '=',\n 'dbo.w0515_entidades_eps.c0515_rowid'\n\n )->join(\n 'dbo.t285_co_centro_op',\n 'dbo.w0550_contratos.c0550_id_co',\n '=',\n 'dbo.t285_co_centro_op.f285_id'\n\n )->join(\n 'dbo.w0516_entidades_afp',\n 'dbo.w0550_contratos.c0550_rowid_entidad_pension',\n '=',\n 'dbo.w0516_entidades_afp.c0516_rowid'\n\n )->join(\n 'dbo.w0517_entidades_arp',\n 'dbo.w0550_contratos.c0550_rowid_entidad_arp',\n '=',\n 'dbo.w0517_entidades_arp.c0517_rowid'\n\n )->join(\n 'dbo.t284_co_ccosto',\n 'dbo.w0550_contratos.c0550_rowid_ccosto',\n '=',\n 'dbo.t284_co_ccosto.f284_rowid'\n\n )->join(\n 'dbo.w0504_tipos_nomina',\n 'dbo.w0550_contratos.c0550_rowid_tipo_nomina',\n '=',\n 'dbo.w0504_tipos_nomina.c0504_rowid'\n )\n ->join(\n 'dbo.t013_mm_ciudades',\n 'dbo.w0540_empleados.c0540_id_ciudad_exp_identif',\n '=',\n 'dbo.t013_mm_ciudades.f013_id'\n )\n ->join(\n 'dbo.t012_mm_deptos',\n 'dbo.w0540_empleados.c0540_id_depto_exp_identif',\n '=',\n 'dbo.t012_mm_deptos.f012_id'\n )\n ->join(\n 'dbo.t011_mm_paises',\n 'dbo.w0540_empleados.c0540_id_pais_exp_identif',\n '=',\n 'dbo.t011_mm_paises.f011_id'\n )\n\n ->where('c0550_ind_estado', $estado)\n ->where('f200_rowid', $id)\n ->where('f013_id_depto', $id_depto->c0540_id_depto_exp_identif)\n ->get();\n\n $results = $user->last();\n\n return $results;\n\n }else{\n return redirect('/accces-denied'); \n } \n }",
"public function AbonosCreditosId() \n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, ventas.idventa, ventas.codventa, ventas.totalpago, ventas.statusventa, abonoscreditos.codventa as codigo, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (clientes INNER JOIN ventas ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa WHERE abonoscreditos.codabono = ? AND clientes.cedcliente = ? AND ventas.codventa = ? AND ventas.tipopagove ='CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET['codabono'])));\n\t$stmt->bindValue(2, trim(base64_decode($_GET['cedcliente'])));\n\t$stmt->bindValue(3, trim(base64_decode($_GET['codventa'])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function conseguirId (){\n $query = $this->db->query (\"SELECT * FROM acceso WHERE id_acceso = '{$this->id_acceso}'\");\n if ($query->num_rows === 1)\n {\n $this->datos= $query->fetch_assoc();\n \n }\n return $this->datos;\n }",
"public function dataProveedoresInicial ($id_prod, $id_prov) {\n\n //Busqueda de todos los paises donde quiere recibir el productor para filtrar los metodos de envio\n $paises_prod = DB::select(DB::raw(\"SELECT id_pais FROM rdj_productores_paises\n WHERE id_productor=? ORDER BY id_pais\"),[$id_prod]);\n\n $prov = []; //Variable donde se almacenan los datos a responder de la solicitud HTTP\n\n //Busqueda de información basica del proveedor\n $query = DB::select(\n DB::raw(\"SELECT pr.id AS idp, pr.nombre AS prov, pa.nombre AS pais FROM \n rdj_paises pa, rdj_proveedores pr WHERE pa.id=pr.id_pais AND pr.id=?\"),\n [$id_prov]);\n\n //Almacenamiento de la info basica en aux\n $prov[\"idp\"] = $query[0]->idp;\n $prov[\"prov\"] = $query[0]->prov;\n $prov[\"pais\"] = $query[0]->pais;\n \n //Busqueda de los metodos de pago del proveedor\n $query = DB::select(\n DB::raw(\"SELECT CASE WHEN pa.tipo='c' THEN 'Cuota única' WHEN pa.tipo='p'\n THEN 'Por cuotas' END AS tipo, pa.num_cuotas AS numc, pa.porcentaje AS porc,\n pa.meses AS meses, pa.id FROM rdj_metodos_pagos pa WHERE pa.id_proveedor=?\"),\n [$prov[\"idp\"]]);\n \n //Almacenamiento de arreglo de metodos de pagos del proveedor\n $prov[\"pagos\"] = $query;\n\n //Para los metodos de envio, creamos un arreglo ya que pueden ser varios\n $prov[\"envios\"] = [];\n foreach($paises_prod as $pais) { //Para cada pais del productor buscamos si hay metodo de envio\n\n $query = DB::select(\n DB::raw(\"SELECT e.duracion, e.precio, e.id AS id_envio, p.id AS id_pais, p.nombre AS pais,\n CASE WHEN e.tipo='t' THEN 'Terrestre' WHEN e.tipo='a' THEN 'Aéreo'\n WHEN e.tipo='m' THEN 'Marítimo' END AS tipo FROM rdj_paises p,\n rdj_metodos_envios e WHERE e.id_pais=? AND e.id_proveedor=?\n AND e.id_pais=p.id ORDER BY e.id_pais\"),[$pais->id_pais, $prov[\"idp\"]]);\n\n //Agregamos al arreglo si conseguimos un metodo de envio para el pais\n //como pueden haber varios metodos de envio con el mismo pais necesitamos\n //hacer otro foreach\n if($query != []) {\n foreach($query as $met) {\n $metodo = [];\n $metodo[\"detalles\"] = [];\n $metodo[\"id_envio\"] = $met->id_envio;\n $metodo[\"id_pais\"] = $met->id_pais;\n $metodo[\"duracion\"] = $met->duracion;\n $metodo[\"precio\"] = $met->precio;\n $metodo[\"pais\"] = $met->pais;\n $metodo[\"tipo\"] = $met->tipo;\n array_push($prov[\"envios\"],$metodo);\n }\n }\n }\n\n //Para los detalles o modificadores de los metodos de envios conseguidos\n for($i = 0; $i <= sizeof($prov[\"envios\"]) - 1; $i++) {\n //Busqueda de los detalles de un metodo de envio\n $query = DB::select(\n DB::raw(\"SELECT d.id, d.nombre AS det, d.mod_precio AS precio, d.mod_duracion AS duracion\n FROM rdj_detalles_metodos_envios d WHERE d.id_envio=? AND d.id_proveedor=?\n AND d.id_pais=?\"),[$prov[\"envios\"][$i][\"id_envio\"], $id_prov, $prov[\"envios\"][$i][\"id_pais\"]]\n );\n //Agregamos al arreglo si conseguimos un detalle de envio para el metodo\n //como pueden haber varios detalles de envio con el mismo metodo necesitamos\n //hacer otro foreach\n if($query != []) {\n foreach($query as $det) {\n $detalle = [];\n $detalle[\"id\"] = $det->id;\n $detalle[\"det\"] = $det->det;\n $detalle[\"precio\"] = $det->precio;\n $detalle[\"duracion\"] = $det->duracion;\n array_push($prov[\"envios\"][$i][\"detalles\"],$detalle);\n }\n } \n }\n\n /* Buscamos todas las esencias del proveedor y las guardamos */\n $prov[\"esencias\"] = $query = DB::select(\n DB::raw(\"SELECT e.cas_ing_esencia AS cas, e.nombre AS ing, CASE WHEN\n e.naturaleza='n' THEN 'natural' WHEN e.naturaleza='s' THEN 'sintetica' END\n AS tipo FROM rdj_ingredientes_esencias e WHERE e.id_proveedor=? \n ORDER BY e.cas_ing_esencia\"), \n [$id_prov]);\n \n /* Buscamos todos los otros ingredientes del proveedor y los guardamos */\n $prov[\"otros\"] = $query = DB::select(\n DB::raw(\"SELECT o.cas_otro_ing AS cas, o.nombre AS ing\n FROM rdj_otros_ingredientes o WHERE o.id_proveedor=? \n ORDER BY o.cas_otro_ing\"), \n [$id_prov]);\n\n /* Proceso que elimina ingredientes contratados exclusivamente de la lista de ingredientes disponibles */\n $ingsExclusivos = DB::select(DB::raw(\"SELECT dc.cas_ing_esencia AS cas_esen, dc.cas_otro_ing AS cas_otro \n FROM rdj_contratos c, rdj_detalles_contratos dc WHERE c.fecha_apertura=dc.fecha_apertura \n AND c.id_proveedor=dc.id_proveedor AND c.id_proveedor=? AND c.exclusivo=true AND c.cancelacion=false\"),[$id_prov]);\n\n $esenFiltradas = [];\n $otrosFiltrados = [];\n\n foreach($prov[\"esencias\"] as $esen) {\n $cond = false;\n foreach($ingsExclusivos as $ing) {\n if($ing->cas_esen != null && $esen->cas == $ing->cas_esen) \n $cond = true;\n }\n if($cond == false) array_push($esenFiltradas, $esen);\n }\n\n foreach($prov[\"otros\"] as $otro) {\n $cond = false;\n foreach($ingsExclusivos as $ing) {\n if($ing->cas_otro != null && $otro->cas == $ing->cas_otro) \n $cond = true;\n }\n if($cond == false) array_push($otrosFiltrados, $otro);\n }\n\n $prov[\"esencias\"] = $esenFiltradas;\n $prov[\"otros\"] = $otrosFiltrados;\n \n /* Buscamos las presentaciones de cada esencia y las guardamos */\n foreach($prov[\"esencias\"] as $esen) {\n $query = DB::select(\n DB::raw(\"SELECT p.id, p.volumen AS vol, p.precio\n FROM rdj_presents_ings_esencias p WHERE p.cas_ing_esencia=?\n ORDER BY p.id\"),\n [$esen->cas]);\n $esen->cas = Controller::stringifyCas($esen->cas);\n $esen->pres = $query;\n }\n \n /* Buscamos las presentaciones de cada otro ing y las guardamos */\n foreach($prov[\"otros\"] as $otro) {\n $query = DB::select(\n DB::raw(\"SELECT p.id, p.volumen AS vol, p.precio\n FROM rdj_present_otros_ings p WHERE p.cas_otro_ing=?\n ORDER BY p.id\"),\n [$otro->cas]);\n $otro->cas = Controller::stringifyCas($otro->cas);\n $otro->pres = $query;\n }\n\n \n //Devolvemos a la interfaz la data necesaria para continuar\n return response([$prov],200);\n }",
"public function getComentarios($idAnuncio){ \n /*$query = \"SELECT fc.idUser, fc.idComentario, fc.idAnuncio, fc.comentario, fc.idPadre, fc.fecha, fu.nick, fu2.nick nickPadre\n FROM final_comentario fc INNER JOIN final_usuario fu USING(idUser) LEFT JOIN final_usuario fu2 ON(fc.idPadre = fu2.idUser) \n WHERE idAnuncio = '\".$idAnuncio.\"' ORDER BY fecha ASC\"; */\n \n $query = \"SELECT fc.idAnuncio, fc.idComentario, fc.idUser, fu.nick, fc.comentario, fc.idPadre, fc.fecha, aux2.nick nickPadre\n FROM final_comentario fc INNER JOIN final_usuario fu ON(fc.idUser=fu.idUser) LEFT JOIN\n (SELECT aux.idComentario, fu.nick\n FROM (SELECT fc2.idComentario, fc2.idUser FROM final_comentario fc1 INNER JOIN final_comentario fc2 ON (fc1.idPadre=fc2.idComentario)) aux\n INNER JOIN final_usuario fu ON(aux.idUser=fu.idUser)) aux2 ON (fc.idPadre=aux2.idComentario)\n WHERE fc.idAnuncio = '\".$idAnuncio.\"' ORDER BY fc.fecha ASC\";\n \n return $this->con->action($query); \n }",
"public function buscarEstudianteAcuerdo() {\n\n $sql = \"SELECT \n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n INNER JOIN FechaGrado FG ON ( FG.CarreraId = C.codigocarrera )\n INNER JOIN AcuerdoActa A ON ( A.FechaGradoId = FG.FechaGradoId )\n INNER JOIN DetalleAcuerdoActa DAC ON ( DAC.AcuerdoActaId = A.AcuerdoActaId AND E.codigoestudiante = DAC.EstudianteId )\n WHERE\n E.codigoestudiante = ?\n AND D.CodigoEstado = 100\n AND DAC.EstadoAcuerdo = 0\n AND DAC.CodigoEstado = 100\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n\n $fechaGrado->setCarrera($carrera);\n\n $this->setTipoDocumento($tipoDocumento);\n\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }",
"public function ComprasPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT * FROM (compras INNER JOIN proveedores ON compras.codproveedor = proveedores.codproveedor) INNER JOIN usuarios ON compras.codigo = usuarios.codigo LEFT JOIN mediospagos ON compras.formacompra = mediospagos.codmediopago WHERE compras.codcompra = ?\";\t\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codcompra\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function 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 }",
"public function modificar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n $id = $datosCampos[\"id\"];\n switch ($datosCampos[\"acceso\"]) //cambio los dato que vienen de la vista\n {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción \n $arrayCabecera = $guardar->meta($tabla);//armo el array con la cabecera de los datos\n $sentencia = $guardar->armarSentenciaModificar($arrayCabecera, $tabla);//genero sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos);//Armo el array con los datos que vienen de la vista y la cabecera de la BD\n array_shift($array);//elimino primer elemento del array que es el id\n array_push($array, $id);//agrego el id al final del array para realizar la consulta\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array);//genero la consulta a la BD \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit \n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id);\n return $respuesta;\n }",
"function selectByIdac_consumos($consumo_id){\n\t\t\t$this->connection = Connection::getinstance()->getConn();\n\t\t\t$PreparedStatement = \"SELECT consumo_id, socio_id, nro_medidor, fecha_lectura, fecha_emision, periodo_mes, periodo_anio, consumo_total_lectura, consumo_por_pagar, costo_consumo_por_pagar, estado, fecha_hora_pago, usuario_pago, monto_pagado, pagado_por, ci_pagado_por,\n (SELECT CONCAT(nombres,' ',apellidos) FROM asapasc.ac_socios WHERE socio_id = asapasc.ac_consumos.socio_id) AS socio \n FROM asapasc.ac_consumos WHERE consumo_id = \".Connection::inject($consumo_id).\" ;\";\n\t\t\t$ResultSet = mysql_query($PreparedStatement,$this->connection);\n\t\t\tlogs::set_log(__FILE__,__CLASS__,__METHOD__, $PreparedStatement);\n\n\t\t\t$elem = new ac_consumosTO();\n\t\t\twhile($row = mysql_fetch_array($ResultSet)){\n\t\t\t\t$elem = new ac_consumosTO();\n\t\t\t\t$elem->setConsumo_id($row['consumo_id']);\n\t\t\t\t$elem->setSocio_id($row['socio_id']);\n\t\t\t\t$elem->setNro_medidor($row['nro_medidor']);\n\t\t\t\t$elem->setFecha_lectura($row['fecha_lectura']);\n\t\t\t\t$elem->setFecha_emision($row['fecha_emision']);\n\t\t\t\t$elem->setPeriodo_mes($row['periodo_mes']);\n\t\t\t\t$elem->setPeriodo_anio($row['periodo_anio']);\n\t\t\t\t$elem->setConsumo_total_lectura($row['consumo_total_lectura']);\n\t\t\t\t$elem->setConsumo_por_pagar($row['consumo_por_pagar']);\n\t\t\t\t$elem->setCosto_consumo_por_pagar($row['costo_consumo_por_pagar']);\n\t\t\t\t$elem->setEstado($row['estado']);\n\t\t\t\t$elem->setFecha_hora_pago($row['fecha_hora_pago']);\n\t\t\t\t$elem->setUsuario_pago($row['usuario_pago']);\n\t\t\t\t$elem->setMonto_pagado($row['monto_pagado']);\n\t\t\t\t$elem->setPagado_por($row['pagado_por']);\n\t\t\t\t$elem->setCi_pagado_por($row['ci_pagado_por']);\n $elem->setSocio($row['socio']);\n\n\t\t\t}\n\t\t\tmysql_free_result($ResultSet);\n\t\t\treturn $elem;\n\t\t}",
"private function iniciarRecolectarData()\r\n\t\t{\r\n\t\t\tself::findPagoDetalleActividadEconomica();\r\n\t\t\tself::findPagoDetalleInmuebleUrbano();\r\n\t\t\tself::findPagoDetalleVehiculo();\r\n\t\t\tself::findPagoDetalleAseo();\r\n\t\t\tself::findPagoDetallePropaganda();\r\n\t\t\tself::findPagoDetalleEspectaculo();\r\n\t\t\tself::findPagoDetalleApuesta();\r\n\t\t\tself::findPagoDetalleVario();\r\n\t\t\tself::findPagoDetalleMontoNegativo();\r\n\t\t\tself::ajustarDataReporte();\r\n\t\t}",
"public function get_datos_pac_rec_ini($sucursal,$id_usuario){\n\n $conectar= parent::conexion();\n\t \n\t $sql= \"select v.id_ventas,v.sucursal,v.subtotal,v.numero_venta,p.nombres,p.telefono,p.id_paciente,v.tipo_pago,v.vendedor from ventas as v join pacientes as p where p.id_paciente=v.id_paciente and v.sucursal=? and v.id_usuario=? order by id_ventas DESC limit 1;\";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $sucursal);\n $sql->bindValue(2, $id_usuario);\n $sql->execute();\n\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n}",
"public function buscarEstudiante() {\n\n $sql = \"SELECT D.tipodocumento, D.nombrecortodocumento, E.codigocarrera,\n EG.numerodocumento, EG.idestudiantegeneral, EG.nombresestudiantegeneral, \n EG.apellidosestudiantegeneral, EG.expedidodocumento, EG.codigogenero, \n EG.ciudadresidenciaestudiantegeneral, EG.fechanacimientoestudiantegeneral, EG.direccionresidenciaestudiantegeneral, \n EG.telefonoresidenciaestudiantegeneral, EG.emailestudiantegeneral, D.nombredocumento\n\t\tFROM \n estudiantegeneral EG\n\t\tINNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n\t\tINNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n\t\tWHERE\n E.codigoestudiante = ? \";\n /* FIN MODIFICACION */\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n $this->setFechaNacimiento($this->persistencia->getParametro(\"fechanacimientoestudiantegeneral\"));\n $this->setDireccion($this->persistencia->getParametro(\"direccionresidenciaestudiantegeneral\"));\n $this->setTelefono($this->persistencia->getParametro(\"telefonoresidenciaestudiantegeneral\"));\n $this->setEmail($this->persistencia->getParametro(\"emailestudiantegeneral\"));\n\n $carrera = new Carrera(null);\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $this->setCarrera($carrera);\n\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n $tipoDocumento->setNombreDocumento($this->persistencia->getParametro(\"nombredocumento\"));\n\n $genero = new Genero(null);\n $genero->setCodigo($this->persistencia->getParametro(\"codigogenero\"));\n\n $ciudad = new Ciudad(null);\n $ciudad->setId($this->persistencia->getParametro(\"ciudadresidenciaestudiantegeneral\"));\n\n $this->setCiudad($ciudad);\n $this->setGenero($genero);\n $this->setTipoDocumento($tipoDocumento);\n }\n\n $this->persistencia->freeResult();\n }",
"public function show($ecajachica_id)\n\t{\n $datos = Dte_ecajachica::where('ecajachica_id', $ecajachica_id)\n \t\t\t\t->join('serviproductos', 'serviproductos.id', '=', 'dte_ecajachicas.serviproducto_id')\n ->select('dte_ecajachicas.id','serviproductos.catalogo_id','serviproductos.nombre','serviproductos.tipo', 'dte_ecajachicas.cantidad','dte_ecajachicas.precio','dte_ecajachicas.itbms')\n ->get();\n //dd($datos->toArray());\t\t\n\n // encuentra los datos generales del encabezado de egreso de caja chica\n $ecajachica= Ecajachica::find($ecajachica_id);\n $ecajachica['fecha'] = Date::parse($ecajachica->fecha)->toFormattedDateString();\n\t\t//dd($ecajachica->toArray());\n\n //Obtiene todos los productos registrados en la factura de egresos de caja chica\n $datos_1= $datos->where('tipo', 0);\n $datos_1= $datos_1->pluck('nombre', 'id')->all(); \n //dd($datos_2);\n \n //Obtiene todos los servicios registrados en la factura de egresos de caja chica\n $datos_2= $datos->where('tipo', 1);\n $datos_2= $datos_2->pluck('nombre', 'id')->all(); \n \n // encuentra todos los productos asignados a un determinado proveedor\n\t\t$datos_3 = Org::find($ecajachica->org_id)->serviproductos()->where('tipo', 0)->where('activo', 1);\n $datos_3= $datos_3->pluck('nombre', 'serviproductos.id')->all(); \n \n // encuentra todos los servicios asignados a un determinado proveedor\n\t\t$datos_4 = Org::find($ecajachica->org_id)->serviproductos()->where('tipo', 1)->where('activo', 1);\n $datos_4= $datos_4->pluck('nombre', 'serviproductos.id')->all(); \n\n // Subtrae de la lista total de productos de la tabla serviproductos,\n // todos los productos ya registrados en la factura de egresos de caja chica.\n // para evitar asignar productos previamente asignadas\n\t\t$productos = array_diff($datos_3, $datos_1);\t\t\n\t\t//dd($productos); \n \n // Subtrae de la lista total de servicios de la tabla serviproductos,\n // todos los servicios ya registrados en la factura de egresos de caja chica.\n // para evitar asignar servicios previamente asignadas\n $servicios = array_diff($datos_4, $datos_2); \n //dd($servicios); \t\t\n \t\t\n\t\t// calcula y agrega el total\n\t\t$i=0;\t\t\n\t\t$subTotal = 0;\n\t\t$totalItbms = 0;\n\n\t\tforeach ($datos as $dato) {\n\t\t $datos[$i][\"total\"] = number_format((($dato->cantidad * $dato->precio) + $dato->itbms),2);\n\t\t $datos[$i][\"codigo\"] = Catalogo::find($dato->catalogo_id)->codigo;\n\t\t $subTotal = $subTotal + ($dato->cantidad * $dato->precio);\n\t\t $totalItbms = $totalItbms + $dato->itbms;\t\t \n\t\t $i++;\n\t\t} \n\n\t\treturn view('contabilidad.dte_ecajachicas.show')\n\t\t\t\t ->with('productos', $productos)\n\t\t\t\t ->with('servicios', $servicios)\n\t\t\t\t ->with('ecajachica', $ecajachica)\n\t\t\t\t ->with('subTotal', $subTotal)\n\t\t\t\t ->with('totalItbms', $totalItbms)\n\t\t\t\t ->with('datos', $datos);\n\t}",
"public function dataEvaluacionAnual ($id_prod) {\n \n $time = Carbon::now()->toDateTimeString();\n /* Buscamos en la base de datos los contratos del productor \n que no esten cancelados para luego ir filtrando aun mas */\n $contratos = DB::select(DB::raw(\"SELECT c.fecha_apertura AS fecha, c.id_proveedor AS idp,\n p.nombre AS prov, CASE WHEN c.exclusivo='t' THEN 'exclusivo'\n WHEN c.exclusivo='f' THEN 'no exclusivo' END AS ex FROM rdj_contratos c,\n rdj_proveedores p WHERE c.id_productor=? AND c.id_proveedor=p.id\n AND COALESCE(c.cancelacion,'f') != 't' ORDER BY c.fecha_apertura ASC\"),[$id_prod]);\n\n /* Realizamos una separacion del arreglo que nos devuelve postgres, aquellos contratos en los cuales\n la fecha de apertura no sea mayor a 1 año se colocan en contratos activos, sino se colocan en contratos\n con posible renovacion */\n\n $contActivos = [];\n $contPosibles = [];\n\n foreach($contratos as $cont) {\n \n $fecha = Carbon::createFromDate($cont->fecha);\n\n if ($fecha->diffInDays($time) > 365) {\n array_push($contPosibles,$cont);\n }\n\n else {\n $cont->renov = 0;\n $cont->fechaR = '';\n $cont->exp = 365 - $fecha->diffInDays($time);\n array_push($contActivos,$cont);\n }\n\n }\n\n\n $contActivosSinR = [];\n /* Si existiera algun contrato que fue renovado pero su fecha de apertura no se ha vencido, sera\n filtrado por este foreach */\n foreach($contActivos as $cont) {\n $query = DB::select(DB::raw(\"SELECT COUNT(*) FROM rdj_renovaciones WHERE id_proveedor=?\n AND id_productor=? AND fecha_apertura=? GROUP BY id_proveedor,id_productor,fecha_apertura\"),\n [$cont->idp,$id_prod,$cont->fecha]);\n\n if(sizeof($query) == 0) array_push($contActivosSinR,$cont);\n }\n\n $contActivos = $contActivosSinR;\n\n /* Para los posibles, buscamos su renovacion mas reciente, si no tiene renovacion skippeamos, si tiene\n buscamos la cantidad de veces que se ha renovado con count y luego revisamos si la renovacion mas reciente\n no ha expirado tambien, si no ha expirado la agregamos a contratos activos, sino skippeamos */\n\n foreach($contPosibles as $cont) {\n\n $renovs = DB::select(DB::raw(\"SELECT MAX(r.fecha_renovacion) AS fecha FROM rdj_renovaciones r\n WHERE r.id_proveedor=? AND r.id_productor=? AND r.fecha_apertura=? GROUP BY r.id_proveedor,\n r.id_productor, r.fecha_apertura\"),[$cont->idp,$id_prod,$cont->fecha]);\n\n if(sizeOf($renovs) == 0) continue;\n\n $count = DB::select(DB::raw(\"SELECT COUNT(*) FROM rdj_renovaciones r WHERE r.id_proveedor=?\n AND r.id_productor=? AND r.fecha_apertura=? GROUP BY r.id_proveedor, r.id_productor, \n r.fecha_apertura\"),[$cont->idp,$id_prod,$cont->fecha])[0]->count;\n\n $fecha = Carbon::createFromDate($renovs[0]->fecha);\n\n if ($fecha->diffInDays($time) <= 365) {\n $cont->fechaR = $renovs[0]->fecha;\n $cont->renov = $count;\n $cont->exp = 365 - $fecha->diffInDays($time);\n array_push($contActivos,$cont);\n }\n }\n\n /* Timestamp --> date y se eliminan aquellos contratos que no estan apunto de expirar (mas de 1 mes)*/\n\n $data = [];\n foreach($contActivos as $cont) {\n $cont->fecha_ap_ts = $cont->fecha;\n $cont->fecha = date(\"d/m/Y\", strtotime($cont->fecha));\n $cont->fechaR = date(\"d/m/Y\", strtotime($cont->fechaR));\n\n if ($cont->exp <= 31) array_push($data, $cont); \n\n }\n\n return response([$data],200);\n }",
"public function dataProveedoresAnual ($id_prod, $id_prov, $fecha_ap_ts) {\n\n $prov = []; //Variable donde se almacenan los datos a responder de la solicitud HTTP\n\n //Busqueda de información basica del proveedor\n $query = DB::select(\n DB::raw(\"SELECT pr.id AS idp, pr.nombre AS prov FROM \n rdj_proveedores pr WHERE pr.id=?\"),\n [$id_prov]);\n\n //Almacenamiento de la info basica en aux\n $prov[\"idp\"] = $query[0]->idp;\n $prov[\"prov\"] = $query[0]->prov;\n \n\n $prov[\"fecha_ap_ts\"] = $fecha_ap_ts;\n\n $prov[\"pedidosCump\"] = DB::select(DB::raw(\"SELECT COUNT(*) FROM rdj_pedidos WHERE\n id_prod_envio=? AND id_prov_envio=? AND fecha_ap_envio=? AND estatus='e'\n GROUP BY estatus,fecha_ap_envio,id_prov_envio,id_prod_envio\"),[$id_prod,$id_prov,$fecha_ap_ts]);\n\n if(sizeof($prov[\"pedidosCump\"]) == 0) {\n $prov[\"pedidosCump\"] = 0;\n }\n else {\n $prov[\"pedidosCump\"] = $prov[\"pedidosCump\"][0]->count;\n }\n \n $prov[\"pedidosRec\"] = DB::select(DB::raw(\"SELECT COUNT(*) FROM rdj_pedidos WHERE\n id_prod_envio=? AND id_prov_envio=? AND fecha_ap_envio=? AND estatus='cprov'\n GROUP BY estatus,fecha_ap_envio,id_prov_envio,id_prod_envio\"),[$id_prod,$id_prov,$fecha_ap_ts]);\n\n if(sizeof($prov[\"pedidosRec\"]) == 0) {\n $prov[\"pedidosRec\"] = 0;\n }\n else {\n $prov[\"pedidosRec\"] = $prov[\"pedidosRec\"][0]->count;\n }\n\n $prov[\"pedidosPend\"] = DB::select(DB::raw(\"SELECT COUNT(*) FROM rdj_pedidos WHERE\n id_prod_envio=? AND id_prov_envio=? AND fecha_ap_envio=? AND estatus='p'\n GROUP BY estatus,fecha_ap_envio,id_prov_envio,id_prod_envio\"),[$id_prod,$id_prov,$fecha_ap_ts]);\n\n if(sizeof($prov[\"pedidosPend\"]) == 0) {\n $prov[\"pedidosPend\"] = 0;\n }\n else {\n $prov[\"pedidosPend\"] = $prov[\"pedidosPend\"][0]->count;\n }\n \n //Devolvemos a la interfaz la data necesaria para continuar\n return response([$prov],200);\n }",
"function ConsultarId($id){\n $conn = Conexao::getconexao();\n $docente = new Docente();\n $lista;\n $i=0;\n \n try {\n \n \n \n $sql = \"SELECT * from users u, docentes d where u.id = d.users_id and u.id = :id\";\n \n $conn->query('SET NAMES utf8');\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(':id', $id , PDO::PARAM_INT);\n \n if($stmt->execute()){\n \n $linha = $stmt->fetch(PDO::FETCH_ASSOC);\n //var_dump($linha);\n $docente->setId($linha['id']); \n $docente->setEmail($linha['email']);\n $docente->setNome($linha['nome']);\n $docente->setSenha($linha['senha']);\n $docente->setNivel($linha['nivel']);\n $docente->setCurso($linha['cursos_id']);\n $docente->setEspecialidade($linha['especialidade']);\n $docente->setImg($linha['img']);\n \n\n $sql = \"select * from formacoes where users_id = :id\";\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(':id', $id , PDO::PARAM_INT);\n $stmt->execute();\n\n $lista = array();\n foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $linha){\n $formacao = new Formacao();\n $formacao->setId($linha['id']);\n $formacao->setNome($linha['nome']);\n $formacao->setInstituicao($linha['instituicao']);\n $formacao->setTipo($linha['tipo']);\n $formacao->setAno($linha['ano']);\n $lista[$i++] = $formacao; \n } \n\n $docente->setFormacao($lista);\n\n $sql = \"select * from pesquisa where users_id = :id\";\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(':id', $id, PDO::PARAM_INT);\n $stmt->execute();\n\n $lista = array();\n $i = 1;\n foreach ($stmt->fetchAll(PDO::FETCH_ASSOC) as $linha){\n $pesquisa = new Pesquisa();\n $pesquisa->setId($linha['idpesquisa']);\n $pesquisa->setNome($linha['nome']);\n\n $lista[$i++] = $pesquisa; \n }\n\n\n $docente->setPesquisa($lista);\n\n return $docente;\n } else {\n \n return false;\n }\n \n } catch( Exception $e ){\n echo $e->getMessage(); \n return false;\n }\n }",
"public function select($datos_){\n $id=$datos_->getId();\n\n try {\n $sql= \"SELECT `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`\"\n .\"FROM `datos_`\"\n .\"WHERE `id`='$id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $datos_->setId($data[$i]['id']);\n $datos_->setNombre_proyecto($data[$i]['nombre_proyecto']);\n $datos_->setNombre_actividad($data[$i]['nombre_actividad']);\n $datos_->setModalidad_participacion($data[$i]['modalidad_participacion']);\n $datos_->setResponsable($data[$i]['responsable']);\n $datos_->setFecha_realizacion($data[$i]['fecha_realizacion']);\n $datos_->setProducto($data[$i]['producto']);\n $semillero = new Semillero();\n $semillero->setId($data[$i]['semillero_id']);\n $datos_->setSemillero_id($semillero);\n\n }\n return $datos_; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }",
"function get_entradas_sucursal_list($id) {\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, prf.monto_total as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatuse,e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and usuario_validador_id>0\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id, e.lote_id , cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc\";\n\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}",
"function listar_valores($tipo, $id){\n $contratista = \"\";\n $contratante = \"\";\n \n // Si viene algun dato y es contratista\n if ($tipo == \"contratista\" && $id != \"\") {\n $contratista = \"AND c.Fk_Id_Terceros = {$id}\";\n }\n \n // Si viene algun dato y es contratista\n if ($tipo == \"contratante\" && $id != \"\") {\n $contratista = \"AND c.Fk_Id_Terceros_Contratante = {$id}\";\n }\n\n $sql =\n \"SELECT\n c.Pk_Id_Contrato,\n c.Numero,\n c.Objeto,\n tc.Nombre AS Contratante,\n tbl_terceros.Nombre AS Contratista,\n c.Fecha_Inicial,\n c.Fecha_Vencimiento,\n c.Plazo AS Plazo_Inicial,\n c.Valor_Inicial,\n (\n SELECT\n ifnull(SUM(contratos_pagos.Valor_Pago), 0)\n FROM\n contratos\n LEFT JOIN contratos_pagos ON contratos_pagos.Fk_Id_Contratos = contratos.Pk_Id_Contrato\n WHERE\n contratos.Pk_Id_Contrato = c.Pk_Id_Contrato\n GROUP BY\n contratos.Pk_Id_Contrato\n ) AS Pagado,\n (\n SELECT\n IFNULL(SUM(adiciones.Plazo), 0)\n FROM\n contratos_adiciones AS adiciones\n WHERE\n adiciones.Fk_Id_Contrato = c.Pk_Id_Contrato\n ) AS Plazo_Adiciones,\n (\n SELECT\n IFNULL(\n SUM(contratos_adiciones.Valor),\n 0\n )\n FROM\n contratos_adiciones\n WHERE\n contratos_adiciones.Fk_Id_Contrato = c.Pk_Id_Contrato\n ) AS Valor_Adiciones,\n tbl_estados.Estado,\n tcc.Nombre AS CentroCosto\n FROM\n contratos AS c\n LEFT JOIN tbl_terceros ON c.Fk_Id_Terceros = tbl_terceros.Pk_Id_Terceros\n LEFT JOIN tbl_estados ON c.Fk_Id_Estado = tbl_estados.Pk_Id_Estado\n LEFT JOIN tbl_terceros AS tc ON c.Fk_Id_Terceros_Contratante = tc.Pk_Id_Terceros\n INNER JOIN tbl_terceros AS tcc ON tcc.Pk_Id_Terceros = c.Fk_Id_Terceros_CentrodeCostos\n WHERE c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')}\n {$contratista}\n ORDER BY\n c.Fk_Id_Estado ASC,\n c.Fecha_Inicial DESC\";\n\n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }",
"public function getComandas($id){\n $sql = \"\n SELECT cn.estado, fe.id, fe.factura, fe.nota, fe.fecha FROM comanda_notificacion_detalle AS cn\n INNER JOIN factura_espera AS fe ON cn.id_factura_espera = fe.id\n WHERE cn.id_usuario = '$id'\n AND fe.activo = '1'\n \";\n \n $comandas = $this->connection->query($sql)->result_array();\n \n // Añadimos los detalles de la comanda\n \n foreach( $comandas as $key => $row ){\n \n $idEspera = $row[\"id\"];\n \n $sqlSub = \"\n SELECT \n df.codigo_producto AS codigo,\n df.nombre_producto AS nombre,\n df.unidades,\n #df.precio_venta AS precio,\n #descuento,\n #ROUND(( df.precio_venta - df.descuento )*(1 + df.impuesto/100)) AS total,\n p.descripcion\n FROM detalle_factura_espera AS df\n LEFT JOIN producto AS p ON df.id_producto = p.id\n WHERE df.venta_id = $idEspera\n \";\n\n $resultSub = $this->connection->query($sqlSub)->result_array(); \n $comandas[$key][\"detalle\"] = $resultSub;\n \n \n }\n \n \n return $comandas;\n \n }",
"public function listarPorId(){\n $query = \"select * from usuario where idusuario=?\";\n\n //preparando a consulta para a execução\n $stmt=$this->conn->prepare($query);\n\n //vamos fazer um blind(ligação) do id pesquisado\n //com o paramêtro da consulta, neste caso é o \n //ponto de interrogação\n $stmt ->bindParam(1,$this->idusuario);\n\n //executar efetivamente a consulta \n $stmt ->execute();\n\n //Organizar os dados retornados da consulta para \n // a exibição em formato de json\n // Vamos usar uma variavel e um array para associar \n // os campos da tabela\n $linha = $stmt->fetch(PDO::FETCH_ASSOC);\n\n //organizar no objeto usuario(aqrquivo usuario.php)\n //os dados retornados\n //da tabela usuario que está no banco de dados\n \n $this->email = $linha['email'];\n $this->senha = $linha['senha'];\n $this->nome = $linha['nome'];\n $this->cpf = $linha['cpf'];\n $this->telefone = $linha['telefone'];\n $this->foto = $linha['foto'];\n\n }",
"public function producto_tralado_por_id($id_producto,$id_ingreso){\n $conectar= parent::conexion();\n $sql=\"select p.modelo,p.marca,p.medidas,p.color,e.id_producto,e.id_ingreso,e.categoriaub,e.stock from producto as p inner join existencias as e on p.id_producto=e.id_producto and e.id_producto=? and id_ingreso=?\";\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $id_producto);\n $sql->bindValue(2, $id_ingreso);\n $sql->execute();\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"public function indexListaSobrantes($id){\n // viene id de ingreso_b3\n\n $dataArray = array();\n\n $listado = IngresosDetalleB3::where('id_ingresos_b3', $id)->orderBy('nombre')->get();\n\n foreach ($listado as $l){\n\n // obtener cantidad verificada\n $listave = VerificadoIngresoDetalleB3::where('id_ingresos_detalle_b3', $l->id)->get();\n $totalve = collect($listave)->sum('cantidad');\n $l->cantiverificada = $totalve;\n\n // obtener cantidad retirada\n $listare = RetiroBodegaDetalleB3::where('id_ingresos_detalle_b3', $l->id)->get();\n $totalre = collect($listare)->sum('cantidad');\n $l->cantiretirada = $totalre;\n\n $resta = $totalve - $totalre;\n // $l->sobrante = $resta;\n\n if($rem = RegistroExtraMaterialDetalleB3::where('id_ingresos_detalle_b3', $l->id)->first()){\n // si lo encuentra es un material extra agregado\n // obtener fecha cuando se agrego\n\n $infodeta = RegistroExtraMaterialB3::where('id', $rem->id_reg_ex_mate_b3)->first();\n\n // meter la fecha\n $fecha = date(\"d-m-Y\", strtotime($infodeta->fecha));\n\n $dataArray[] = [\n 'fecha' => $fecha,\n 'nombre' => $l->nombre,\n 'preciounitario' => $l->preciounitario,\n 'cantidad' => $l->cantidad,\n 'cantiverificada' => $totalve,\n 'cantiretirada' => $totalre,\n 'sobrante' => $resta\n ];\n\n }else{\n // es un material agregado al crear el proyecto\n $daa = IngresosB3::where('id', $l->id_ingresos_b3)->first();\n\n $fecha = date(\"d-m-Y\", strtotime($daa->fecha));\n\n $dataArray[] = [\n 'fecha' => $fecha,\n 'nombre' => $l->nombre,\n 'preciounitario' => $l->preciounitario,\n 'cantidad' => $l->cantidad,\n 'cantiverificada' => $totalve,\n 'cantiretirada' => $totalre,\n 'sobrante' => $resta\n ];\n }\n }\n\n // metodos para ordenar el array\n usort($dataArray, array( $this, 'sortDate' ));\n\n return view('backend.bodega3.verificacion.sobrante.index', compact('dataArray'));\n }",
"function carga_datos($idproveedor)\n\t{\n\n\t\t// carga los datos generales\n\t\t$sql=\"\n\t\tSELECT\n\t\t\tcp.IDPROVEEDOR, cp.NOMBREFISCAL, cp.NOMBRECOMERCIAL, \n\t\t\tcp.IDTIPODOCUMENTO, cp.IDDOCUMENTO, cp.EMAIL1, cp.EMAIL2, cp.EMAIL3,\n\t\t\tcp.BRSCH, cp.FDGRV, cp.ZTERM, cp.MWSKZ, cp.PARVO, cp.PAVIP,\n\t\t\tcp.ACTIVO,cp.INTERNO,\n\t\t\tcp.ARREVALRANKING,\n\t\t\tcp.CDE,\n\t\t\tcp.SKILL,\n\t\t\tcp.EVALFIDELIDAD,\n\t\t\tcp.EVALINFRAESTRUCTURA,\n\t\t\tcp.EVALSATISFACCION,\n\t\t\tcp.IDMONEDA,\n\t\t\tcp.OBSERVACIONES,\n\t\t\tYEAR(cp.FECHAINICIOACTIVIDADES) ANIO,\n\t\t\tMONTH(cp.FECHAINICIOACTIVIDADES) MES, \n\t\t\tDAY(cp.FECHAINICIOACTIVIDADES) DIA\n\t\tFROM\n\t\t$this->catalogo.catalogo_proveedor cp\n\t\tWHERE\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\n\t\t$result=$this->query($sql);\n\t\twhile ($reg = $result->fetch_object()) {\n\t\t\t$this->idproveedor= $reg->IDPROVEEDOR;\n\t\t\t$this->nombrefiscal= $reg->NOMBREFISCAL;\n\t\t\t$this->nombrecomercial = $reg->NOMBRECOMERCIAL;\n\t\t\t$this->idtipodocumento = $reg->IDTIPODOCUMENTO;\n\t\t\t$this->iddocumento = $reg->IDDOCUMENTO;\n\t\t\t$this->idubigeo = $reg->IDUBIGEO;\n\t\t\t$this->activo = $reg->ACTIVO;\n\t\t\t$this->interno = $reg->INTERNO;\n\t\t\t$this->arrevalranking = $reg->ARREVALRANKING;\n\t\t\t$this->cde = $reg->CDE;\n\t\t\t$this->skill = $reg->SKILL;\n\t\t\t$this->evalfidelidad = $reg->EVALFIDELIDAD;\n\t\t\t$this->evalinfraestructura = $reg->EVALINFRAESTRUCTURA;\n\t\t\t$this->evalsatisfaccion = $reg->EVALSATISFACCION;\n\t\t\t$this->moneda = new moneda();\n\t\t\t$this->moneda->carga_datos($reg->IDMONEDA);\n\t\t\t$this->observaciones = $reg->OBSERVACIONES;\n\n\t\t\t$this->email1 = $reg->EMAIL1;\n\t\t\t$this->email2 = $reg->EMAIL2;\n\t\t\t$this->email3 = $reg->EMAIL3;\n\t\t\t$this->brsch = $reg->BRSCH;\n\t\t\t$this->fdgrv = $reg->FDGRV;\n\t\t\t$this->zterm = $reg->ZTERM;\n\t\t\t$this->mwskz = $reg->MWSKZ;\n\t\t\t$this->parvo = $reg->PARVO;\n\t\t\t$this->pavip = $reg->PAVIP;\n\t\t\t$this->anio = $reg->ANIO;\n\t\t\t$this->mes = $reg->MES;\n\t\t\t$this->dia = $reg->DIA;\n\n\t\t}\n\n\t\t// carga los datos de ubigeo\n\t\t$sql=\"\n\t\tselect \n\t\t\t* \n\t\tfrom\n\t\t$this->catalogo.catalogo_proveedor_ubigeo\n\t\twhere\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg=$resul->fetch_object()) {\n\t\t\t$this->cvepais = $reg->CVEPAIS;\n\t\t\t$this->cveentidad1 = $reg->CVEENTIDAD1;\n\t\t\t$this->cveentidad2 = $reg->CVEENTIDAD2;\n\t\t\t$this->cveentidad3 = $reg->CVEENTIDAD3;\n\t\t\t$this->cveentidad4 = $reg->CVEENTIDAD4;\n\t\t\t$this->cveentidad5 = $reg->CVEENTIDAD5;\n\t\t\t$this->cveentidad6 = $reg->CVEENTIDAD6;\n\t\t\t$this->cveentidad7 = $reg->CVEENTIDAD7;\n\t\t\t$this->cvetipovia = $reg->CVETIPOVIA;\n\t\t\t$this->descripcion = $reg->DESCRIPCION;\n\t\t\t$this->direccion = $reg->DIRECCION;\n\t\t\t$this->codpostal = $reg->CODPOSTAL;\n\t\t\t$this->numero = $reg->NUMERO;\n\t\t\t$this->latitud = $reg->LATITUD;\n\t\t\t$this->longitud = $reg->LONGITUD;\n\t\t\t$this->referencia1 = $reg->REFERENCIA1;\n\t\t\t$this->referencia2 = $reg->REFERENCIA2;\n\t\t}\n\n\t\t// \t CARGA DE LOS TELEFONOS DEL PROVEEDOR //\n\t\t$sql=\"\nSELECT \n\tcpt.IDPROVEEDOR, \n\tcpt.CODIGOAREA,\n\tcpt.IDTIPOTELEFONO,\n\tcpt.NUMEROTELEFONO,\n\tcpt.EXTENSION,\n\tcpt.IDTSP,\n\tcpt.COMENTARIO,\n\tcpt.PRIORIDAD,\n\tcd.DESCRIPCION NOMBRECODIGOAREA,\n\tctsp.DESCRIPCION NOMBRETSP,\n\tctt.DESCRIPCION NOMBRETIPOTELEFONO\nFROM\n\tcatalogo_proveedor_telefono cpt\n\tLEFT JOIN catalogo_ddn cd ON cd.DDN = cpt.CODIGOAREA\n\tLEFT JOIN catalogo_tsp ctsp ON ctsp.IDTSP = cpt.IDTSP\n\tLEFT JOIN catalogo_tipotelefono\tctt ON ctt.IDTIPOTELEFONO = cpt.IDTIPOTELEFONO\nWHERE\n\tcpt.IDPROVEEDOR ='$idproveedor'\n\tORDER BY cpt.PRIORIDAD;\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\tunset($this->telefonos);\n\t\twhile ($reg = $resul->fetch_object())\n\t\t{\n\t\t\tif ($reg->NUMEROTELEFONO!='')\n\t\t\t{\n\t\t\t\t$this->telefonos[$reg->PRIORIDAD-1]= array(\n\t\t\t\t'IDTIPOTELEFONO'=>$reg->IDTIPOTELEFONO,\n\t\t\t\t'CODIGOAREA' => $reg->CODIGOAREA,\n\t\t\t\t'NUMEROTELEFONO' => strip_tags($reg->NUMEROTELEFONO),\n\t\t\t\t'EXTENSION' => $reg->EXTENSION,\n\t\t\t\t'IDTSP' => $reg->IDTSP,\n\t\t\t\t'TELF_COMENTARIO'=>$reg->COMENTARIO,\n\t\t\t\t'NOMBRECODIGOAREA'=>$reg->NOMBRECODIGOAREA,\n\t\t\t\t'NOMBRETSP'=>$reg->NOMBRETSP,\n\t\t\t\t'NOMBRETIPOTELEFONO'=>$reg->NOMBRETIPOTELEFONO\n\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// CARGA DE LOS SERVICIOS DEL PROVEEDOR //\n\t\t$sql=\"\n\t\tSELECT \n\t\t\tIDSERVICIO\n\t\tFROM\n\t\t\tcatalogo_proveedor_servicio\n\t\tWHERE\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg = $resul->fetch_object()) {\n\t\t\t$this->servicios[]=$reg->IDSERVICIO;\n\n\t\t}\n\n\t\t// CARGA DE SOCIEDADES DEL PROVEEDOR\n\t\t$sql=\"\n\t\tSELECT \n\t\t\tIDSOCIEDAD\n\t\tFROM\n\t\t\tcatalogo_proveedor_sociedad\n\t\tWHERE\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg = $resul->fetch_object()) {\n\t\t\t$this->sociedades[$reg->IDSOCIEDAD]=$reg->IDSOCIEDAD;\n\n\t\t}\n\n\t\t// CARGA DE CONTACTOS //\n\t\t$sql=\"\n\t\tSELECT * \n\t\t\tFROM $this->catalogo.catalogo_proveedor_contacto\n\t\tWHERE\t\n\t\t\tIDPROVEEDOR ='$idproveedor'\n\t\t\tORDER BY RESPONSABLE DESC\n\t\t\";\n\t\t$resul=$this->query($sql);\n\t\twhile ($reg = $resul->fetch_object()) {\n\t\t\t$this->contactos[$reg->IDCONTACTO]=$reg->APPATERNO.' '.$reg->APMATERNO.' '.$reg->NOMBRE;\n\t\t}\n\t\treturn;\n\t}",
"public function VentasPorId()\n{\n\tself::SetNames();\n\t$sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.direccliente, clientes.emailcliente, ventas.idventa, ventas.codventa, ventas.codcaja, ventas.codcliente as cliente, ventas.subtotalivasive, ventas.subtotalivanove, ventas.ivave, ventas.totalivave, ventas.descuentove, ventas.totaldescuentove, ventas.totalpago, ventas.totalpago2, ventas.tipopagove, ventas.formapagove, ventas.montopagado, ventas.montodevuelto, ventas.fechaventa, ventas.fechavencecredito, ventas.statusventa, ventas.delivery, ventas.repartidor, ventas.observaciones, mediospagos.mediopago, salas.nombresala, mesas.codmesa, mesas.nombremesa, usuarios.nombres, cajas.nrocaja, abonoscreditos.codventa as cod, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (ventas LEFT JOIN clientes ON clientes.codcliente = ventas.codcliente) LEFT JOIN mesas ON ventas.codmesa = mesas.codmesa LEFT JOIN salas ON mesas.codsala = salas.codsala LEFT JOIN mediospagos ON ventas.formapagove = mediospagos.codmediopago LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja LEFT JOIN usuarios ON ventas.codigo = usuarios.codigo WHERE ventas.codventa =? GROUP BY cod\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codventa\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function buscarEstudianteActa() {\n\n $sql = \"SELECT\n D.tipodocumento, D.nombrecortodocumento, EG.numerodocumento, EG.idestudiantegeneral,\n EG.nombresestudiantegeneral, EG.apellidosestudiantegeneral, EG.expedidodocumento, C.codigocarrera\n FROM \n estudiantegeneral EG\n INNER JOIN estudiante E ON ( E.idestudiantegeneral = EG.idestudiantegeneral )\n INNER JOIN documento D ON ( D.tipodocumento = EG.tipodocumento )\n INNER JOIN carrera C ON ( C.codigocarrera = E.codigocarrera )\n WHERE \n E.codigoestudiante = ?\n AND E.codigoestudiante NOT IN ( \n SELECT \n DC.EstudianteId\n FROM \n DetalleAcuerdoActa DC\n WHERE \n CodigoEstado = 100)\";\n\n $this->persistencia->crearSentenciaSQL($sql);\n $this->persistencia->setParametro(0, $this->getCodigoEstudiante(), false);\n\n $this->persistencia->ejecutarConsulta();\n if ($this->persistencia->getNext()) {\n $this->setIdEstudiante($this->persistencia->getParametro(\"idestudiantegeneral\"));\n $this->setNumeroDocumento($this->persistencia->getParametro(\"numerodocumento\"));\n $this->setNombreEstudiante($this->persistencia->getParametro(\"nombresestudiantegeneral\"));\n $this->setApellidoEstudiante($this->persistencia->getParametro(\"apellidosestudiantegeneral\"));\n $this->setExpedicion($this->persistencia->getParametro(\"expedidodocumento\"));\n\n $tipoDocumento = new TipoDocumento(null);\n $tipoDocumento->setIniciales($this->persistencia->getParametro(\"tipodocumento\"));\n $tipoDocumento->setDescripcion($this->persistencia->getParametro(\"nombrecortodocumento\"));\n\n $fechaGrado = new FechaGrado(null);\n $carrera = new Carrera(null);\n\n $carrera->setCodigoCarrera($this->persistencia->getParametro(\"codigocarrera\"));\n $fechaGrado->setCarrera($carrera);\n $this->setTipoDocumento($tipoDocumento);\n $this->setFechaGrado($fechaGrado);\n }\n\n $this->persistencia->freeResult();\n }",
"public function buscarCargaLaboral()\n {\n $em = $this->getDoctrine()->getEntityManager();\n $user = $em->getRepository('MinsalsifdaBundle:FosUserUser')->find($this->getUser()->getId());\n $temp_tdest = $user->getIdDependenciaEstablecimiento()->getId();\n $temp_fi = $this->get('request')->request->get('fechaInicio');\n $temp_ff = $this->get('request')->request->get('fechaFin');\n $rsm = new ResultSetMapping();\n $rsm->addScalarResult('id','id');\n $rsm->addScalarResult('tecnico','tecnico');\n $rsm->addScalarResult('atendidas','atendidas');\n $rsm->addScalarResult('pendientes','pendientes');\n $rsm->addScalarResult('finalizadas','finalizadas');\n $sql = \"select distinct(e.id),e.nombre|| ' ' ||e.apellido as tecnico,count(distinct id_orden) as atendidas,\n(select count(distinct v.id_orden) from vwetapassolicitud v where v.id_estado = 2 and v.id_empleado = vw.id_empleado) as pendientes,\n(select count(distinct v.id_orden) from vwetapassolicitud v where v.id_estado = 4 and v.id_empleado = vw.id_empleado) as finalizadas\nfrom ctl_empleado e left outer join\nvwetapassolicitud vw on e.id = vw.id_empleado where 1=1\";\nif($temp_fi!=\"\" && $temp_ff!=\"\"){\n$sql.=\" and fchcrea_orden >= '$temp_fi' and fchcrea_orden <= '$temp_ff'\";\n }\n$sql.=\" and e.id_dependencia_establecimiento = $temp_tdest\ngroup by e.id,e.nombre|| ' ' ||e.apellido,(select count(distinct v.id_orden) from \nvwetapassolicitud v where v.id_estado = 2 and v.id_empleado = vw.id_empleado),\n(select count(distinct v.id_orden) from vwetapassolicitud v where v.id_estado = \n4 and v.id_empleado = vw.id_empleado) order by (select count(distinct v.id_orden) from vwetapassolicitud v where v.id_estado = 2 and v.id_empleado = vw.id_empleado) desc\";\n// $sql = \"select id, nombre || ' ' ||apellido as tecnico, id_cargo as atendidas,id_cargo+3 as asignadas,id+2 as terminadas from ctl_empleado where 1 = 0\";\n \n $query = $em->createNativeQuery($sql, $rsm);\n $resultado = $query->getResult();\n $response = new JsonResponse();\n $response->setData(array(\n 'query' => $resultado\n ));\n return $response;\n }",
"function ColsultarTodosLosID(){///funciona\n try {\n $FKAREA=$this->objRequerimiento->getFKAREA();\n $objControlConexion = new ControlConexion();\n $objControlConexion->abrirBd();\n //$comandoSql = \"select * from Requerimiento where FKAREA = '\".$FKAREA.\"' \";\n $comandoSql = \"SELECT IDREQ ,TITULO,FKEMPLE,FKAREA,FKESTADO,OBSERVACION,FKEMPLEASIGNADO FROM Requerimiento INNER JOIN detallereq ON Requerimiento.IDREQ=detallereq.FKREQ where FKAREA = '\".$FKAREA.\"'\";\n $rs = $objControlConexion->ejecutarSelect($comandoSql);\n return $rs;\n $objControlConexion->cerrarBd();\n } catch(Exception $e) {\n echo \"Error: \" . $e->getMessage();\n }\n}",
"function usuarios_estados_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_estados\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Estado\",2);\n$this->agregarVariable2($v);\n\n\t}",
"public function getRowById2($data = null){\n\t\tparent::getRowById();\n\t\tif($this->result->getStatus() == STATUS_OK) {\n\t\t\t// EMPLEADOS\n\t\t\t$this->idViajeEmpleado['referencia'] = new ViajeEmpleadoVO();\n\t\t\t$data[] = null;\n\t\t\t$data['nombreCampoWhere'] = 'idViaje';\n\t\t\t$data['valorCampoWhere'] = $this->idViaje['valor'];\n\t\t\t$this->idViajeEmpleado['referencia']->getAllRows($data);\n\t\t\t//$result = $viajeEmpleado->result;\n\t\t\tif($this->idViajeEmpleado['referencia']->result->getStatus() == STATUS_OK) {\n\t\t\t\t//$this->viajeEmpleadoArray = $this->idViajeEmpleado['referencia']->result->getData();\n\t\t\t}\n\t\t\t//print_r($this->viajeEmpleadoArray);die();\n\t\t\t$this->idViajeEmpleadoDetalle['referencia'] = new ViajeEmpleadoDetalleVO();\n\t\t\t$data[] = null;\n\t\t\t$data['nombreCampoWhere'] = 'idViaje';\n\t\t\t$data['valorCampoWhere'] = $this->idViaje['valor'];\n\t\t\t$this->idViajeEmpleadoDetalle['referencia']->getRowById($data);\n\t\t\t//$this->idViajeEmpleadoDetalle['referencia'] = $viajeEmpleadoDetalle;\n\t\t\t$this->idViajeEmpleadoDetalle['referencia']->result->setStatus(STATUS_OK); // debo hacer esto porque sino pincha el insert luego...\n\t\t\t$this->idViajeEmpleadoDetalle['referencia']->result->setMessage(''); // debo hacer esto porque sino pincha el insert luego...\n\n\t\t\t// VEHICULOS\n\t\t\t$this->idViajeVehiculo['referencia'] = new ViajeVehiculoVO();\n\t\t\t$data[] = null;\n\t\t\t$data['nombreCampoWhere'] = 'idViaje';\n\t\t\t$data['valorCampoWhere'] = $this->idViaje['valor'];\n\t\t\t$this->idViajeVehiculo['referencia']->getAllRows($data);\n\t\t\t//$result = $viajeVehiculo->result;\n\t\t\tif($this->idViajeVehiculo['referencia']->result->getStatus() == STATUS_OK) {\n\t\t\t\t//$this->viajeVehiculoArray = $viajeVehiculo->result->getData();\n\t\t\t}\n\t\t\t//print_r($this->viajeVehiculoArray);die();\n\t\t\t$this->idViajeVehiculoDetalle['referencia'] = new ViajeVehiculoDetalleVO();\n\t\t\t$data[] = null;\n\t\t\t$data['nombreCampoWhere'] = 'idViaje';\n\t\t\t$data['valorCampoWhere'] = $this->idViaje['valor'];\n\t\t\t$this->idViajeVehiculoDetalle['referencia']->getRowById($data);\n\t\t\t//$this->idViajeVehiculoDetalle['referencia'] = $viajeVehiculoDetalle;\n\t\t\t$this->idViajeVehiculoDetalle['referencia']->result->setStatus(STATUS_OK); // debo hacer esto porque sino pincha el insert luego...\n\t\t\t$this->idViajeVehiculoDetalle['referencia']->result->setMessage(''); // debo hacer esto porque sino pincha el insert luego...\n\n\t\t\t// EQUIPAMIENTOS\n\t\t\t$this->idViajeEquipamiento['referencia'] = new ViajeEquipamientoVO();\n\t\t\t$data[] = null;\n\t\t\t$data['nombreCampoWhere'] = 'idViaje';\n\t\t\t$data['valorCampoWhere'] = $this->idViaje['valor'];\n\t\t\t$this->idViajeEquipamiento['referencia']->getAllRows($data);\n\t\t\t//$result = $viajeEquipamiento->result;\n\t\t\tif($this->idViajeEquipamiento['referencia']->result->getStatus() == STATUS_OK) {\n\t\t\t\t//$this->viajeEquipamientoArray = $viajeEquipamiento->result->getData();\n\t\t\t}\n\t\t\t//print_r($this->viajeEquipamientoArray);die();\n\t\t\t$this->idViajeEquipamientoDetalle['referencia'] = new ViajeEquipamientoDetalleVO();\n\t\t\t$data[] = null;\n\t\t\t$data['nombreCampoWhere'] = 'idViaje';\n\t\t\t$data['valorCampoWhere'] = $this->idViaje['valor'];\n\t\t\t$this->idViajeEquipamientoDetalle['referencia']->getRowById($data);\n\t\t\t//$this->idViajeEquipamientoDetalle['referencia'] = $viajeEquipamientoDetalle;\n\t\t\t$this->idViajeEquipamientoDetalle['referencia']->result->setStatus(STATUS_OK); // debo hacer esto porque sino pincha el insert luego...\n\t\t\t$this->idViajeEquipamientoDetalle['referencia']->result->setMessage(''); // debo hacer esto porque sino pincha el insert luego...\n\t\t}\n\t\treturn $this;\n\t}",
"public function DetallesComprasPorId()\n\t{\n\t\tif(base64_decode($_GET['tipoentrada'])==\"PRODUCTO\"){\n\n\t\t\tself::SetNames();\n\t\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria LEFT JOIN productos ON detallecompras.codproducto = productos.codproducto WHERE detallecompras.coddetallecompra = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"coddetallecompra\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num==0)\n\t\t\t{\n\t\t\t\techo \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\t\t} else {\n\n\t\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN ingredientes ON detallecompras.codproducto = ingredientes.codingrediente WHERE detallecompras.coddetallecompra = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute( array(base64_decode($_GET[\"coddetallecompra\"])) );\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num==0)\n\t\t\t{\n\t\t\t\techo \"\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t\t{\n\t\t\t\t\t$this->p[] = $row;\n\t\t\t\t}\n\t\t\t\treturn $this->p;\n\t\t\t\t$this->dbh=null;\n\t\t\t}\n\n\t\t}\n\t}",
"public function editar($id)\n {\n can('editar-aprobar-notaventa');\n $data = NotaVenta::findOrFail($id);\n $data->plazoentrega = $newDate = date(\"d/m/Y\", strtotime($data->plazoentrega));;\n $detalles = $data->notaventadetalles()->get();\n $vendedor_id=$data->vendedor_id;\n $clienteselec = $data->cliente()->get();\n session(['aux_aprocot' => '2']);\n //dd($clienteselec[0]->rut);\n\n //$clientesArray = Cliente::clientesxUsuario();\n $clientesArray = Cliente::clientesxUsuario('0',$data->cliente_id); //Paso vendedor en 0 y el id del cliente para que me traiga las Sucursales que coinciden entre el vendedor y el cliente\n\n $clientes = $clientesArray['clientes'];\n $vendedor_id = $clientesArray['vendedor_id'];\n $sucurArray = $clientesArray['sucurArray'];\n\n //dd($sucurArray);\n //Aqui si estoy filtrando solo las categorias de asignadas al usuario logueado\n //******************* */\n $clientedirecs = Cliente::where('rut', $clienteselec[0]->rut)\n ->join('clientedirec', 'cliente.id', '=', 'clientedirec.cliente_id')\n ->join('cliente_sucursal', 'cliente.id', '=', 'cliente_sucursal.cliente_id')\n ->whereIn('cliente_sucursal.sucursal_id', $sucurArray)\n ->select([\n 'cliente.id as cliente_id',\n 'cliente.razonsocial',\n 'cliente.telefono',\n 'cliente.email',\n 'cliente.regionp_id',\n 'cliente.provinciap_id',\n 'cliente.comunap_id',\n 'cliente.contactonombre',\n 'cliente.direccion',\n 'clientedirec.id',\n 'clientedirec.direcciondetalle'\n ])->get();\n //dd($clientedirecs);\n $clienteDirec = $data->clientedirec()->get();\n $fecha = date(\"d/m/Y\", strtotime($data->fechahora));\n $formapagos = FormaPago::orderBy('id')->get();\n $plazopagos = PlazoPago::orderBy('id')->get();\n $vendedores = Vendedor::orderBy('id')->get();\n $comunas = Comuna::orderBy('id')->get();\n\n $productos = Producto::productosxUsuario();\n\n $vendedores1 = Usuario::join('sucursal_usuario', function ($join) {\n $user = Usuario::findOrFail(auth()->id());\n $sucurArray = $user->sucursales->pluck('id')->toArray();\n $join->on('usuario.id', '=', 'sucursal_usuario.usuario_id')\n ->whereIn('sucursal_usuario.sucursal_id', $sucurArray);\n })\n ->join('persona', 'usuario.id', '=', 'persona.usuario_id')\n ->join('vendedor', function ($join) {\n $join->on('persona.id', '=', 'vendedor.persona_id')\n ->where('vendedor.sta_activo', '=', 1);\n })\n ->select([\n 'vendedor.id',\n 'persona.nombre',\n 'persona.apellido'\n ])\n ->get();\n\n $empresa = Empresa::findOrFail(1);\n $tipoentregas = TipoEntrega::orderBy('id')->get();\n $giros = Giro::orderBy('id')->get();\n $aux_sta=3;\n $aux_statusPant = 0;\n $tablas = array();\n $tablas['unidadmedida'] = UnidadMedida::orderBy('id')->where('mostrarfact',1)->get();\n $tablas['sucursales'] = $clientesArray['sucursales'];\n\n //dd($clientedirecs);\n return view('notaventaAprobar.editar', compact('data','clienteselec','clientes','clienteDirec','clientedirecs','detalles','comunas','formapagos','plazopagos','vendedores','vendedores1','productos','fecha','empresa','tipoentregas','giros','sucurArray','aux_sta','aux_cont','aux_statusPant','tablas','vendedor_id'));\n }",
"public function get_datos_ventas_cargo($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select c.n_factura,c.fecha_ingreso,c.n_recibo,c.paciente,u.usuario,c.total_factura,c.forma_cobro,c.monto_cobrado,c.saldo_credito,c.abonos_realizados from corte_diario as c inner join usuarios as u on u.id_usuario=c.id_usuario where c.fecha_ingreso like ? and c.abonos_realizados='0' and c.tipo_pago='Cargo Automatico' and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"public function selektujeObjekat($idObjekta)\n {\n $upit = \"select Tpleme.naziv AS plemeNaziv, Toznaka.*, Toznaka.tekstNatpisa AS natpis, TprovincijaNalaska.naziv AS provincijaNalaska , TgradNalaska.naziv AS gradNalaska, Mesto.naziv AS mestoNalaska , TmodernoImeDrzave.naziv AS modernoImeDrzave , vrstaNatpisa.naziv AS vrstaNatpisa , jezik.naziv AS jezik , Ustanova.naziv AS ustanova, TmodernoMesto.naziv AS modernoMesto FROM (select * from Objekat) Toznaka JOIN (select * from Provincija) TprovincijaNalaska ON Toznaka.provincija = TprovincijaNalaska.id JOIN (select * from Grad) TgradNalaska ON Toznaka.grad = TgradNalaska.id JOIN (select * from ModernaDrzava) TmodernoImeDrzave ON Toznaka.modernaDrzava = TmodernoImeDrzave.id JOIN (select * from ModernoMesto) TmodernoMesto ON Toznaka.modernoMesto = TmodernoMesto.id JOIN (select * from Pleme) Tpleme ON Toznaka.pleme = Tpleme.id LEFT JOIN Mesto ON Toznaka.mesto = Mesto.id LEFT JOIN vrstaNatpisa ON Toznaka.vrstaNatpisa = vrstaNatpisa.id LEFT JOIN jezik ON Toznaka.jezik = jezik.id LEFT JOIN ustanova on Toznaka.ustanova = Ustanova.id where Toznaka.id = :idObjekta \";\n\n $stmt=konekcija::getConnectionInstance()->prepare($upit);\n $stmt->bindParam(':idObjekta', $idObjekta , PDO::PARAM_INT);\n $stmt->execute();\n $stmt->setFetchMode(PDO::FETCH_ASSOC);\n $d = $stmt->fetch();\n return $this->obradiVrstaId($d);\n }",
"public function SelectById($paciente){\n\t\t\t$sql = \"SELECT p.*, e.* FROM tbl_paciente AS p INNER JOIN tbl_endereco AS e ON p.id_endereco = e.id_endereco WHERE id_paciente = \". $paciente->id_paciente;\n\n\t\t\t//Instancio o banco e crio uma variavel\n\t\t\t$conex = new Mysql_db();\n\n\t\t\t/*Chama o método para conectar no banco de dados e guarda o retorno da conexao\n\t\t\tna variavel que $PDO_conex*/\n\t\t\t$PDO_conex = $conex->Conectar();\n\n\t\t\t$select = $PDO_conex->query($sql);\n\n\t\t\t//Executa o script no banco de dados\n\t\t\tif($rs = $select->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t//Se der true redireciona a tela\n\n\t\t\t\t$paciente = array();\n\n $paciente = $rs;\n\n\t\t\t\t// Guarda os dados no banco de dados em cada indice do objeto criado\n\t\t\t\t/*$paciente->id_paciente = $rs['id_paciente'];\n $paciente->id_endereco = $rs['id_endereco'];\n $paciente->id_convenio = $rs['id_convenio'];\n $paciente->nome = $rs['nome'];\n $paciente->sobrenome = $rs['sobrenome'];\n $paciente->dt_nasc = $rs['dt_nasc'];\n $paciente->rg = $rs['rg'];\n $paciente->cpf = $rs['cpf'];\n $paciente->carteirinha_convenio = $rs['carteirinha_convenio'];\n $paciente->foto = $rs['foto'];\n $paciente->status = $rs['status'];\n\t\t\t\t $paciente->id_endereco = $rs['id_endereco'];\n $paciente->cep = $rs['cep'];\n $paciente->logradouro = $rs['logradouro'];\n $paciente->numero = $rs['numero'];\n $paciente->id_estado = $rs['id_estado'];\n $paciente->cidade = $rs['cidade'];\n $paciente->bairro = $rs['bairro']; */\n\n return $paciente;\n\n\t\t\t}else {\n\t\t\t\t//Mensagem de erro\n\t\t\t\techo \"Error ao selecionar no Banco de Dados\";\n\t\t\t}\n\n\t\t\t//Fecha a conexão com o banco de dados\n\t\t\t$conex->Desconectar();\n\t\t}",
"public function displayDatoSeguimiento($etapa_id){\n try{\n log_message(\"INFO\", \"Obteniendo valor de campo para etapa: \".$etapa_id, FALSE);\n log_message(\"INFO\", \"Nombre campo: \".$this->nombre, FALSE);\n\n $dato = Doctrine::getTable('DatoSeguimiento')->findByNombreHastaEtapa($this->nombre,$etapa_id);\n if(!$dato ){\n //Se deben crear\n $dato = new DatoSeguimiento();\n $dato->nombre = $this->nombre;\n $dato->etapa_id = $etapa_id;\n $dato->valor = NULL;\n }\n log_message(\"INFO\", \"Nombre dato: \".$dato->nombre, FALSE);\n log_message(\"INFO\", \"Valor dato: .\".$dato->valor.\".\", FALSE);\n log_message(\"INFO\", \"this->valor_default: \".$this->valor_default, FALSE);\n if(isset($this->valor_default) && strlen($this->valor_default) > 0 && $dato->valor === NULL){\n $regla=new Regla($this->valor_default);\n $valor_dato=$regla->getExpresionParaOutput($etapa_id);\n $dato->valor = $valor_dato;\n $dato->save();\n }else{\n $valor_dato = $dato->valor;\n }\n\n log_message(\"INFO\", \"valor_default: \".$valor_dato, FALSE);\n\n return $valor_dato;\n }catch(Exception $e){\n log_message('error',$e->getMessage());die;\n throw $e;\n }\n }",
"public function getDatos($idCaja){\n $this->select('arqueo_caja.*,cajas.nombre');\n $this->join('cajas','arqueo_caja.id_caja=cajas.id');\n $this->where('arqueo_caja.id_caja',$idCaja);\n $this->orderBy('arqueo_caja.id','DESC');\n $datos= $this->findAll();\n // print_r($this->getLastQuery());\n return $datos;\n\n }",
"public static function valor($id){ \n\n $consultas = DB::table('control_tramites')\n ->where('control_tramites.numero_escritura', '=', $id )\n ->select('control_tramites.*')\n ->get(); \n\n $kinegrama;\n\n foreach($consultas as $consulta){\n $kinegrama = $consulta->kinegrama_id;\n }\n\n $consult = DB::table('kinegramas')\n ->where('kinegramas.id', '=', $kinegrama )\n ->select('kinegramas.*')\n ->get(); \n\n if ( $consultas->isEmpty()) {\n \n\n \n }\n else{\n\n return DB::table('control_tramites')\n ->Join('clientes', 'control_tramites.cliente_id', '=', 'clientes.id')\n ->Join('tipos_tramites', 'control_tramites.tramite_id', '=', 'tipos_tramites.id')\n ->where('control_tramites.numero_escritura', '=', $id) \n ->select( 'control_tramites.*','clientes.nombre','clientes.apellido_paterno','clientes.apellido_materno','tipos_tramites.tramite')\n ->get(); \n }\n\n\n \n\n \n\n }",
"public function loadById()\n {\n // $this->soals = DB::select('select * from soals where id_ulangan = ?', [$this->id_ul]);\n // $this->ed_soal = $this->soals[0]->soal;\n // $this->pilA = $this->soals[0]->pilihan_a;\n // $this->pilB = $this->soals[0]->pilihan_b;\n // $this->pilC = $this->soals[0]->pilihan_c;\n // $this->pilD = $this->soals[0]->pilihan_d;\n // $this->pilE = $this->soals[0]->pilihan_e;\n // $this->kunci_jawaban = $this->soals[0]->kunci_jawaban;\n // if ($this->soals[0]->poin != null) {\n // $this->poin = $this->soals[0]->poin;\n // }\n // dd($this->soals[0]->soal);\n // foreach ($this->soals as $s) {\n // $this->soal = $s->soal;\n // $this->pilA = $s->pilihan_a;\n // $this->pilB = $s->pilihan_b;\n // $this->pilC = $s->pilihan_c;\n // $this->pilD = $s->pilihan_d;\n // $this->pilE = $s->pilihan_e;\n // $this->kunci_jawaban = $s->kunci_jawaban;\n // if ($s->poin != null) {\n // $this->poin = $s->poin;\n // }\n // }\n // return $soals;\n }",
"function select() {\r\n\r\n $oc_id = $this->oc_id;\r\n $prov_id = $this->prov_id;\r\n $oc_tipo = $this->oc_tipo;\r\n $oc_estado = $this->oc_estado;\r\n $oc_fecha_entrega = $this->oc_fecha_entrega;\r\n $oc_fecha_entrega_fin = $this->oc_fecha_entrega_fin;\r\n\r\n $sql = \"SELECT * FROM ing_oc p LEFT JOIN efectua_compra h ON p.oc_id=h.oc_id WHERE \";\r\n\r\n if ($oc_estado != null) {\r\n $sql = $sql . \"p.oc_estado = '\" . $oc_estado . \"' \";\r\n } else {\r\n $sql = $sql . \"p.oc_estado > '0' \";\r\n }\r\n if ($oc_id != null) {\r\n $sql = $sql . \"AND p.oc_id = '\" . $oc_id . \"' \";\r\n }\r\n if ($prov_id != null) {\r\n $sql = $sql . \"AND p.prov_id = '\" . $prov_id . \"' \";\r\n }\r\n if ($oc_tipo != null) {\r\n $sql = $sql . \"AND p.oc_tipo = '\" . $oc_tipo . \"' \";\r\n }\r\n if ($oc_fecha_entrega != null) {\r\n if ($oc_fecha_entrega_fin != null) {\r\n $sql = $sql . \"AND P.oc_fecha_entrega BETWEEN '\" . $oc_fecha_entrega . \"' AND '\" . $oc_fecha_entrega_fin . \"' \";\r\n }\r\n $sql = $sql . \"AND P.oc_fecha_entrega = '\" . $oc_fecha_entrega . \"' \";\r\n }\r\n\r\n $result = $this->database->query($sql);\r\n// $result = $this->database->result;\r\n// $row = mysql_fetch_object($result);\r\n\r\n $i = 0;\r\n while ($datos = $this->database->fetch_array($result)) {\r\n $this->arringoc[$i]['prov_id'] = $datos['prov_id'];\r\n $this->arringoc[$i]['oc_id'] = $datos['oc_id'];\r\n $this->arringoc[$i]['oc_codigo'] = $datos['oc_codigo'];\r\n $this->arringoc[$i]['oc_tipo'] = $datos['oc_tipo'];\r\n $this->arringoc[$i]['oc_empresa'] = $datos['oc_empresa'];\r\n $this->arringoc[$i]['oc_log'] = $datos['oc_log'];\r\n $this->arringoc[$i]['oc_estado'] = $datos['oc_estado'];\r\n $this->arringoc[$i]['oc_fecha_entrega'] = $datos['oc_fecha_entrega'];\r\n $this->arringoc[$i]['oc_solicitante'] = $datos['oc_solicitante'];\r\n $this->arringoc[$i]['oc_observacion'] = $datos['oc_observacion'];\r\n $this->arringoc[$i]['oc_neto'] = $datos['oc_neto'];\r\n $this->arringoc[$i]['oc_iva'] = $datos['oc_iva'];\r\n $this->arringoc[$i]['oc_total'] = $datos['oc_total'];\r\n $this->arringoc[$i]['oc_forma_pago'] = $datos['oc_forma_pago'];\r\n $this->arringoc[$i]['oc_condiciones'] = $datos['oc_condiciones'];\r\n $this->arringoc[$i]['oc_tipo_descuento'] = $datos['oc_tipo_descuento'];\r\n $this->arringoc[$i]['oc_impuesto'] = $datos['oc_impuesto'];\r\n $this->arringoc[$i]['oc_gasto_envio'] = $datos['oc_gasto_envio'];\r\n $this->arringoc[$i]['solc_id'] = $datos['solc_id'];\r\n $i++;\r\n }\r\n\r\n// $this->prov_id = $row->prov_id;\r\n//\r\n// $this->oc_id = $row->oc_id;\r\n//\r\n// $this->oc_codigo = $row->oc_codigo;\r\n//\r\n// $this->oc_tipo = $row->oc_tipo;\r\n//\r\n// $this->oc_empresa = $row->oc_empresa;\r\n//\r\n// $this->oc_log = $row->oc_log;\r\n//\r\n// $this->oc_estado = $row->oc_estado;\r\n//\r\n// $this->oc_fecha_entrega = $row->oc_fecha_entrega;\r\n//\r\n// $this->oc_solicitante = $row->oc_solicitante;\r\n//\r\n// $this->oc_observacion = $row->oc_observacion;\r\n//\r\n// $this->oc_neto = $row->oc_neto;\r\n//\r\n// $this->oc_iva = $row->oc_iva;\r\n//\r\n// $this->oc_total = $row->oc_total;\r\n//\r\n// $this->oc_forma_pago = $row->oc_forma_pago;\r\n//\r\n// $this->oc_condiciones = $row->oc_condiciones;\r\n//\r\n// $this->oc_rut_emision = $row->oc_rut_emision;\r\n//\r\n// $this->oc_rut_aprobacion = $row->oc_rut_aprobacion;\r\n//\r\n// $this->oc_cheque_adjunto = $row->oc_cheque_adjunto;\r\n//\r\n// $this->oc_descuento = $row->oc_descuento;\r\n//\r\n// $this->oc_tipo_descuento = $row->oc_tipo_descuento;\r\n//\r\n// $this->oc_impuesto = $row->oc_impuesto;\r\n//\r\n// $this->oc_gasto_envio = $row->oc_gasto_envio;\r\n//\r\n// $this->oc_estado_pago = $row->oc_estado_pago;\r\n }",
"public function indexAsistenciaDiaria()\n {\n try {\n $dbm = new DbmControlescolar($this->get(\"db_manager\")->getEntityManager());\n $ciclo = $dbm->getRepositoriosById(\"Ciclo\", \"activo\", 1);\n $nivel = $dbm->getRepositoriosModelo(\"Nivel\", \n [\"d.nivelid, d.nombre\"], \n [[\"nivelid is not null and cn.asistenciapordia = 1 and d.activo = 1 \"]], false, true, [\n [\"entidad\" => \"CeConfiguracionnivel\", \"alias\" => \"cn\", \"left\" => false, \"on\" => \"cn.configuracionnivelid = d.configuracionnivelid\"]\n ]);\n $grado = $dbm->getRepositoriosById('Grado', 'activo', 1);\n $semestre = $dbm->getRepositoriosById('CeSemestre', 'activo', 1);\n $grupo = $dbm->getRepositoriosById('CeGrupo', 'tipogrupoid', 1);\n\t\t\t$periodoeval = $dbm->getRepositoriosModelo(\"CePeriodoevaluacion\", [\"d.periodoevaluacionid, d.descripcion, IDENTITY(c.cicloid) as cicloid, GROUPCONCAT(DISTINCT IDENTITY(g.gradoid)) as gradoid\"],\n\t\t\t\t[], false, false, [\n\t\t\t\t[\"entidad\" => \"CeConjuntoperiodoevaluacion\", \"alias\" => \"c\", \"left\" => false, \"on\" => \"c.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n\t\t\t\t[\"entidad\" => \"CeGradoporconjuntoperiodoescolar\", \"alias\" => \"g\", \"left\" => false, \"on\" => \"g.conjuntoperiodoevaluacionid = d.conjuntoperiodoevaluacionid\"],\n ], 'd.periodoevaluacionid');\n $param = $dbm->getRepositorioById('Parametros', 'parametrosid', 156);\n\n\n $array = array(\"ciclo\" => $ciclo, \n \"nivel\" => $nivel, \n \"grado\" => $grado, \n \"semestre\" => $semestre,\n \"grupo\" => $grupo,\n \"periodos\" => $periodoeval,\n \"param\" => $param && $param->getValor() ? intval($param->getValor()) : null\n );\n return new View($array, Response::HTTP_OK);\n } catch (\\Exception $e) {\n return new View($e->getMessage(), Response::HTTP_BAD_REQUEST);\n }\n }",
"public function mostrar($idcompra){\n $sql = \"SELECT c.idcompra, c.idordencompra, c.nrofactura, c.idproveedor, p.razonsocial AS proveedor, c.idpersonal, concat(per.nombre, ' ', per.apellido) AS personal, c.idsucursal, suc.descripcion AS sucursal, c.idformapago, fp.descripcion AS formapago, c.idtipodocumento, td.descripcion AS tipodoc, c.iddeposito, d.descripcion AS deposito, date(c.fecha) as fecha, c.obs, c.monto \n FROM compras c JOIN proveedores p ON c.idproveedor = p.idproveedor JOIN personales per ON c.idpersonal = per.idpersonal JOIN sucursales suc ON c.idsucursal = suc.idsucursal JOIN formas_pago fp ON c.idformapago = fp.idformapago JOIN tipo_documentos td ON c.idtipodocumento = td.idtipodocumento JOIN depositos d ON c.iddeposito = d.iddeposito \n WHERE idcompra = '$idcompra'\";\n return ejecutarConsultaSimpleFila($sql);\n }",
"function entrada_por_traspaso(){\n\t\t$e= new Entrada();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cproveedores_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}",
"public function getServicesPorIdContrato($idContrato) {\n $tablas = [\n \"access_control\" => \"tb_client_services_access_control\",\n \"internet\" => \"tb_client_services_internet\",\n \"totem\" => \"tb_client_services_totem\",\n \"camera\" => \"tb_client_services_camera\",\n \"alarms\" => \"tb_client_services_alarms\",\n \"smart_panic\" => \"tb_client_services_smart_panic\",\n ];\n $relaciones = [\n 'tb_client_services_access_control' => [\n 'idDoorFk' => [ 'tb_access_control_door', 'idAccessControlDoor' ],\n 'idAccessControlFk' => [ 'tb_products', 'idProduct' ],\n 'idContracAssociated_SE' => [ 'tb_contratos', 'idContrato' ],\n 'idInputReaderFk' => [ 'tb_products', 'idProduct' ],\n //'idTypeMaintenanceFk' => [ 'tb_products', 'idProduct' ],\n 'idEmergencyButtonFk' => [ 'tb_products', 'idProduct' ],\n 'idShutdownKeyFk' => [ 'tb_products', 'idProduct' ],\n 'idFontFk' => [ 'tb_products', 'idProduct' ],\n //'idClientServicesFk' => [ 'tb_clients', 'idClient' ],\n 'ouputReader' => [ 'tb_products', 'idProduct' ],\n 'ouputButom' => [ 'tb_products', 'idProduct' ],\n 'lock' => [ 'tb_products', 'idProduct' ],\n //'idBatteryFk' => [ 'tb_products', 'idProduct' ],\n //'idOpenDevice' => [ 'tb_products', 'idProduct' ],\n 'idTypeMaintenanceFk' => [ 'tb_type_maintenance', 'idTypeMaintenance'],\n 'fk' => [\n [ 'tb_detalles_control_acceso', 'idServicesFk' ],\n [ 'tb_battery_install_access_control', 'idClientServicesAccessControlFk' ],\n [ 'tb_open_devices_access_control', 'idOPClientServicesAccessControlFk' ],\n ],\n\n ],\n 'tb_client_services_internet' => [\n 'idClientServicesFk' => [ 'tb_clients', 'idClient' ],\n 'idTypeInternetFk' => [ 'tb_tipos_servicios_internet', 'idTipoServicioInternet' ],\n 'idServiceFk' => [ 'tb_type_internet', 'idTypeInternet' ],\n 'idServiceAsociateFk' => [ 'tb_client_services', 'idClientServices' ],\n 'idRouterInternetFk' => [ 'tb_products', 'idProduct' ],\n 'idModemInternetFk' => [ 'tb_products', 'idProduct' ],\n 'idContracAssociated_SE' => [ 'tb_contratos', 'idContrato' ],\n 'idTypeMaintenanceFk' => [ 'tb_type_maintenance', 'idTypeMaintenance'],\n 'idInternetCompanyFk' => [ 'tb_internet_company', 'idInternetCompany' ],\n\n 'fk' => [\n [ 'tb_detalles_control_acceso', 'idServicesFk' ],\n ],\n ],\n 'tb_client_services_totem' => [\n 'idClientServicesFk' => [ 'tb_clients', 'idClient' ],\n 'idContracAssociated_SE' => [ 'tb_contratos', 'idContrato' ],\n 'idCompanyFk' => [ 'tb_monitor_company', 'idMonitorCompany' ],\n 'idTotenModelFk' => [ 'tb_totem_model', 'idTotenModel' ],\n 'idDvr_nvrFk' => [ 'tb_products', 'idProduct' ],\n 'idTypeMaintenanceFk' => [ 'tb_type_maintenance', 'idTypeMaintenance'],\n 'fk' => [\n [ 'tb_cameras_totem', 'idClientServicesCameraTotemFk' ],\n [ 'tb_client_totem', 'idClientServicesTotemFk' ],\n [ 'tb_backup_energy_totem', 'idClientServicesTotemFk' ],\n [ 'tb_detalles_control_acceso', 'idServicesFk' ],\n ],\n ],\n 'tb_client_services_camera' => [\n 'idContracAssociated_SE' => [ 'tb_contratos', 'idContrato' ],\n 'idTypeMaintenanceFk' => [ 'tb_type_maintenance', 'idTypeMaintenance' ],\n 'idDvr_nvrFk' => [ 'tb_products', 'idProduct' ],\n 'fk' => [\n [ 'tb_cameras', 'idClientServicesCameraFk' ],\n [ 'tb_client_camera', 'idClientServicesCameraFk' ],\n [ 'tb_backup_energy', 'idClientServicesFk' ],\n [ 'tb_detalles_control_acceso', 'idServicesFk' ],\n ],\n ],\n 'tb_client_services_alarms' => [\n 'idContracAssociated_SE' => [ 'tb_contratos', 'idContrato' ],\n 'companyMonitor' => [ 'tb_monitor_company', 'idMonitorCompany' ],\n 'idTypeMaintenanceFk' => [ 'tb_type_maintenance', 'idTypeMaintenance' ],\n 'panelAlarm' => [ 'tb_products', 'idProduct' ],\n 'keyboardAlarm' => [ 'tb_products', 'idProduct' ],\n 'fk' => [\n [\n [ 'tb_sensors_alarm', 'fkidClientServicesAlarms' ],\n [ 'tb_tipo_conexion_remoto', 'fk_idDatoAdicionalAlarma' ],\n [ 'tb_detalles_control_acceso', 'idServicesFk' ],\n [ 'tb_alarm_batery', 'fkidClientServicesAlarms' ],\n [ 'tb_datos_adicionales_alarmas', 'fkidClientServicesAlarms' ],\n 'fk' => [\n [ 'tb_franja_horaria_alarmas', 'fk_idDatoAdicionalAlarma' ],\n [ 'tb_personas_para_dar_aviso_alarmas', 'fk_idDatoAdicionalAlarma' ],\n [ 'tb_personas_para_verificar_en_lugar', 'fk_idDatoAdicionalAlarma' ],\n\n ],\n\n ],\n\n ],\n\n ],\n 'tb_client_services_smart_panic' => [\n 'idClientServicesFk' => [ 'tb_clients', 'idClient' ],\n 'idContracAssociated_SE' => [ 'tb_contratos', 'idContrato' ],\n 'idTypeMaintenanceFk' => [ 'tb_type_maintenance', 'idTypeMaintenance' ],\n 'idCompanyMonitorFK' => [ 'tb_monitor_company', 'idMonitorCompany' ],\n 'idApplicationFk' => [ 'tb_app_monitor_application', 'idApplication' ],\n 'fk' => [\n [ 'tb_user_license', 'idClientServicesSmartPanicFk' ], \n [ 'tb_detalles_control_acceso', 'idServicesFk' ],\n ],\n ],\n\n ];\n\n $servicios = null;\n $array_axu = [];\n $serviceAsociate_arr = [];\n /*se recorre el arreglo de las tablas*/\n foreach ($tablas as $key => $tabla) {\n //return [$key,$tabla];\n\n $servicios = $this->db->select(\" * \")\n ->from($tabla)\n ->join('tb_client_services', 'tb_client_services.idClientServices = '.$tabla.'.idClientServicesFk', 'LEFT')\n ->join('tb_client_type_services', 'tb_client_type_services.idClientTypeServices = tb_client_services.idTipeServiceFk', 'LEFT');\n\n if ($tabla == 'tb_client_services_access_control') {\n $servicios = $this->db->join('tb_access_control_door', 'tb_access_control_door.idAccessControlDoor = tb_client_services_access_control.idDoorFk', 'LEFT');\n }\n if ($tabla == 'tb_client_services_internet') {\n $servicios = $this->db->join('tb_tipos_servicios_internet', 'tb_tipos_servicios_internet.idTipoServicioInternet = tb_client_services_internet.idTypeInternetFk', 'LEFT');\n }\n if ($tabla == 'tb_client_services_alarms') {\n $servicios = $this->db->join('tb_datos_adicionales_alarmas', 'tb_datos_adicionales_alarmas.fkidClientServicesAlarms = tb_client_services_alarms.idClientServicesAlarms', 'LEFT');\n //$servicios = $this->db->join('tb_tipo_conexion_remoto', 'tb_tipo_conexion_remoto.idTipoConexionRemoto = tb_client_services_alarms.idTypeConectionRemote', 'LEFT');\n }\n $servicios = $this->db->where('idContracAssociated_SE', $idContrato);\n $servicios = $this->db->get();\n\n if ($servicios->num_rows() > 0) {\n //print_r($servicios->result_array());\n foreach ($servicios->result_array() as $key => $item) {\n foreach ($relaciones as $tabla1 => $data) { \n foreach ($data as $id => $item3) {\n // if ($tabla1==\"tb_client_services_access_control\") {\n // return $item3;\n // }\n\n if ($tabla == $tabla1) {\n if ($tabla == \"tb_client_services_camera\" && $id == 'fk') {\n foreach ($data[$id] as $idFk => $item3Fk) {\n $dataG = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServicesCamera'])\n ->get();\n $aux = [];\n if ($dataG->num_rows() >= 0) {\n foreach ($dataG->result_array() as $ite2) {\n array_push($aux, $ite2);\n }\n if ($item3Fk[0] == 'tb_detalles_control_acceso') {\n $dataG2 = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServices'])\n ->get();\n $aux = [];\n foreach ($dataG2->result_array() as $ite22) {\n array_push($aux, $ite22);\n }\n $item['adicional'] = $aux;\n } else {\n $item[$item3Fk[0].'_array'] = $aux;\n }\n }\n }\n\n } else {\n if ($tabla == \"tb_client_services_totem\" && $id == 'fk') {\n foreach ($data[$id] as $idFk => $item3Fk) {\n $dataG = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServicesTotem'])\n ->get();\n $aux = [];\n if ($dataG->num_rows() >= 0) {\n foreach ($dataG->result_array() as $ite2) {\n array_push($aux, $ite2);\n }\n if ($item3Fk[0] == 'tb_detalles_control_acceso') {\n $dataG2 = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServices'])\n ->get();\n $aux = [];\n foreach ($dataG2->result_array() as $ite22) {\n array_push($aux, $ite22);\n }\n $item['adicional'] = $aux;\n } else {\n $item[$item3Fk[0].'_array'] = $aux;\n }\n }\n }\n\n } elseif ($tabla == \"tb_client_services_smart_panic\" && $id == 'fk') {\n $rsSQL = null;\n //return 'a';\n //return $servicios->result_array(); \n foreach ($data[$id] as $idFk => $item3Fk) {\n if ($item3Fk[0]=='tb_user_license'){\n //echo $item3Fk[0].\" - \".$item3Fk[1].\"\\n\";\n $dataG = $this->db->select(\" idClientServicesSmartPanicFk, idClientTypeFk, idDetinationOfLicenseFk, detinationOfLicense, idDepartmentFk, tb_client_departament.idClientDepartament AS idDepto, CONCAT(floor,'-',departament) AS Depto, idClient AS idBuilding, address AS Building, idParticularAddressFk, idUserFk, fullName, nameProfile, email, phone, keyword, idOS, numberUserPassword, profileUser \")\n ->from($item3Fk[0]) \n ->join('tb_detination_of_license', 'tb_detination_of_license.idDetinationOfLicense = '.$item3Fk[0].'.idDetinationOfLicenseFk', 'LEFT')\n ->join('tb_user', 'tb_user.idUser = '.$item3Fk[0].'.idUserFk', 'LEFT')\n ->join('tb_profile', 'tb_profile.idProfile = tb_user.idProfileKf', 'LEFT')\n ->join('tb_client_departament', 'tb_client_departament.idClientDepartament = '.$item3Fk[0].'.idDepartmentFk', 'LEFT')\n ->join('tb_clients', 'tb_clients.idClient = tb_client_departament.idClientFk', 'LEFT')\n ->where($item3Fk[0].'.'.$item3Fk[1], $item['idClientServicesSmartPanic'])\n ->get();\n }else{\n $dataG = $this->db->select(\" * \")\n ->from($item3Fk[0]) \n ->where($item3Fk[1], $item['idClientServicesSmartPanic'])\n ->get();\n //return $this->db->last_query();\n //return $dataG->result_array();\n }\n $aux = [];\n if ($dataG->num_rows() >= 0) {\n foreach ($dataG->result_array() as $ite2) {\n array_push($aux, $ite2);\n }\n if ($item3Fk[0] == 'tb_detalles_control_acceso') {\n $dataG2 = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServices'])\n ->get();\n $aux = [];\n foreach ($dataG2->result_array() as $ite22) {\n array_push($aux, $ite22);\n }\n $item['adicional'] = $aux;\n } else {\n $item[$item3Fk[0].'_array'] = $aux;\n }\n }\n }\n\n } else { \n if ($tabla == \"tb_client_services_alarms\" && $id == 'fk') {\n foreach ($data[$id] as $idFk => $item3Fk) {\n\n foreach ($item3Fk as $idFk2 => $item3Fk2) {\n //print_r($item3Fk[1]);\n if ($idFk2 === \"fk\") {\n foreach ($item3Fk[$idFk2] as $idFk3 => $item3Fk3) {\n //echo $item3Fk3[0].\" => \".$item3Fk3[1].\" :: \";\n $dataG = $this->db->select(\" * \")\n ->from($item3Fk3[0])\n ->where($item3Fk3[1], $item['idDatoAdicionalAlarma'])\n ->get();\n $aux = [];\n if ($dataG->num_rows() > 0) {\n //return $dataG->result_array();\n foreach ($dataG->result_array() as $ite2) {\n array_push($aux, $ite2);\n }\n $item['tb_datos_adicionales_alarmas_array'][0][$item3Fk3[0].'_array'] = $aux; \n }\n }\n } else {\n if ($item3Fk2[0] == 'tb_datos_adicionales_alarmas') {\n //return $item3Fk2;\n $dataG1 = $this->db->select(\" * \")\n ->from($item3Fk2[0])\n ->where($item3Fk2[1], $item['idClientServicesAlarms'])\n ->get();\n $aux = [];\n foreach ($dataG1->result_array() as $ite1) {\n array_push($aux, $ite1);\n }\n $item['tb_datos_adicionales_alarmas_array']= $aux;\n } elseif ($item3Fk2[0] == 'tb_detalles_control_acceso') {\n $dataG2 = $this->db->select(\" * \")\n ->from($item3Fk2[0])\n ->where($item3Fk2[1], $item['idClientServices'])\n ->get();\n //return $dataG2->result_array();\n $aux = [];\n foreach ($dataG2->result_array() as $ite2) {\n array_push($aux, $ite2);\n }\n $item['adicional'] = $aux;\n } elseif ($item3Fk2[0] == 'tb_tipo_conexion_remoto'){\n //echo $item3Fk2[0].\" => \".$item3Fk2[1];\n $result = $this->db->select(\"*\")\n ->from('tb_tipo_conexion_remoto')\n //->where('idTipoConexionRemoto', $item['idTypeConectionRemote'])\n ->get();\n $aux = [];\n if ($result->num_rows() > 0) {\n //echo $item3Fk2[1].\" - \";\n foreach ($result->result_array() as $rs) {\n //print_r($rs);\n //echo $rs[0]['tabla'];\n $dataG3 = $this->db->select(\" * \")\n ->from($rs['tabla'])\n ->where($item3Fk2[1], $item['idClientServicesAlarms'])\n ->get();\n if ($dataG3->num_rows() > 0) {\n foreach ($dataG3->result_array() as $ite3) {\n $ite3['descripcion']=$rs['descripcion'];\n array_push($aux, $ite3);\n }\n $item[$item3Fk2[0].'_array'] = $aux;\n }\n } \n }\n } else {\n $dataG4 = $this->db->select(\" * \")\n ->from($item3Fk2[0])\n ->where($item3Fk2[1], $item['idClientServicesAlarms'])\n ->get();\n\n $aux = [];\n if ($dataG4->num_rows() > 0) {\n foreach ($dataG4->result_array() as $ite4) {\n array_push($aux, $ite4);\n }\n $item[$item3Fk2[0].'_array'] = $aux;\n }\n }\n\n }\n }\n\n }\n\n } else {\n if ($tabla == \"tb_client_services_internet\" && $id == 'fk') {\n //echo $tabla.\"\\n\";\n //echo $id.\"\\n\";\n foreach ($data[$id] as $idFk => $item3Fk) {\n //echo $idFk.\"\\n\";\n $dataG = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServicesInternet'])\n ->get();\n $aux = [];\n\n if ($dataG->num_rows() >= 0) {\n foreach ($dataG->result_array() as $ite2) {\n array_push($aux, $ite2);\n }\n if ($item3Fk[0] == 'tb_detalles_control_acceso') {\n $dataG2 = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServices'])\n ->get();\n $aux = [];\n foreach ($dataG2->result_array() as $ite22) {\n array_push($aux, $ite22);\n }\n $item['adicional'] = $aux;\n } else {\n $item[$item3Fk[0].'_array'] = $aux;\n }\n }\n }\n\n } else {\n if ($tabla == \"tb_client_services_access_control\" && $id == 'fk') {\n //return $item['idClientServicesAccessControl'];\n //return $item3[0];\n foreach ($data[$id] as $idFk => $item3Fk) {\n //return $item['idClientServices'];\n\n $dataG = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServicesAccessControl'])\n ->get();\n $aux = [];\n //return $dataG->num_rows();\n if ($item3Fk[0] == 'tb_detalles_control_acceso') {\n $dataG2 = $this->db->select(\" * \")\n ->from($item3Fk[0])\n ->where($item3Fk[1], $item['idClientServices'])\n ->get();\n //return $dataG2->result_array();\n $aux = [];\n foreach ($dataG2->result_array() as $ite212) {\n array_push($aux, $ite212);\n }\n $item['adicional'] = $aux;\n } else {\n if ($dataG->num_rows() > 0) {\n $aux = [];\n foreach ($dataG->result_array() as $ite2) {\n array_push($aux, $ite2);\n }\n\n $item[$item3Fk[0].'_array'] = $aux;\n\n }\n }\n\n\n }\n\n } else {\n //echo $data[$id][0].\"\\n\";\n //return $item[$id];['idServiceAsociateFk']\n if ($data[$id][0]=='tb_client_services'){\n $servicesAssociated=[];\n $serviceAsociate_arr=[];\n //echo \"exist\";\n //$data['idServiceAsociateFk']\n $servicesAssociated=json_decode($item['idServiceAsociateFk']);\n //print_r($servicesAssociated);\n //echo $item3[0].\"\\n\";\n //echo $item3[1].\"\\n\";\n //echo $data['idServiceAsociateFk'][0].\"\\n\";\n $i=0;\n if (count($servicesAssociated)>0){\n foreach ($servicesAssociated as $idServiceAssociated) {\n $dataG = $this->db->select(\" * \")\n ->from($data['idServiceAsociateFk'][0])\n ->where($data['idServiceAsociateFk'][1], $idServiceAssociated)\n ->get();\n //return $dataG->result_array();\n //var_dump($dataG->result_array());\n $aux = null;\n if ($dataG->num_rows() > 0) {\n foreach ($dataG->result_array() as $ite2) {\n //print_r($ite2);\n $aux=$ite2;\n }\n }\n //$item[$id.'_array_'.$i]=$serviceAsociate_arr;\n array_push($serviceAsociate_arr,$aux);\n $i++;\n }\n //print_r($serviceAsociate_arr);\n }else{\n $serviceAsociate_arr=[];\n }\n $item[$id.'_array']=$serviceAsociate_arr;\n }else{\n $dataG = $this->db->select(\" * \")\n ->from($item3[0])\n ->where($item3[1], $item[$id])\n ->get();\n //return $dataG->result_array();\n $aux = [];\n if ($dataG->num_rows() > 0) {\n foreach ($dataG->result_array() as $ite2) {\n //print_r($ite2);\n array_push($aux, $ite2);\n }\n $item[$id.'_array'] = $aux;\n //print_r($item[$id.'_arrayaaaaaaaaaaaaaaaaaa']);\n }\n }\n }\n\n }\n\n }\n\n }\n }\n }\n }\n }\n array_push($array_axu, $item);\n }\n }\n }\n\n return $array_axu;\n\n }",
"function EstadoCuenta(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_SALAT_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('id_agencia','id_agencia','int4');\n //Definicion de la lista del resultado del query\n $this->captura('id_agencia','int4');\n $this->captura('id_periodo_venta','int4');\n $this->captura('nombre','varchar');\n $this->captura('mes','varchar');\n $this->captura('fecha_ini','date');\n $this->captura('fecha_fin','date');\n $this->captura('credito','varchar');\n $this->captura('total_credito','numeric');\n $this->captura('debito','varchar');\n $this->captura('total_debito','numeric');\n $this->captura('saldo','numeric');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n // var_dump($this->respuesta);exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"function EstadoCuentaDes(){\n $this->procedimiento='obingresos.ft_periodo_venta_sel';\n $this->transaccion='OBING_AGTD_SEL';\n $this->tipo_procedimiento='SEL';//tipo de transaccion\n $this->setCount(false);\n $this->setParametro('id_agencia','id_agencia','int4');\n //Definicion de la lista del resultado del query\n $this->captura('fecha_ini','date');\n $this->captura('fecha_fin','date');\n $this->captura('titulo','varchar');\n $this->captura('mes','varchar');\n $this->captura('fecha','date');\n $this->captura('autorizacion__nro_deposito','varchar');\n $this->captura('id_periodo_venta','int4');\n $this->captura('monto_total','numeric');\n $this->captura('neto','numeric');\n $this->captura('monto','numeric');\n $this->captura('cierre_periodo','varchar');\n $this->captura('ajuste','varchar');\n $this->captura('tipo','varchar');\n $this->captura('transaccion','varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n // var_dump($this->respuesta);exit;\n //Devuelve la respuesta\n return $this->respuesta;\n }",
"public function getNominaEeua($id)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, f.formula,c.dias,e.tipo,a.idEmp, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then g.idCcos End as idCcos, # Centros de costos\n case a.horasCal when 0 then 0 \n when 1 then (c.dias*8) End as horas, 1, # Horas desrrollo\n case when e.valor=2 then \n case when e.tipo = 1 then a.valor else 0 End \n when e.valor=1 then 0 \n End as dev, # Devengado\n ( case when e.valor=2 then \n case when e.tipo = 2 then a.valor else 0 End \n when e.valor=1 then 0\n End ) / cal.valor as ded , # Deducido \n e.idFor, c.diasVac, hh.codigo as nitTer, c.diasVac \nfrom n_emp_conc a \ninner join n_nomina_e c on a.idEmp=c.idEmp \ninner join n_nomina d on d.id=c.idNom\ninner join n_conceptos e on e.id=a.idCon\ninner join n_formulas f on f.id=e.idFor\ninner join a_empleados g on g.id=c.idEmp\nleft join n_terceros_s h on h.id = e.idTer \nleft join n_terceros hh on hh.id = h.idTer \ninner join n_tip_calendario cal on cal.id = d.idCal \nWHERE not exists (SELECT null from n_nomina_e_d \nwhere c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=2 )\nand d.estado=0 and c.idNom='.$id.' and c.actVac = 0 ',Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }",
"public function setForAuteur()\n {\n //met à jour les proposition qui n'ont pas de base contrat et qui ne sont pas null\n /*PLUS BESOIN DE BASE CONTRAT\n \t\t$dbP = new Model_DbTable_Iste_proposition();\n \t\t$dbP->update(array(\"base_contrat\"=>null), \"base_contrat=''\");\n */\n\t \t//récupère les vente qui n'ont pas de royalty\n\t \t$sql = \"SELECT \n ac.id_auteurxcontrat, ac.id_livre\n , ac.id_isbn, ac.pc_papier, ac.pc_ebook\n , a.prenom, a.nom, c.type, IFNULL(a.taxe_uk,'oui') taxe_uk\n ,i.num\n , v.id_vente, v.date_vente, v.montant_livre, v.id_boutique, v.type typeVente\n , i.id_editeur, i.type typeISBN\n , impF.conversion_livre_euro\n FROM iste_vente v\n INNER JOIN iste_isbn i ON v.id_isbn = i.id_isbn \n INNER JOIN iste_importdata impD ON impD.id_importdata = v.id_importdata\n INNER JOIN iste_importfic impF ON impF.id_importfic = impD.id_importfic\n INNER JOIN iste_auteurxcontrat ac ON ac.id_isbn = v.id_isbn\n INNER JOIN iste_contrat c ON c.id_contrat = ac.id_contrat\n INNER JOIN iste_auteur a ON a.id_auteur = ac.id_auteur\n INNER JOIN iste_livre l ON l.id_livre = i.id_livre \n LEFT JOIN iste_royalty r ON r.id_vente = v.id_vente AND r.id_auteurxcontrat = ac.id_auteurxcontrat\n WHERE pc_papier is not null AND pc_ebook is not null AND pc_papier != 0 AND pc_ebook != 0\n AND r.id_royalty is null \";\n\n $stmt = $this->_db->query($sql);\n \n \t\t$rs = $stmt->fetchAll(); \n \t\t$arrResult = array();\n \t\tforeach ($rs as $r) {\n\t\t\t//calcule les royalties\n \t\t\t//$mtE = floatval($r[\"montant_euro\"]) / intval($r[\"nbA\"]);\n \t\t\t//$mtE *= floatval($r[\"pc_papier\"])/100;\n \t\t\tif($r[\"typeVente\"]==\"ebook\")$pc = $r[\"pc_ebook\"];\n \t\t\telse $pc = $r[\"pc_papier\"];\n $mtL = floatval($r[\"montant_livre\"])*floatval($pc)/100;\n //ATTENTION le taux de conversion est passé en paramètre à l'import et le montant des ventes est calculé à ce moment\n \t\t\t//$mtD = $mtL*floatval($r[\"taux_livre_dollar\"]);\n \t\t\t$mtE = $mtL*floatval($r['conversion_livre_euro']);\n //ajoute les royalties pour l'auteur et la vente\n //ATTENTION les taxes de déduction sont calculer lors de l'édition avec le taux de l'année en cours\n $dt = array(\"pourcentage\"=>$pc,\"id_vente\"=>$r[\"id_vente\"]\n ,\"id_auteurxcontrat\"=>$r[\"id_auteurxcontrat\"],\"montant_euro\"=>$mtE,\"montant_livre\"=>$mtL\n ,\"conversion_livre_euro\"=>$r['conversion_livre_euro']);\n\t \t\t$arrResult[]= $this->ajouter($dt\n ,true,true);\n //print_r($dt);\n \t\t}\n \t\t\n \t\treturn $arrResult;\n }",
"function buscar_comprobante_documento($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(prosic_detalle_comprobante.importe_soles*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)/prosic_tipo_cambio.compra_sunat) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }",
"public function tratarDados(){\r\n\t\r\n\t\r\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 query()\n {\n $insumo_query = Insumo::query();\n # OBRA\n $obra = Obra::find($this->request()->get('obra_id'));\n $insumos = $insumo_query->join('orcamentos', 'orcamentos.insumo_id', '=', 'insumos.id')\n ->where('orcamentos.obra_id', $this->request()->get('obra_id'))\n ->where('orcamentos.ativo', 1);\n\n // Verificar se existe OC aberta deste usuário ou se ele está editando alguma OC (SESSÃO)\n\n #dando prioridade a sessão\n $ordem = null;\n// \\Session::forget('ordemCompra');\n// \\Session::flush('ordemCompra');\n// dd(\\Session::get('ordemCompra'));\n if(\\Session::get('ordemCompra')){\n $ordem = OrdemDeCompra::where('id', \\Session::get('ordemCompra'))\n ->where('oc_status_id', 1)\n ->where('user_id', Auth::user()->id)\n ->where('obra_id', $obra->id)->first();\n }else {\n $ordem = OrdemDeCompra::where('oc_status_id', 1)\n ->where('user_id', Auth::user()->id)\n ->where('obra_id', $obra->id)->first();\n }\n\n $insumos->select(\n [\n 'insumos.id',\n 'insumos.codigo',\n 'insumos.nome',\n DB::raw(\"format(orcamentos.qtd_total,2,'de_DE') as qtd_total\"),\n DB::raw(\"CONCAT(insumos_sub.codigo,' - ' ,insumos_sub.nome) as substitui\"),\n 'orcamentos.id as orcamento_id',\n 'insumos.unidade_sigla',\n 'insumos.insumo_grupo_id',\n 'orcamentos.obra_id',\n 'orcamentos.grupo_id',\n 'orcamentos.subgrupo1_id',\n 'orcamentos.subgrupo2_id',\n 'orcamentos.subgrupo3_id',\n 'orcamentos.servico_id',\n 'orcamentos.preco_total',\n 'orcamentos.preco_unitario',\n 'orcamentos.insumo_incluido',\n 'orcamentos.orcamento_que_substitui',\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.grupo_id = grupos.id) AS tooltip_grupo'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo1_id = grupos.id) AS tooltip_subgrupo1'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo2_id = grupos.id) AS tooltip_subgrupo2'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n grupos\n WHERE\n orcamentos.subgrupo3_id = grupos.id) AS tooltip_subgrupo3'),\n DB::raw('(SELECT\n CONCAT(codigo, \\' - \\', nome)\n FROM\n servicos\n WHERE\n orcamentos.servico_id = servicos.id) AS tooltip_servico'),\n DB::raw('format((\n orcamentos.qtd_total \n -\n (\n IFNULL(\n (\n SELECT sum(ordem_de_compra_itens.qtd) FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = orcamentos.insumo_id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 1\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compra_itens.data_dispensa IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n ),0\n )\n )\n -\n (\n IFNULL(\n IFNULL(\n (\n SELECT sum(ordem_de_compra_itens.valor_total) FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE \n ordem_de_compra_itens.insumo_id in\n (\n SELECT \n insumo_id\n FROM\n orcamentos as OrcSub\n WHERE\n OrcSub.orcamento_que_substitui = orcamentos.id\n )\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 1\n )\n AND ordem_de_compra_itens.data_dispensa IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n ),0\n ),0\n \n / orcamentos.preco_unitario\n \n )\n )\n ),2,\\'de_DE\\') as saldo'),\n // Colocar a OC se existir em aberto ou em sessão\n DB::raw('format((\n SELECT ordem_de_compra_itens.qtd FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n ),2,\\'de_DE\\') as quantidade_compra'),\n DB::raw('format((\n SELECT ordem_de_compra_itens.qtd FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id ='. $obra->id .'\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n ),2,\\'de_DE\\') as quantidade_comprada'),\n DB::raw('(SELECT total FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.aprovado IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n AND ordem_de_compra_itens.obra_id ='. $obra->id .' ) as total'),\n DB::raw('(SELECT motivo_nao_finaliza_obra FROM ordem_de_compra_itens\n JOIN ordem_de_compras\n ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE ordem_de_compra_itens.insumo_id = insumos.id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (\n ordem_de_compra_itens.aprovado IS NULL\n OR\n ordem_de_compra_itens.aprovado = 0\n )\n AND ordem_de_compra_itens.aprovado IS NULL\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.oc_status_id = 1\n '.($ordem ? ' AND ordem_de_compras.id ='. $ordem->id .' ': 'AND ordem_de_compras.id = 0').'\n AND ordem_de_compra_itens.obra_id ='. $obra->id .' ) as motivo_nao_finaliza_obra'),\n ]\n )\n ->whereNotNull('orcamentos.qtd_total')\n ->where(DB::raw('IFNULL(\n (SELECT\n ordem_de_compras.oc_status_id\n FROM\n ordem_de_compra_itens\n JOIN\n ordem_de_compras ON ordem_de_compra_itens.ordem_de_compra_id = ordem_de_compras.id\n WHERE\n ordem_de_compra_itens.insumo_id = orcamentos.insumo_id\n AND ordem_de_compra_itens.grupo_id = orcamentos.grupo_id\n AND ordem_de_compra_itens.subgrupo1_id = orcamentos.subgrupo1_id\n AND ordem_de_compra_itens.subgrupo2_id = orcamentos.subgrupo2_id\n AND ordem_de_compra_itens.subgrupo3_id = orcamentos.subgrupo3_id\n AND ordem_de_compra_itens.servico_id = orcamentos.servico_id\n AND (ordem_de_compra_itens.aprovado IS NULL\n OR ordem_de_compra_itens.aprovado = 1)\n AND ordem_de_compra_itens.deleted_at IS NULL\n AND ordem_de_compras.obra_id = '. $obra->id .'\n AND ordem_de_compras.oc_status_id != 6\n AND ordem_de_compras.oc_status_id != 4\n AND orcamentos.orcamento_que_substitui IS NOT NULL\n LIMIT 1\n )\n , 1)'), 1)\n ->where('orcamentos.ativo', 1);\n\n $insumo_query->leftJoin(DB::raw('orcamentos orcamentos_sub'), 'orcamentos_sub.id', 'orcamentos.orcamento_que_substitui');\n //ex: left join insumos insumos_sub on `insumos_sub`.`id` = `orcamentos_sub`.`insumo_id` \n\t\t$insumo_query->leftJoin(DB::raw('insumos insumos_sub'), 'insumos_sub.id', 'orcamentos_sub.insumo_id');\n\t\t$insumo_query->leftJoin(DB::raw('carteira_insumos'), 'insumos.id', 'carteira_insumos.insumo_id');\n\t\t$insumo_query->leftJoin(DB::raw('carteiras'), 'carteiras.id', 'carteira_insumos.carteira_id');\n\n if ($this->request()->get('grupo_id')) {\n if (count($this->request()->get('grupo_id')) && $this->request()->get('grupo_id')[0] != \"\") {\n $insumo_query->where('orcamentos.grupo_id', $this->request()->get('grupo_id'));\n }\n }\n\n if($this->request()->get('subgrupo1_id')){\n if(count($this->request()->get('subgrupo1_id')) && $this->request()->get('subgrupo1_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo1_id', $this->request()->get('subgrupo1_id'));\n }\n }\n if($this->request()->get('subgrupo2_id')){\n if(count($this->request()->get('subgrupo2_id')) && $this->request()->get('subgrupo2_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo2_id', $this->request()->get('subgrupo2_id'));\n }\n }\n if($this->request()->get('subgrupo3_id')){\n if(count($this->request()->get('subgrupo3_id')) && $this->request()->get('subgrupo3_id')[0] != \"\") {\n $insumo_query->where('orcamentos.subgrupo3_id', $this->request()->get('subgrupo3_id'));\n }\n }\n if($this->request()->get('servico_id')){\n if(count($this->request()->get('servico_id')) && $this->request()->get('servico_id')[0] != \"\") {\n $insumo_query->where('orcamentos.servico_id', $this->request()->get('servico_id'));\n }\n }\n if($this->request()->get('planejamento_id')){\n if(count($this->request()->get('planejamento_id')) && $this->request()->get('planejamento_id')[0] != \"\") {\n $insumo_query->join('planejamento_compras', function ($join) {\n $join->on('planejamento_compras.grupo_id', 'orcamentos.grupo_id');\n $join->on('planejamento_compras.subgrupo1_id', 'orcamentos.subgrupo1_id');\n $join->on('planejamento_compras.subgrupo2_id', 'orcamentos.subgrupo2_id');\n $join->on('planejamento_compras.subgrupo3_id', 'orcamentos.subgrupo3_id');\n $join->on('planejamento_compras.servico_id', 'orcamentos.servico_id');\n $join->on('planejamento_compras.insumo_id', 'orcamentos.insumo_id');\n })\n ->where('planejamento_compras.planejamento_id', $this->request()->get('planejamento_id'))\n ->whereNull('planejamento_compras.deleted_at');\n }\n }\n\t\t\n if($this->request()->get('insumo_grupos_id')){\n if(count($this->request()->get('insumo_grupos_id')) && $this->request()->get('insumo_grupos_id')[0] != \"\") {\n $insumo_query->where('insumos.insumo_grupo_id', $this->request()->get('insumo_grupos_id'));\n }\n }\n\t\t\n\t\tif($this->request()->get('carteira_id')){\n if(count($this->request()->get('carteira_id')) && $this->request()->get('carteira_id')[0] != \"\") {\n $insumo_query->where('carteiras.id', $this->request()->get('carteira_id'));\n }\n }\n\n//\t\tif($this->request()->get('exibir_por_carteira')){\n// if(count($this->request()->get('exibir_por_carteira')) && $this->request()->get('exibir_por_carteira')[0] != \"\") {\n// $insumo_query->groupBy('carteiras.nome');\n// }\n// }\n\n Session::put(['query['.$this->request()->get('random').']' => $insumo_query->toSql(), 'bindings['.$this->request()->get('random').']' => $insumo_query->getBindings()]);\n\n return $this->applyScopes($insumo_query);\n }",
"public function colaboradores_obsoletos(){\n //where ((B.data_inserida-'$data') && (C.data_inserida-'$data') )>tempo_sem_atualizar\n return $this->db->query(\"select * from colaboradores A inner join competencias_colaboradores AS B on (A.id_colaborador=B.colaboradores_id_colaborador) join instituicao where status_colaborador=0 group by colaboradores_id_colaborador order by B.data_inserida \");\n }",
"public function getTable()\n {\n $contratos=Contrato::where('estado','activo')->get();\n $coleccion= collect([]);\n foreach($contratos as $contrato)\n {\n if($contrato->empresa_id==0)\n {\n $cliente=DB::table('clientes')->where('id',$contrato->cliente_id)->first();\n $coleccion->push(['id'=>$contrato->id,\n 'nombre_comercial'=>\"Vacio\",\n 'nombre'=>$cliente->nombre,\n 'fecha_inicio'=>$contrato->fecha_inicio,\n 'fecha_fin'=>$contrato->fecha_fin,\n 'pago_total'=>$contrato->pago_total,\n 'costo_contrato'=>$contrato->costo_contrato\n \n ]);\n \n }\n else{\n $empresa=DB::table('empresas')->where('id',$contrato->empresa_id)->first();\n if($contrato->cliente_id==0)\n {\n \n $coleccion->push(['id'=>$contrato->id,\n 'nombre_comercial'=>$empresa->nombre_comercial,\n 'nombre'=>\"Vacio\",\n 'fecha_inicio'=>$contrato->fecha_inicio,\n 'fecha_fin'=>$contrato->fecha_fin,\n 'pago_total'=>$contrato->pago_total,\n 'costo_contrato'=>$contrato->costo_contrato\n ]);\n \n }\n else{\n \n $cliente=DB::table('clientes')->where('id',$contrato->cliente_id)->first();\n $coleccion->push(['id'=>$contrato->id,\n 'nombre_comercial'=>$empresa->nombre_comercial,\n 'nombre'=>$cliente->nombre,\n 'fecha_inicio'=>$contrato->fecha_inicio,\n 'fecha_fin'=>$contrato->fecha_fin,\n 'pago_total'=>$contrato->pago_total,\n 'costo_contrato'=>$contrato->costo_contrato\n ]);\n }\n }\n \n \n }\n return DataTables::of($coleccion)->toJson();\n }",
"public function traerEmpleadoInfo($id)\n {\n if ($id == Auth()->user()->cz1_id_empleado || Gate::allows('isAdmin') ||\n Gate::allows('isRRHH') || Gate::allows('isSST')) {\n $empleado = Terceros_mm::select(\n 'cz9_nombre_familiar',\n 'cz9_nombre_contacto',\n 'cz9_tel_contacto',\n 'cz9_fecha_tpprueba',\n 'cz9_talla_uniforme',\n 'cz9_talla_calzado',\n 'cz9_fecha_vacuna',\n 'cz9_lugar_vacuna',\n 'cz9_fecha_vacuna_tifoidea',\n 'cz9_lugar_vacuna_tifoidea',\n 'cz9_fecha_vacuna_toxoide',\n 'cz9_lugar_vacuna_toxoide',\n 'cz9_reentrenamiento',\n 'cz9_mail_corp',\n 'cz9_tel_corp',\n 'cz9_cel_corp',\n 'cz9_fv_ta',\n 'cz9_fv_bpm',\n 'cz9_fv_md',\n 'cz9_fv_carne_vacunacion',\n 'cz9_fv_carne_alimentos',\n 'cz9_archivo_titulacion',\n 'cz9_archivo_vacunacion',\n 'cz9_id_vivienda'\n ,'c0780_descripcion',\n 'cz9_premios'\n\n\n\n\n )->join(\n 'dbo.t200_mm_terceros',\n 'dbo.t015_mm_contactos.f015_rowid',\n '=',\n 'dbo.t200_mm_terceros.f200_rowid_contacto'\n\n )->join(\n 'dbo.w0540_empleados',\n 'dbo.t200_mm_terceros.f200_rowid',\n '=',\n 'dbo.w0540_empleados.c0540_rowid_tercero'\n\n )->join(\n 'dbo.w0541_terceros_seleccion',\n 'dbo.w0540_empleados.c0540_rowid_prospecto',\n '=',\n 'dbo.w0541_terceros_seleccion.c0541_rowid'\n \n\n )\n ->leftjoin(\n 'w0780_gh01_clase_social',\n 'w0541_terceros_seleccion.c0541_rowid_clases_sociales',\n '=',\n 'w0780_gh01_clase_social.c0780_rowid'\n\n )\n ->join(\n 'dbo.w0550_contratos',\n 'dbo.w0540_empleados.c0540_rowid_tercero',\n '=',\n 'dbo.w0550_contratos.c0550_rowid_tercero'\n\n )->join(\n 'dbo.z9_empleados_info',\n 'dbo.w0540_empleados.c0540_rowid_tercero',\n '=',\n 'dbo.z9_empleados_info.cz9_id_empleado')\n ->where('dbo.t200_mm_terceros.f200_rowid', $id)\n ->first();\n\n return $empleado;\n }else{\n return redirect('/accces-denied'); \n } \n }",
"public function actionCreateDatos($id) {\n $traza = Traza::VerificarTraza($id); // verifica el guardado de la traza\n if ($traza != 2) {\n Generico::renderTraza($id); //renderiza a la traza\n }\n\n $model = Beneficiario::model()->findByPk($id);\n $estado = new Tblestado;\n $municipio = new Tblmunicipio;\n $parroquia = new Tblparroquia;\n $faovPromedio = ConsultaOracle::getFaov($id, 1); //consulta la funcion faov por id de persona, para mostrar el calculo de promedio\n $faovMensual = ConsultaOracle::getFaov($id, 2); //consulta la funcion faov por id de persona, para mostrar el calculo de ingreso mesual\n $model->ingreso_mensual = ($faovMensual) ? $faovMensual : '0.00';\n $model->ingreso_promedio_faov = ($faovPromedio) ? $faovPromedio : '0.00';\n\n// $consulta = UnidadFamiliar::model()->findByAttributes(array('beneficiario_id' => $id)); // consulta a Unidad Familiar por el id_beneficiario \n//\n// $sqlIngreso = \"select sum(ingreso_mensual) as ingreso from grupo_familiar where unidad_familiar_id=\".$consulta->id_unidad_familiar.\"\"; //consulta que suma cuanto es el ingreso de grupo familiar por id_beneficiario\n// $rowingreso = Yii::app()->db->createCommand($sqlIngreso)->queryRow();\n//// echo '<pre>'; var_dump($rowingreso); die(); \n// $consulta->ingreso_total_familiar=$rowingreso['ingreso']; //insert para unidad familiar ingreso_total_familiar\n// \n// $sqlFaov = \"select count(*) as faov from grupo_familiar where unidad_familiar_id=\".$consulta->id_unidad_familiar.\"\"; //consulta que suma cuantos cotizan en faov del grupo familiar por id_beneficiario\n// $rowFaov = Yii::app()->db->createCommand($sqlFaov)->queryRow();\n// \n// $consulta->total_personas_cotizando=$rowFaov['faov']; //insert para unidad familiar total de personas cotizando\n\n\n if (isset($_POST['Beneficiario']['parroquia_id'])) {\n $model->cedula = 'campo';\n $model->attributes = $_POST['Beneficiario'];\n $model->parroquia_id = $_POST['Beneficiario']['parroquia_id'];\n $model->urban_barrio = $_POST['Beneficiario']['urban_barrio'];\n $model->av_call_esq_carr = $_POST['Beneficiario']['av_call_esq_carr'];\n $model->zona = $_POST['Beneficiario']['zona'];\n $model->condicion_trabajo_id = $_POST['Beneficiario']['condicion_trabajo_id'];\n $model->fuente_ingreso_id = $_POST['Beneficiario']['fuente_ingreso_id'];\n $model->condicion_laboral = $_POST['Beneficiario']['condicion_laboral'];\n $model->sector_trabajo_id = $_POST['Beneficiario']['sector_trabajo_id'];\n $model->nombre_empresa = $_POST['Beneficiario']['nombre_empresa'];\n $model->direccion_empresa = $_POST['Beneficiario']['direccion_empresa'];\n $model->telefono_trabajo = $_POST['Beneficiario']['telefono_trabajo'];\n $model->gen_cargo_id = $_POST['Beneficiario']['gen_cargo_id'];\n $model->observacion = $_POST['Beneficiario']['observacion'];\n $model->estatus_beneficiario_id = 222;\n $model->usuario_id_actualizacion = Yii::app()->user->id;\n\n\n if ($model->save()) {\n\n $IdBeneficiarioTmp = $model->beneficiario_temporal_id;\n $n = BeneficiarioTemporal::model()->updateByPk($IdBeneficiarioTmp, array(\n 'estatus' => 79,\n 'usuario_id_actualizacion' => Yii::app()->user->id,\n 'fecha_actualizacion' => 'now()'\n ));\n\n $idtraza = Traza::ObtenerIdTraza($model->id_beneficiario); // pemite la busqueda de la id de la traza \n $delete = Traza::model()->findByPk($idtraza)->delete();\n\n $this->redirect(array('admin'));\n Yii::app()->end();\n }\n }\n\n $this->render('createDatos', array(\n 'model' => $model, 'municipio' => $municipio, 'estado' => $estado, 'parroquia' => $parroquia,\n ));\n }",
"public function CargarDatosProducto($producto_id)\n {\n $resultado = array();\n $arreglo_resultado = array();\n\n $entity = $this->getDoctrine()->getRepository('IcanBundle:Producto')\n ->find($producto_id);\n if ($entity != null) {\n\n $arreglo_resultado['nombre'] = $entity->getNombre();\n $arreglo_resultado['categoria'] = ($entity->getCategoria() != null) ? $entity->getCategoria()->getCategoriaId() : \"\";\n $arreglo_resultado['marca'] = ($entity->getMarca() != null) ? $entity->getMarca()->getMarcaId() : \"\";\n $arreglo_resultado['porciento'] = ($entity->getPorciento() != null) ? $entity->getPorciento()->getValor() : \"\";\n $arreglo_resultado['titulo'] = $entity->getTitulo();\n $arreglo_resultado['descripcion'] = $entity->getDescripcion();\n $arreglo_resultado['caracteristica'] = $entity->getCaracteristica();\n $arreglo_resultado['tags'] = $entity->getTags();\n $arreglo_resultado['stock'] = $entity->getStock();\n $arreglo_resultado['precio'] = $entity->getPrecio();\n $arreglo_resultado['precioEspecial'] = $entity->getPrecioEspecial();\n $arreglo_resultado['destacado'] = ($entity->getDestacado() == 1) ? true : false;\n $arreglo_resultado['estado'] = ($entity->getEstado() == 1) ? true : false;\n $arreglo_resultado['url'] = $entity->getUrl();\n $arreglo_resultado['ficha'] = $entity->getFicha();\n $arreglo_resultado['disponibilidadInmediata'] = ($entity->getDisponibilidadInmediata() == 1) ? true : false;\n $arreglo_resultado['formaPago'] = $entity->getFormaPago();\n $arreglo_resultado['terminoDespacho'] = $entity->getTerminoDespacho();\n\n $imagen = $entity->getImagen();\n\n $ruta = $this->ObtenerURL();\n $dir = 'uploads/productos/';\n $ruta = $ruta . $dir;\n\n $size = (is_file($dir . $imagen)) ? filesize($dir . $imagen) : 0;\n $arreglo_resultado['imagen'] = array($imagen, $size, $ruta);\n\n\n $fecha = $entity->getFechapublicacion();\n if ($fecha != \"\") {\n $fecha = $fecha->format('d/m/Y H:i');\n }\n $arreglo_resultado['fecha'] = $fecha;\n\n //Imagenes del producto\n $productoimagenes = $this->getDoctrine()->getRepository('IcanBundle:ProductoImagen')->ListarImagenes($producto_id);\n $imagenes = array();\n foreach ($productoimagenes as $productoimagen) {\n\n $imagen = $productoimagen->getImagen();\n $size = (is_file($dir . $imagen)) ? filesize($dir . $imagen) : 0;\n\n array_push($imagenes, array(\n 'imagen' => $imagen,\n 'size' => $size,\n 'ruta' => $ruta,\n 'valida' => true\n ));\n }\n $arreglo_resultado['imagenes'] = $imagenes;\n\n //Productos relacionados\n $relacionados = array();\n $productos = $this->getDoctrine()->getRepository('IcanBundle:ProductoRelacion')\n ->ListarRelacionados($producto_id);\n $posicion = 0;\n foreach ($productos as $key => $producto_relacion) {\n $producto = $producto_relacion->getProductoRelacion();\n if ($producto->getProductoId() != $producto_id) {\n array_push($relacionados, array(\n 'productorelacion_id' => $producto_relacion->getProductorelacionId(),\n 'producto_id' => $producto->getProductoId(),\n 'nombre' => $producto->getNombre(),\n \"categoria\" => ($producto->getCategoria() != null) ? $producto->getCategoria()->getNombre() : \"\",\n \"marca\" => ($producto->getMarca() != null) ? $producto->getMarca()->getNombre() : \"\",\n \"estado\" => ($producto->getEstado()) ? 1 : 0,\n \"imagen\" => $ruta . $producto->getImagen(),\n \"precio\" => number_format($producto->getPrecio(), 0, ',', '.'),\n \"fecha\" => $producto->getFechapublicacion() != \"\" ? $producto->getFechapublicacion()->format(\"d/m/Y H:i\") : \"\",\n \"views\" => $producto->getViews(),\n 'posicion' => $posicion\n ));\n $posicion++;\n }\n }\n $arreglo_resultado['relacionados'] = $relacionados;\n\n $resultado['success'] = true;\n $resultado['producto'] = $arreglo_resultado;\n }\n return $resultado;\n }",
"public function getIdOrdenCompra() {\n return $this->id_orden_compra;\n }",
"public function accionIndex(){\n \n if(!Sistema::app()->acceso()->hayUsuario()){\n Sistema::app()->paginaError(400,\"Solos los usuarios registrados pueden acceder\");\n exit;\n }\n\n //llega el pase de la pelicula\n $codPase = intval($_GET[\"id\"]);\n \n //obtener las entradas compradas para ese pase, esa pelicula y esa hora\n $entUsuarios = new Entradas_usuarios();\n $pasePelicula = new Pases_peliculas();\n $sala = new Salas();\n $asientos = new Asientos();\n $entAnonimos = new Entradas_anonimos();\n \n \n $pasePelicula->buscarPorId($codPase);//CONTROLAR QUE EXISTE.\n //CONTROLAR TAMBIEN SI HA CADUCADO.\n \n //obtengo la sala donde se proyecta ese pase\n $sala->buscarPorId($pasePelicula->cod_sala);\n \n \n $opFil[\"select\"] = \"cod_asiento, fila, columna\";\n $opFil[\"where\"] = \"t.cod_sala =\".$pasePelicula->cod_sala;\n $opFil[\"order by\"] = \"fila, columna\";\n \n $totalAsientos = $asientos->buscarTodos($opFil);\n \n //tengo todos las entradas para ese pase.\n $opFiltrado[\"where\"] = \"t.cod_pase_pelicula = \".$codPase;\n $entradasUsu = $entUsuarios->buscarTodos($opFiltrado);\n $entradasAnon = $entAnonimos->buscarTodos($opFiltrado);\n \n $filas = $sala->n_filas;\n $columnas = $sala->n_columnas;\n $capacidad = $sala->capacidad;\n \n \n $asientosOcupados = [];\n \n //Si no hay entradas compreadas para este pase, no se ejecuta ---\n \n if(!empty($entradasUsu)||!empty($entradasAnon)){\n $asientosOcupados = $this->asientosOcupados($entradasUsu, $entradasAnon);\n }\n \n //if(!empty($entradasAnonimos)){\n // $asientosOcupados2 = $this->asientosOcupados($entradasAnonimos);\n // var_dump($asientosOcupados2);\n //}\n \n if(isset($_POST[\"butacas\"])){\n \n //llega el imput que almacena en un string creado en js\n //con un string con todos los asientos seleccionados\n $asientosSel = explode(\",\", $_POST[\"butacas\"]);\n \n Sistema::app()->sesion()->set(\"butacas\",$asientosSel);\n Sistema::app()->sesion()->set(\"codPase\",$codPase);\n \n Sistema::app()->irAPagina(array(\"entradasUsuarios\",\"mostrarResumen\"));\n exit;\n }\n \n \n $this->dibujaVista(\"mostrarCine\",array(\"asientosOcupados\"=>$asientosOcupados,\n \"filas\"=>$filas,\n \"cols\"=>$columnas,\n \"codPase\"=>$codPase,\n \"codAsientos\"=>$totalAsientos\n ),\n \"CINES MELERO\");\n \n \n \n }",
"public function datos()\n {\n return $this->hasOne('App\\Models\\Dato', 'empleados_id');\n }",
"public function SalasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM salas LEFT JOIN mesas ON salas.codsala = mesas.codsala where salas.codsala = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codsala\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function obtenirSortieAction($id,Request $request) {\n \n if ($request->getSession()->get('email') == null) {\n return $this->pageErreur(\"Vous devez être connecté pour accèder à ce lien\");\n }\n $em = $this->getDoctrine()->getManager();\n $activite = $em->getRepository('SC\\ActiviteBundle\\Entity\\Activite')->find($id);\n \n if(is_null($activite)) {\n return $this->pageErreur(\"activite inconnue\");\n }\n \n $saison = new Saison;\n $year = $saison->connaitreSaison();\n $defaultData = array('message' => 'Type your message here');\n\n $form = $this->createFormBuilder($defaultData)\n ->add('sortie', 'entity', array('class'=> 'SC\\ActiviteBundle\\Entity\\Sortie','multiple' => false,'expanded' => false,'required' => true, 'query_builder' => function (SortieRepository $repository) use ($id,$year) { return $repository-> \n getSortie($id,$year); }))\n ->add('valider','submit') \n ->getForm();\n $form->handleRequest($request);\n if ($form->isValid()){\n $data = $form->getData();\n $sortie = $data['sortie'];\n //$inscrits = $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')->findBy(array('idActivite' => $id,'saison' => $year,'lieu' => $sortie->getLieu()->getNomLieu(), 'dateSortie' => $sortie->getDateSortie()));\n $inscrits = $em->getRepository('SC\\ActiviteBundle\\Entity\\InscriptionSortie')->getGroupe($id,$year/*,$sortie->getLieu()->getNomLieu()*/,$sortie->getDateSortie());\n // on fait le total des participants\n $total = 0; $conf = 0; $notConf = 0;\n foreach ($inscrits as $inscrit) {\n $total = $total + 1;\n if ($inscrit['participation'] == 1) {\n $conf = $conf + 1;\n }\n else {\n $notConf = $notConf + 1; \n }\n \n }\n return $this->render('SCActiviteBundle:Sortie:inscritSortie.html.twig', array('activite'=> $activite, 'inscrits' => $inscrits,'saison' => $year, 'sortie' => $sortie, 'total' => $total, 'conf' => $conf, 'notConf'=> $notConf ));\n }\n \n return $this->render('SCActiviteBundle:Sortie:ListSorties.html.twig', array('form' => $form->createView(),'activite'=> $activite,'saison' => $year )); \n \n }",
"public function get_datos_ventas_cobros_contado($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select c.n_factura,c.fecha_ingreso,c.n_recibo,c.paciente,u.usuario,c.total_factura,c.forma_cobro,c.monto_cobrado,c.saldo_credito,c.abonos_realizados from\ncorte_diario as c inner join usuarios as u on u.id_usuario=c.id_usuario where c.fecha_ingreso like ? and c.abonos_realizados='0' and c.tipo_venta='Contado' AND tipo_ingreso='Venta' and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"function Cuerpo($acceso,$id_contrato)\n\t{\n\t\t//echo \"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"SELECT tarifa_ser FROM vista_tarifa where id_serv='BM00001'\");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$costo_inst=utf8_decode(trim($row['tarifa_ser']));\n\t\t}\n\t\t//echo \"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\";\n\t\t$acceso->objeto->ejecutarSql(\"update contrato set contrato_imp='SI' where id_contrato='$id_contrato'\");\n\t\t$acceso->objeto->ejecutarSql(\"SELECT *FROM vista_contrato where id_contrato='$id_contrato'\");\n\t\tif($row=row($acceso)){\n\t\t\n\t\t\t$observacion=utf8_decode(trim($row['observacion']));\n\t\t\t$costo_contrato=utf8_decode(trim($row['costo_contrato']));\n\t\t\t$tipo_cliente=utf8_decode(trim($row['tipo_cliente']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombrecli']));\n\t\t\t$apellidocli=utf8_decode(trim($row['apellido']));\n\t\t\t$nombrecli=utf8_decode(trim($row['nombre']));\n\t\t\t$etiqueta=utf8_decode(trim($row['etiqueta']));\n\t\t\t$cedulacli=utf8_decode(trim($row['cedula']));\n\t\t\t\n\t\t\t$fecha=formatofecha(trim($row[\"fecha_contrato\"]));\n\t\t\t$fecha_nac=formatofecha(trim($row[\"fecha_nac\"]));\n\t\t\t\n\t\t\t\n\t\t\t$nro_contrato=trim($row['nro_contrato']);\n\t\t\t$id_contrato=trim($row['id_contrato']);\n\t\t\n\t\t\n\t\t\t$puntos=utf8_decode(trim($row['puntos']));\n\t\t\t$deuda=utf8_decode(trim($row['deuda']));\n\t\t\tif($deuda==\"\"){\n\t\t\t\t$deuda=0;\n\t\t\t}\n\t\t\t\n\t\t\t$deuda=number_format($deuda, 2, ',', '.');\n\t\t\t$nombre_zona=utf8_decode(trim($row['nombre_zona']));\n\t\t\t$nombre_sector=utf8_decode(trim($row['nombre_sector']));\n\t\t\t$nombre_calle=utf8_decode(trim($row['nombre_calle']));\n\t\t\t$numero_casa=utf8_decode(trim($row['numero_casa']));\n\t\t\t$telefono=utf8_decode(trim($row['telefono']));\n\t\t\t$telf_casa=utf8_decode(trim($row['telf_casa']));\n\t\t\t$telf_adic=utf8_decode(trim($row['telf_adic']));\n\t\t\t$email=utf8_decode(trim($row['email']));\n\t\t\t$direc_adicional=utf8_decode(trim($row['direc_adicional']));\n\t\t\t$id_persona=utf8_decode(trim($row['id_persona']));\n\t\t\t$postel=utf8_decode(trim($row['postel']));\n\t\t\t$taps=utf8_decode(trim($row['taps']));\n\t\t\t$pto=utf8_decode(trim($row['pto']));\n\t\t\t$edificio=utf8_decode(trim($row['edificio']));\n\t\t\t$numero_piso=utf8_decode(trim($row['numero_piso']));\n\t\t}\n\t\t$acceso->objeto->ejecutarSql(\"SELECT nombre,apellido FROM persona where id_persona='$id_persona' LIMIT 1 offset 0 \");\n\t\t\n\t\tif($row=row($acceso)){\n\t\t\t$vendedor=utf8_decode(trim($row['nombre'])).\" \".utf8_decode(trim($row['apellido']));\n\t\t\t\n\t\t}\n\n\t\tif($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}\n\t\t\n\t\t\n\t\t$this->Ln();\t\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetXY(10,35);\t\t\n\t\t$this->Cell(195,10,\"Abonado: $nro_contrato\",\"0\",0,\"R\");\t\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t$this->SetXY(40,50);\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA JURIDICA.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Razón Social.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Actividad.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail.\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Telef.\",\"1\",0,\"J\");\n\t\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Representante Legal\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cargo en la Empresa.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PERSONA NATURAL.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: $nombrecli $apellidocli\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: $fecha_nac\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ingreso Mensual: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Deposito en Garantia: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Tipo Vivienda: Propia ___ Alquilado ___ Canon Mensual: ____\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(65,6,\"Vencimiento del Contrato: / / \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DATOS DEL CONYUGUE.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Apellidos y Nombres: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Cédula: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Fecha de Nac: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Profesión u Oficio: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: \",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Ingreso Mensual.\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"DOMICILIO DEL SERVICIO\",\"1\",0,\"C\");\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Apellidos: $apellidocli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Vendedor: $vendedor\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Suscriptor Nº: $nro_contrato\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha: $fecha\",\"1\",0,\"J\");*/\n\t\t\t\t\n\t\n\t\t/*if($tipo_cliente=='JURIDICO'){\n\t\t\t$rif=$cedulacli;\n\t\t\t$cedulacli='';\n\t\t}*/\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"C.I. $cedulacli\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"RIF. $rif\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Ocupación: \",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Grupo Familiar Nº:\",\"1\",0,\"J\");\n\t\tif($fecha_nac=='11/11/1111'){\n\t\t\t$fecha_nac='';\n\t\t}\n\t\t$this->Cell(65,6,\"Fecha de Nacimiento : $fecha_nac\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"DOMICILIO DE SERVICIO\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb o Sector: $nombre_sector\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Calle n°: \",\"1\",0,\"J\");\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Avenida o Calle: $nombre_calle\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(97,6,\"Vereda : \",\"1\",0,\"J\");\t\t\n\t\t\n\t\tif($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Piso:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"N° de Casa o Apto: $numero_casa $apto\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(130,6,\"Referencia o Zona: $nombre_zona N°Poste:$postel\",\"1\",0,\"J\");\n\t\t//$this->Cell(65,6,\"N° de Poste: $postel\",\"0\",0,\"J\");\n\t\t$this->Cell(65,6,\"Ruta Cuenta: \",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Zona: $nombre_zona\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Manzana: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Urb.: $nombre_sector\",\"1\",0,\"J\");*/\n\t\t\n\t\t/*if($edificio!='')\n\t\t\t$apto=$numero_casa;\n\t\t\n\t\t$this->Cell(97,6,\"Apto.: $apto\",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"Edificio: $edificio\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Cod. Postal: \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Telf. Hab: $telf_casa\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Celular: $telefono\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Telef Ofic: $telf_adic\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t//Rect( float x, float y, float w, float h [, string style])\n\t\t$this->Cell(98,6,\"Vivienda Alquilada: SI ____ NO ____\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Fecha de Vencimineto de Alquiler: \",\"1\",0,\"J\");\n\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"E-mail: $email\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"Proveedor de Internet: \",\"1\",0,\"J\");*/\n\t\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','B',12);\n\t\t$this->SetX(10);\n\t\t$this->SetFillColor(76,136,206);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"SERVICIOS CONTRATADOS\",\"1\",0,\"C\");\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"SERVICIOS \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,6,\"CANT.\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"P. UNITARIO \",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"P. TOTAL \",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Instalación Principal\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"1\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Tomas Adicionales\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Cable Coaxial\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Conectores\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\"Espliter\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(30,5,\"\",\"1\",0,\"C\");\n\t\t$this->Cell(35,5,\"\",\"1\",0,\"C\");\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,5,\" \",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(60,5,\"TOTAL A PAGAR BS\",\"1\",0,\"R\");\n\t\t$this->Cell(35,5,\"$costo_inst\",\"1\",0,\"C\");\n\t\n\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"FECHA ESTIMADA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"HORA\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRT\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"TOTAL A\",\"LRT\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"$costo_contrato\",\"LRT\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(50,5,\"DE INSTALACION\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(25,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(25,5,\"SUGERIDA\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(30,5,\"\",\"LRB\",0,\"C\");\n\t\t$this->SetTextColor(255,255,255);\n\t\t$this->Cell(30,5,\"PAGAR Bs.\",\"LRB\",0,\"C\",'1');\n\t\t$this->SetTextColor(0,0,0);\n\t\t$this->Cell(35,5,\"\",\"LRB\",0,\"C\");*/\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','B',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"PROGRAMACIÓN\",\"1\",0,\"C\");\t\t\t\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Descripción.\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Descripción\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\"Monto\",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\"Firma Abonado\",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Familiar Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Extendido Bs \",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Premium I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(45,6,\"Paquete Adulto Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(40,6,\"Paquete Comercial I Bs\",\"1\",0,\"C\");\n\t\t$this->Cell(25,6,\" \",\"1\",0,\"C\");\n\t\t$this->Cell(30,6,\" \",\"1\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Monto de Contrato: Bs. $costo_inst\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Firma del Abonado:_________________________ \",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(100,6,\"Puntos Adicionales:_________________________\",\"1\",0,\"J\");\t\t\n\t\t$this->Cell(95,6,\"Costo Punto Adicional:_______________________\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Tiempo de Instalación:\",\"1\",0,\"J\");\n\t\t$this->Cell(65,6,\"Total a Cancelar Mensual:\",\"1\",0,\"J\");\n\t\t$this->Cell(30,6,\"Total:\",\"1\",0,\"J\");\n\t\t$this->Cell(35,6,\"Contrato:\",\"1\",0,\"J\");\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',11);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"Observaciones.\",\"1\",0,\"J\");\n\t\t\t\t\t\t\n\t\t\n\t\t/*$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(195,6,\"$observacion\",\"1\",0,\"J\");*/\n\t\t\n\t/*\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(98,6,\"RECIBO DE PAGO\",\"1\",0,\"J\");\n\t\t$this->Cell(97,6,\"*EL PRECIO INCLUYE EL IMPUESTO DE LEY\",\"1\",0,\"J\");\n\t\t\n\t\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Efectivo\",\"1\",0,\"C\");\n\t\t$this->Cell(35,6,\"Cheque\",\"1\",0,\"C\");\n\t\t$this->Cell(65,6,\"Cargo Cta. Cte.\",\"1\",0,\"C\");\n\t\t$this->Cell(60,6,\"Tarjeta de Credito:\",\"1\",0,\"C\");\n\t\t\n\t\n\t\t$this->Ln();\n\t\t$this->SetFont('times','',12);\n\t\t$this->SetX(10);\n\t\t$this->Cell(35,6,\"Bs. $costo_contrato\",\"1\",0,\"L\");\n\t\t$this->Cell(35,6,\"Nº.\",\"1\",0,\"L\");\n\t\t$this->Cell(65,6,\"Cta. Nº Bco.\",\"1\",0,\"L\");\n\t\t$this->Cell(60,6,\"Nombre:\",\"1\",0,\"L\");\n\t\t\n\t\n\t\t\n\t\t\n\t\t$this->Ln(15);\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Nota:\",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"En caso de que el televisor no acepte la señal de todos los canales del cable, es posible que amerite la instalación de un amplificador de sintonia, el cual deberá ser adquirido por el SUSCRIPTOR\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Atención: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"La Empresa. No autoriza el retiro de televisores y/o VHS por el personal de la empresa. El SUSCRIPTOR conoce y acepta las condiciones del contrato del servicio que apacen al dorso del presente\",\"0\",\"J\");\n\t\t\n\t\t$this->SetFont('times','',9);\n\t\t$this->SetX(10);\n\t\t$this->Cell(13,5,\"Aviso: \",\"0\",0,\"L\");\n\t\t$this->MultiCell(164,5,\"Se le informa a todos los suscriptores y publico en general de acuerdo a la Ley Orgánica de Telecomunicaciones, en el Artículo 189, Literal 2: será penado con prisión de uno (1) a cuatro (4) años, el que utilizando equipos o tecnologías de cualquier tipo, proporciones a un tercero el acceso o disfrute en forma fraudulenta o indebida de un serbicio o facilidad de telecomunicaciones \",\"0\",\"J\");\n\t\t\n\t\t\n\t\t\n\t\t$this->Ln(10);\n\t\t$this->SetFont('times','',10);\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,5,\"________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"_________________________________\",\"0\",0,\"C\");\n\t\t$this->Cell(65,5,\"__________________________\",\"0\",0,\"C\");\n\t\t\n\t\t$this->Ln();\n\t\t\n\t\t$this->SetX(10);\n\t\t$this->Cell(65,6,\"Firma del Vendedor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Nombre y Apellido del Suscriptor\",\"0\",0,\"C\");\n\t\t$this->Cell(65,6,\"Firma del Suscriptor\",\"0\",0,\"C\");*/\n\t\t\n\t\t/*$this->Ln(4);\n\t\t\n\t\t$this->SetDrawColor(76,136,206);\n\t\t$this->SetLineWidth(.4);\n\t\t$this->SetFont('times','I',12);\n\t\t$this->SetX(10);\n\t\t$this->MultiCell(195,5,'Av. Perimetral, Centro Comercial Residencial Central. P.B. Local Nº 07. Cúa, Edo. Miranda.\[email protected] / [email protected]',\"TB\",\"C\");*/\n\t\t\n\t\t//$this->clausulas();\n\t\t\n\t\treturn $cad;\n\t}",
"function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }",
"function get_entradas_marcas_list($id) {\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, prf.monto_total as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatus,e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and prf.cmarca_id='$id'\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id, e.lote_id , cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc\";\n\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}",
"function rellenaDatos(){\n\n $stmt = $this->db->prepare(\"SELECT *\n\t\t\t\t\tFROM centro\n\t\t\t\t\tWHERE centro_id = ?\");\n\n $stmt->execute(array($this->centro_id));\n $centro = $stmt->fetch(PDO::FETCH_ASSOC);\n if($centro != null){\n\n return new CENTRO_Model($centro[\"centro_id\"], $centro[\"nombre_centro\"], $centro[\"edificio_centro\"]);\n\n }else{\n return 'Error inesperado al intentar cumplir su solicitud de consulta';\n }\n }",
"function contratos_por_estado($id_estado){\n $sql =\n \"SELECT\n c.Numero,\n c.Objeto,\n c.Lugar,\n c.Valor_Inicial,\n c.Acta_Inicio,\n c.Fecha_Acta_Inicio,\n c.Plazo,\n c.Fecha_Vencimiento,\n c.Fecha_Inicial,\n t.Nombre AS Contratista,\n e.Estado \n FROM\n contratos AS c\n INNER JOIN tbl_terceros AS t ON c.Fk_Id_Terceros = t.Pk_Id_Terceros\n INNER JOIN tbl_estados AS e ON c.Fk_Id_Estado = e.Pk_Id_Estado \n WHERE\n c.Fk_Id_Estado = $id_estado \n AND c.Fk_Id_Proyecto = {$this->session->userdata('Fk_Id_Proyecto')} \n ORDER BY\n c.Numero ASC\";\n \n //Se retorna la consulta\n return $this->db->query($sql)->result();\n }",
"public function get_cite_comunicacion_interna(){\r\n //Tomamos los datos de la persona logueada\r\n $usuario_logueado = $this->datos_persona_logueada();\r\n foreach ($usuario_logueado as $usuario) {\r\n $persona_origen = $usuario->nombres.\" \".$usuario->paterno.\" \".$usuario->materno;\r\n $id_cargo_origen = $usuario->id_cargo;\r\n $cargo_origen = $usuario->descripcion_del_cargo;\r\n $sigla_origen = $usuario->sigla_del_area;\r\n $id_nivel_jerarquico_origen = $usuario->id_nivel_jerarquico;\r\n $id_area_origen = $usuario->id_area;\r\n $unidad_origen = $usuario->unidad;\r\n $id_direccion_origen = $usuario->id_direccion;\r\n $id_entidad_origen = $usuario->id_entidad;\r\n $id_servidor_publico_origen = $usuario->id_servidor_publico;\r\n }\r\n\r\n //Tomamos el año en curso\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Tomamos el correlativo para el cite\r\n $correlativo_cite = \\DB::table('chasqui_correlativos')\r\n ->where('id_area', $id_area_origen)\r\n ->where('id_tipo_documento', 1)\r\n ->where('gestion', $año)\r\n ->value('correlativo');\r\n\r\n //Si no existe el registro para el correlativo, lo creamos\r\n if ($correlativo_cite < 1) {\r\n //Tomamos el año (nuevamente por que se pierde)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Creamos el registro\r\n \\DB::table('chasqui_correlativos')->insert([\r\n ['id_area' => $id_area_origen,\r\n 'id_tipo_documento' => 1,\r\n 'correlativo' => 1,\r\n 'gestion' => $año]\r\n ]);\r\n //Establecemos el $correlativo_cite en 1\r\n $correlativo_cite = 1;\r\n }\r\n\r\n //Tomamos las siglas de unidad, direccion y ministerio para formar el cite segun sus dependencias\r\n $sigla_entidad = \\DB::table('areas')\r\n ->where('id_entidad', $id_entidad_origen)\r\n ->where('id_direccion', 0)\r\n ->where('unidad', 0)\r\n ->value('sigla');\r\n\r\n //Verificamos si tiene direccion, si es 0, signigica que depende de despacho\r\n if ($id_direccion_origen == 0) {\r\n //Tomamos el año (nuevamente por que se pierde y genera conflicto)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //Verificamos si es una unidad dependiente de despacho\r\n if ($unidad_origen != 0) {\r\n // Si es una unidad dependiente de despacho, tomamos la sigla de la unidad\r\n $sigla_unidad = \\DB::table('areas')\r\n ->where('id_area', $id_area_origen)\r\n ->value('sigla');\r\n //Aramamos el cite como una unidad dependiente de despacho\r\n $cite = $sigla_entidad.\"-\".$sigla_unidad.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n else {\r\n //Aramamos el cite como un cargo dependiente de despacho\r\n $cite = $sigla_entidad.\"-DESP-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n }\r\n else {\r\n //Tomamos el año (nuevamente por que se pierde y genera conflicto)\r\n $date = new Carbon();\r\n $hoy = Carbon::now();\r\n $año = $hoy->format('Y');\r\n\r\n //En caso que tenga direccion, tomamos la sigla\r\n $sigla_direccion = \\DB::table('areas')\r\n ->where('id_entidad', $id_entidad_origen)\r\n ->where('id_direccion', $id_direccion_origen)\r\n ->where('unidad', 0)\r\n ->value('sigla');\r\n //Verificamos si tiene unidad, si es 0 significa que depende de la direccion\r\n if ($unidad_origen == 0) {\r\n //Aramamos el cite como direccion\r\n $cite = $sigla_entidad.\"-\".$sigla_direccion.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n else {\r\n //En caso que si tenga unidad, tomamos la sigla\r\n $sigla_unidad = \\DB::table('areas')\r\n ->where('id_area', $id_area_origen)\r\n ->value('sigla');\r\n //Aramamos el cite como unidad\r\n $cite = $sigla_entidad.\"-\".$sigla_direccion.\"-\".$sigla_unidad.\"-CI Nº \".$correlativo_cite.\"/\".$año;\r\n }\r\n }\r\n\r\n //Devolvemos el cite generado\r\n return $cite;\r\n }",
"function buscar_comprobante_doc_venta($id_cuenta, $id_anexo, $id_serie, $id_numero ) {\n $sql = \"SELECT\n\t\t\t\t\t prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles,prosic_detalle_comprobante.importe_dolares*prosic_tipo_cambio.venta_financiero)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_soles\n\t\t\t\t\t, sum(if(prosic_moneda.id_moneda=1,prosic_detalle_comprobante.importe_soles*prosic_tipo_cambio.venta_financiero,prosic_detalle_comprobante.importe_dolares)*if(prosic_detalle_comprobante.cargar_abonar='A',1,-1)) as importe_dolares\n\t\t\t\tFROM prosic_detalle_comprobante\n\t\t\t\tINNER JOIN prosic_plan_contable ON prosic_detalle_comprobante.id_plan_contable=prosic_plan_contable.id_plan_contable\n\t\t\t\tINNER JOIN prosic_anexo ON prosic_detalle_comprobante.id_anexo = prosic_anexo.id_anexo\n\t\t\t\tINNER JOIN prosic_moneda ON prosic_detalle_comprobante.id_moneda = prosic_moneda.id_moneda\n\t\t\t\tLEFT JOIN prosic_tipo_cambio ON prosic_detalle_comprobante.fecha_doc_comprobante=prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\tWHERE 1=1 \";\n\t\t\t\tif ($id_cuenta != '')$sql.=\" AND prosic_plan_contable.cuenta_plan_contable LIKE '%\" . $id_cuenta . \"%'\";\n if ($id_anexo != '')$sql.=\" AND prosic_anexo.codigo_anexo LIKE '%\" . $id_anexo . \"%'\";\n if ($id_numero != '')$sql.=\" AND prosic_detalle_comprobante.nro_doc_comprobante LIKE '%\" . $id_numero . \"%'\";\n\t\t\t$sql.=\" group by prosic_plan_contable.id_plan_contable\n\t\t\t\t\t, prosic_plan_contable.cuenta_plan_contable\n\t\t\t\t\t, prosic_anexo.codigo_anexo\n\t\t\t\t\t, prosic_anexo.descripcion_anexo\n\t\t\t\t\t, prosic_detalle_comprobante.id_tipo_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.ser_doc_comprobante\n\t\t\t\t\t, prosic_detalle_comprobante.nro_doc_comprobante\n\t\t\t\t\t, prosic_moneda.id_moneda\n\t\t\t\t\t, prosic_detalle_comprobante.fecha_doc_comprobante\n\t\t\t\t\t, prosic_tipo_cambio.fecha_tipo_cambio\n\t\t\t\t\thaving importe_soles>0\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }",
"public function get_detalle_proveedor($numero_compra){\n\n $conectar=parent::conexion();\n parent::set_names();\n\n $sql=\"select c.fecha_compra,c.numero_compra, c.proveedor, c.cedula_proveedor,c.total,p.id_proveedor,p.cedula,p.razon_social,p.telefono,p.correo,p.direccion,p.fecha,p.estado\n from compras as c, proveedor as p\n where \n \n c.cedula_proveedor=p.cedula\n and\n c.numero_compra=?\n \n ;\";\n\n //echo $sql; exit();\n\n $sql=$conectar->prepare($sql);\n \n\n $sql->bindValue(1,$numero_compra);\n $sql->execute();\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\n\n \n \n }",
"public static function agregarDetallesModel($id, $tabla, $datos){\n\t\t\t$sql = Conexion::conectar()->prepare(\"INSERT INTO $tabla(id, id_producto, id_venta, nombre, cantidad, precio) VALUES (NULL,:producto, :venta, :nombre, :cantidad, :precio)\");\n\n\t\t\t$sql2 = Conexion::conectar()->prepare(\"UPDATE productos SET stock = stock-:stock WHERE id_producto=:producto\");\n\n\n\t\t\t$sql3 = Conexion::conectar()->prepare(\"INSERT INTO historial(id_historial, id_producto, id_usuario, id_tienda, fecha, nota, referencia, cantidad) VALUES(NULL, :producto, :usuario, :tienda, :fecha, :nota, :referencia, :cantidad)\");\n\n\t\t\tforeach ($_SESSION[\"carrito\"] as $producto) {\n\t\t\t\t$sql->bindParam(\":producto\", $producto->id_producto, PDO::PARAM_INT);\n\t\t\t\t$sql->bindParam(\":venta\", $id, PDO::PARAM_INT);\n\t\t\t\t$sql->bindParam(\":nombre\", $producto->nombre, PDO::PARAM_STR);\t\n\t\t\t\t$sql->bindParam(\":cantidad\", $producto->cantidad, PDO::PARAM_INT);\n\t\t\t\t$sql->bindParam(\":precio\", $producto->precio, PDO::PARAM_STR);\t\n\n\t\t\t\t$sql->execute();\n\n\t\t\t\t$sql2->bindParam(\":stock\", $producto->cantidad, PDO::PARAM_INT);\n\t\t\t\t$sql2->bindParam(\":producto\", $producto->id_producto, PDO::PARAM_INT);\n\t\t\t\t$sql2->execute();\n\n\t\t\t\t$nota = \"Venta del producto\";\n\t\t\t\t$referencia = \"000$datos[usuario]$producto->cantidad$producto->id_producto\";\n\t\t\t\t\n\t\t\t\t$sql3->bindParam(\":producto\", $producto->id_producto, PDO::PARAM_INT);\n\t\t\t\t$sql3->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_INT);\n\t\t\t\t$sql3->bindParam(\":tienda\", $datos[\"tienda\"], PDO::PARAM_INT);\t\n\t\t\t\t$sql3->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_INT);\n\t\t\t\t$sql3->bindParam(\":nota\", $nota, PDO::PARAM_STR);\t\n\t\t\t\t$sql3->bindParam(\":referencia\", $referencia, PDO::PARAM_STR);\n\t\t\t\t$sql3->bindParam(\":cantidad\", $producto->cantidad, PDO::PARAM_STR);\n\t\t\t\t$sql3->execute();\n\t\t\t}\n\n\t\t\treturn \"success\";\n\t\t}",
"public function validarInsumos($id)\n {\n $orden = OrdenHistorico::where('id',$id)->with('detalles','detalles.unidad_medida','planificacion')->first();\n\n if (!$orden){\n return response()->error(\"La orden de compra no existe\");\n }\n\n $_insumos = [];\n\n //almaceno los id de los insumos de OC en un array\n foreach ($orden->detalles->toArray() as $o){\n $_insumos[] = $o['insumo_id'];\n }\n\n //ubico las bodegas perteneciente al centro de produccion\n $bodegas = $this->bodegasPertenecenACentro($orden->planificacion->centro_id);\n\n //Obtengo el detalle de la orden\n $insumos = OrdenDetalleHistorico::with([\n 'insumo' => function($q){ $q->select('id','nombre'); },\n 'unidad_medida' => function($q){ $q->select('id','nombre'); }\n\n ])\n ->where('orden_historico_id',$id)\n ->whereIn('insumo_id',$_insumos)\n ->get(['insumo_id','unidad','precio_unitario','cantidad','total']);\n\n\n //anexo existencia_id (si hay existencia) a cada insumo de OC para que se pueda hacer SHOW en la existencia\n foreach ($insumos as $i){\n\n $stock = $this->existenciaNoBodegas($bodegas,$i->insumo_id);\n \n if (count($stock) > 0){\n $i->existencia = true;\n }else{\n $i->existencia = false;\n }\n }\n \n $data = array ();\n $data[\"insumos\"] = $insumos;\n $data[\"orden\"] = $orden;\n $data[\"centro\"] = $orden->planificacion->centro->id;\n\n // $insumos = array_add($insumos,'centro',$orden->planificacion->centro->id);\n\n return response()->success(compact('data'));\n }",
"public function autoLlenarAlumno($id){\n $alumno=Alumnos::find($id);\n $notasNivel=NivelesHasAnios::with(['materias_has_niveles'=>function($query){\n $query->with(['materias','materias_has_periodos'=>function($query){\n $query->with(['periodos','indicadores.tipo_nota.notas']);\n }]);\n }])\n ->find($alumno->niveles_has_anios_id);\n $resultado=[];\n if ($notasNivel->materias_has_niveles->count()>0) {\n foreach ($notasNivel->materias_has_niveles as $materia) {\n // en cada materia\n if ($materia->materias_has_periodos->count()>0) {\n foreach ($materia->materias_has_periodos as $periodo) {\n // En cada periodo\n if ($periodo->indicadores->count()>0) {\n foreach ($periodo->indicadores as $indicador) {\n // En cada indicador\n $notaAdd=false;\n if ($indicador->tipo_nota->count()>0) {\n foreach ($indicador->tipo_nota as $tipo) {\n // En cada tipo\n $encontrado=false;\n if ($tipo->notas->count()>0) {\n foreach ($tipo->notas as $nota) {\n // En cada nota, si lo encuentra, pone $encontrado a true, de lo contrario false\n if($nota->alumnos_id==$alumno->id){\n $encontrado=true;\n break;\n }\n }\n // Si no se encontró al alumno, se crea una nota vacía.\n if(!$encontrado){\n $notaAdd=true;\n $obj=new Notas;\n $obj->tipo_nota_id=$tipo->id;\n $obj->calificacion=0;\n $obj->alumnos_id=$alumno->id;\n $obj->save();\n Log::info('Creada nota de alumno ID:'+$alumno->id+'Con el tipo de nota ID:'+$tipo->id);\n $resultado[]=[\n 'materia_id'=>$materia->id,\n 'materia_name'=>$materia->materias->nombre_materia,\n 'periodo_id'=>$periodo->id,\n 'periodo_name'=>$periodo->periodos->nombre_periodo,\n 'indicador_id'=>$indicador->id,\n 'indicador_name'=>$indicador->nombre,\n 'tipo_nota_id'=>$tipo->id,\n 'tipo_nota_name'=>$tipo->nombre,\n 'alumnos_id'=>$alumno->id\n ]; \n }\n }\n }\n }\n if ($notaAdd) {\n $ind=new AlumInd;\n $ind->addActProm($alumno->id,$indicador->id);\n }\n }\n }\n }\n }\n }\n }\n // Devuelve una colección con al menos el mensaje de estado.\n $col=collect([$resultado]);\n return $col->toJson();\n }",
"function get_entrada_lote_id($id,$auth){\n\t\tif($auth==0){\n\t\t\t$validacion=\"and prf.usuario_validador_id=0 \";\n\t\t} else {\n\t\t\t$validacion=\" and prf.usuario_validador_id>0 \";\n\t\t}\n\t\t\t\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, ( prf.monto_total - prf.descuento ) as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatuse, e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and lf.lote_id='$id' $validacion\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id,e.lote_id, prf.descuento, cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc \";\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 telaPerfilGerente()\r\n {\r\n //Carregando as lojas do banco de dados\r\n $repositorio = $this->getDoctrine()->getRepository('DCPBundle:Quebra');\r\n\r\n $sql = $repositorio->createQueryBuilder('l')\r\n ->select('l.id')\r\n ->groupby('l.id')\r\n ->getquery();\r\n\r\n $resultado = $sql->getResult();\r\n\r\n $loja = array();\r\n $contLoja = 0;\r\n foreach($resultado as $data)\r\n {\r\n if (!in_array($data, $loja))\r\n {\r\n $loja[$contLoja] = $data[\"id\"];\r\n $contLoja++;\r\n }\r\n }\r\n \r\n return $loja;\r\n }",
"public function select($cargo){\n $id=$cargo->getId();\n\n try {\n $sql= \"SELECT `id`, `fecha_ingreso`, `empresa_idempresa`, `area_empresa_idarea_emp`, `cargo_empreso_idcargo`, `puesto_idpuesto`\"\n .\"FROM `cargo`\"\n .\"WHERE `id`='$id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $cargo->setId($data[$i]['id']);\n $cargo->setFecha_ingreso($data[$i]['fecha_ingreso']);\n $empresa = new Empresa();\n $empresa->setIdempresa($data[$i]['empresa_idempresa']);\n $cargo->setEmpresa_idempresa($empresa);\n $area_empresa = new Area_empresa();\n $area_empresa->setIdarea_emp($data[$i]['area_empresa_idarea_emp']);\n $cargo->setArea_empresa_idarea_emp($area_empresa);\n $cargo_empreso = new Cargo_empreso();\n $cargo_empreso->setIdcargo($data[$i]['cargo_empreso_idcargo']);\n $cargo->setCargo_empreso_idcargo($cargo_empreso);\n $puesto = new Puesto();\n $puesto->setIdpuesto($data[$i]['puesto_idpuesto']);\n $cargo->setPuesto_idpuesto($puesto);\n\n }\n return $cargo; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }",
"public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }",
"public function ultimoUsuario() {\n $ultimo = new SqlQuery(); //instancio objeto la case en cuestion\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para realizar la consulta en la BD\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction();\n $usuarioConsulta = $this->refControladorPersistencia->ejecutarSentencia($ultimo->buscarUltimo($tabla)); //en esta consulta busco cual es el ultimo usuario \n $arrayUsuario = $usuarioConsulta->fetchAll(PDO::FETCH_ASSOC); //utilizo el FETCH_ASSOC para que no repita los campos\n $this->refControladorPersistencia->get_conexion()->commit(); //realizo el commit de los datos a la base de datos\n $idUsuario = \"\"; //creo una variable para poder enviar los datos al metodo correpondiente\n foreach ($arrayUsuario as $id) {//recorro el array que contiene los datos que necesito para buscarl el ultimo usuario\n foreach ($id as $clave => $value) {//recorro los datos dentro del array y obtengo el valor que necesito\n $idUsuario = $value; //asigno el valor correspondiente a la variable creada anteriormente para tal caso\n }\n }\n //envio los datos al metodo que se va a encargar de ralizar la consulta a la base de \n //datos para obtener el último usiario registrado y devolver los datos para mostrarlos por pantalla\n $usuarioId = $this->buscarUsuarioXId($idUsuario); //lamo al metodo para obtener todos los datos del usuario que \n //estoy buscando en este caso el último que se creo\n return $usuarioId; //regreso los datos de ese usuario a la llamada para enviarlos desde el ruteador a la vista\n } catch (PDOException $excepcionPDO) { //atrapo la excepcion por si algo salio mal que se realice el rollback \n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n }",
"function get_entrada_pr_pedido_id($id){\n\t\t$u = new Entrada();\n\t\t$sql=\"select distinct on (e.pr_facturas_id) e.pr_facturas_id, e.id as id1, date(e.fecha) fecha, prf.monto_total as importe_factura, pr.razon_social as proveedor,prf.folio_factura, prf.pr_pedido_id, ef.tag as espacio_fisico, eg.tag as estatuse, e.lote_id, cel.tag as estatus_traspaso \".\n\t\t\t\t\"from entradas as e \".\n\t\t\t\t\"left join cproveedores as pr on pr.id=e.cproveedores_id \".\n\t\t\t\t\"left join pr_facturas as prf on prf.id=e.pr_facturas_id \".\n\t\t\t\t\"left join espacios_fisicos as ef on ef.id=e.espacios_fisicos_id \".\n\t\t\t\t\"left join estatus_general as eg on eg.id=e.estatus_general_id \".\n\t\t\t\t\"left join lotes_pr_facturas as lf on lf.pr_factura_id=prf.id \".\n\t\t\t\t\"left join cestatus_lotes as cel on cel.id=lf.cestatus_lote_id \".\n\t\t\t\t\"where e.estatus_general_id=1 and ctipo_entrada=1 and prf.pr_pedido_id='$id'\".\n\t\t\t\t\"group by e.pr_facturas_id, e.id, e.fecha, importe_factura, pr.razon_social, prf.folio_factura, prf.pr_pedido_id, ef.tag, eg.tag, e.pr_facturas_id, e.cproveedores_id,e.lote_id, cel.tag \".\n\t\t\t\t\"order by e.pr_facturas_id desc,e.fecha desc\";\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}",
"public function get_data_orden_credito($id_paciente,$n_orden){\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\t$sql=\"select*from orden_credito where id_paciente=? and numero_orden=?;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$id_paciente);\n\t$sql->bindValue(2,$n_orden);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"function getId_carrera(){\n\t\treturn $this->id_carrera;\n\t}",
"public function ConsultarDatosUsuario($id){\n $conn = new conexion();\n $cuenta = null;\n try {\n if($conn->conectar()){\n $str_sql = \"SELECT usuarios.nom_usu,usuarios.idcliente,usuarios.pass,usuarios.email,usuarios.id_usu,usuarios.foto,usuarios.telefono, \"\n . \"tp_usuarios.nom_tp as tipo,usuarios.id_tp_usu,usuarios.cedula from usuarios INNER JOIN tp_usuarios on \"\n . \"usuarios.id_tp_usu = tp_usuarios.id_tp and usuarios.id_usu = \".$id;\n $sql = $conn->getConn()->prepare($str_sql);\n $sql->execute();\n $resultado = $sql->fetchAll();\n foreach ($resultado as $row){\n $cuenta[] = array(\n \"Nom_usu\" => $row['nom_usu'],\n \"Email\" => $row['email'],\n \"Id_usu\" => $row['id_usu'],\n \"Cedula\" => $row['cedula'],\n \"Foto\" => $row['foto'],\n \"Telefono\" => $row['telefono'],\n \"Tipo\" => $row['tipo'],\n \"Pass\" => $row['pass'],\n \"Id_tipo\" => $row['id_tp_usu'],\n \"Id_cli\" => $row['idcliente'] \n );\n }\n }\n } catch (Exception $exc) {\n $cuenta = null;\n echo $exc->getMessage();\n }\n $conn->desconectar();\n return $cuenta;\n }",
"function RellenaDatos()\n{\n\t//buscamos todos los atributos de la tupl\n $sql = \"SELECT *\n\t\t\tFROM CENTRO\n\t\t\tWHERE (\n\t\t\t\t(CODCENTRO = '$this->CODCENTRO') \n\t\t\t)\";\n\t//si no se ejecuta con éxito devuelve mensaje de error\n\t//si se cumple la condicion\n\tif (!$resultado = $this->mysqli->query($sql))\n\t{\n\t\t\treturn 'Error de gestor de base de datos';\n\t}//si no\n\telse//si se ejecuta con éxito\n\t{\n\t\t$tupla = $resultado->fetch_array();//guardamos el resultado de la busqueda en la variable tupla\n\t}\n\treturn $tupla;//devolvemos la información de ese centro\n}",
"public function obtener_porID_delincuente($id)\n {\n $this->load->database();\n\n $this->db->from('delincuente');\n $this->db->where('iddelincuente', $id);\n $result = $this->db->get()->row_array();\n\n\n $this->db->from('comuna');\n $this->db->where('idcomuna', $result[\"fk_comuna\"]);\n $resultcomuna = $this->db->get()->row_array();\n\n $this->db->from('sector');\n $this->db->where('idsector', $result[\"fk_sector\"]);\n $resultsector = $this->db->get()->row_array();\n\n\n\n $result[\"fk_comuna\"] = $resultcomuna[\"nom_comuna\"];\n $result[\"fk_sector\"] = $resultsector[\"nomb_sector\"];\n\n return $result;\n }",
"function GetPeliculasConGenero(){\n //$sentencia = $this->db->prepare(\"SELECT * FROM peliculas INNER JOIN genero ON peliculas.titulo = genero.nombre\");\n $sentenciasad = $this->db->prepare(\"SELECT peliculas.titulo, genero.nombre FROM peliculas INNER JOIN genero ON peliculas.id_genero = genero.id_genero\");\n $sentencias->executing();\n //print_r( $sentencia->fetchAll(PDO::FETCH_OBJ));// vemos que este cargado y con que \n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }",
"function envios_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"envios\";\n\t\t$this->campoClave=\"IdEnvio\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"IdEnvio\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(2,$this->tabla,\"IdMail\",2);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Envio\",3);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Descripcion\",4);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"TablaDatosExtras\",5);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"CondicionDatosExtras\",6);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaCreacion\",7);\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"FechaModificacion\",8);\n$this->agregarVariable2($v);\n\n\t}",
"public function show($id)\n {\n\n /*\n * Definimos variable que contendrá la fecha actual del sistema\n */\n $dateCarbon = Carbon::now()->locale('es')->isoFormat('dddd D, MMMM YYYY');\n\n /* Declaramos la variable que contendrá todos los permisos existentes en la base de datos */\n $ordenCompra = DB::table('orden_compras')\n ->join('users', 'orden_compras.user_id', '=', 'users.id')\n ->join('status_o_c_s', 'orden_compras.estado_id', '=', 'status_o_c_s.id')\n ->join('proveedores', 'orden_compras.proveedor_id', '=', 'proveedores.id')\n ->select('orden_compras.*', 'users.name as Comprador', 'status_o_c_s.estado as Estado', 'proveedores.razonSocial as RazonSocial')\n ->where('orden_compras.id', '=', $id)\n ->first();\n\n $proveedores = DB::table('proveedores')\n ->select(DB::raw('CONCAT(proveedores.id, \" ) \", proveedores.razonSocial) as RazonSocial'), 'proveedores.id')\n ->get();\n\n $move = DB::table('move_o_c_s') \n ->join('status_o_c_s', 'move_o_c_s.estadoOrdenCompra_id', 'status_o_c_s.id') \n ->join('users', 'move_o_c_s.user_id', 'users.id')\n ->select('move_o_c_s.*', 'status_o_c_s.estado as status', 'users.name as name', 'move_o_c_s.created_at as date')\n ->where('move_o_c_s.ordenCompra_id', '=', $id)\n ->get();\n\n $assign = DB::table('assign_request_to_o_c_s')\n ->join('orden_compras', 'assign_request_to_o_c_s.ordenCompra_id', '=', 'orden_compras.id')\n ->select('assign_request_to_o_c_s.*', 'orden_compras.ordenCompra_id as NoOC')\n ->where('assign_request_to_o_c_s.ordenCompra_id', '=', $ordenCompra->id)\n ->get();\n\n $detalleSolicitud = DB::table('detail_solicituds')\n ->join('products', 'detail_solicituds.product_id', 'products.id')\n ->join('solicituds', 'detail_solicituds.solicitud_id', '=', 'solicituds.id')\n ->join('orden_compras', 'detail_solicituds.ordenCompra_id', '=', 'orden_compras.id')\n ->leftjoin('status_o_c_s', 'orden_compras.estado_id', '=', 'status_o_c_s.id')\n ->leftjoin('licitacions', 'detail_solicituds.licitacion_id', '=', 'licitacions.id')\n ->leftjoin('status_licitacions', 'licitacions.estado_id', '=', 'status_licitacions.id')\n ->leftjoin('facturas', 'detail_solicituds.factura_id', 'facturas.id')\n ->leftjoin('status_facturas', 'facturas.estado_id', '=', 'status_facturas.id')\n ->select('detail_solicituds.*', 'products.name as Producto', 'licitacions.licitacion_id as NoLicitacion', 'status_licitacions.estado as EstadoLicitacion', 'facturas.factura_id as NoFactura', 'status_facturas.estado as estadoFactura')\n ->where('detail_solicituds.ordenCompra_id', '=', $id)\n ->get();\n//dd($ordenCompra);\n\n /* Retornamos a la vista los resultados psanadolos por parametros */\n return view('siscom.ordenCompra.show', compact('ordenCompra', 'dateCarbon', 'proveedores', 'move', 'detalleSolicitud', 'assign'));\n\n }",
"public function forfaitServic($idFournisseur){\n $requete = \" SELECT idForfaitFournisseur, (SELECT count(idservice) FROM bitvoix_db.services WHERE idFournisseur = ?) AS nroServ,\n DATEDIFF(now(),fournisseur.datInsFournisseur) as jours, DATEDIFF(datEcheFournisseur,now()) as jouract \n FROM fournisseur WHERE idFournisseur = ?\";\n // var_dump($requete);\n $stmt = $this->_pdo->prepare($requete);\n $stmt->execute(array($idFournisseur,$idFournisseur));\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n if (!$result){\n $requete = \" SELECT '' AS idService, 0 AS nroServ, idForfaitFournisseur,datEcheFournisseur, idForfaitFournisseur,\n DATEDIFF(now(),fournisseur.datInsFournisseur) as jours, DATEDIFF(datEcheFournisseur,now()) as jouract \n FROM fournisseur\n WHERE idFournisseur = ? \";\n // var_dump($requete);\n $stmt = $this->_pdo->prepare($requete);\n $stmt->execute(array($idFournisseur));\n $result = $stmt->fetchAll(PDO::FETCH_OBJ);\n }\n return $result;\n\n }",
"function valores($idCampo)\r\n {\r\n $mg = ZendExt_Aspect_TransactionManager::getInstance();\r\n $conn = $mg->getConnection('metadatos');\r\n $query = Doctrine_Query::create($conn);\r\n $result = $query->select('v.valor')\r\n ->from('NomValorestruc v')\r\n ->where(\"v.idcampo='$idCampo'\")\r\n //->groupBy('v.valor')\r\n ->execute()\r\n ->toArray();\r\n return $result;\r\n }",
"public function get($id = null, $id_padre = null)\n {\n $this->db->select('id_unidad_organizacional, unidad_padre, nombre, departamento, tiene_transporte, activa');\n\n // Si no hay parámetros, recupera todos.\n if ($id === null && $id_padre === null)\n {\n $query = $this->db->get('unidad_organizacional');\n $resultado = $query->result();\n }\n\n // Si no hay padre, recupera un registro individual.\n else if($id_padre === null)\n {\n $query = $this->db->get_where('unidad_organizacional', array('id_unidad_organizacional' => $id));\n $resultado = $query->row();\n }\n\n // Si hay padre, recupera las hijas.\n else\n {\n $query = $this->db->get_where('unidad_organizacional', array('unidad_padre' => $id_padre));\n $resultado = $query->result();\n }\n\n // Lo siguiente se usa para convertir los campos booleanos, ya que postgres por defecto retorna \"t\" y \"f\".\n\n // Si el resultado es un arreglo.\n if(is_array($resultado))\n {\n // Recorrer el arreglo y asignar las variables.\n foreach($resultado as $unidad)\n {\n $unidad->tiene_transporte = $unidad->tiene_transporte == \"t\";\n\t\t\t $unidad->activa = $unidad->activa == \"t\";\n }\n }\n\n // Si el resultado es un objeto.\n else\n {\n $resultado->tiene_transporte = $resultado->tiene_transporte == \"t\";\n\t\t $resultado->activa = $resultado->activa == \"t\";\n }\n\n return $resultado;\n }",
"public function data_disponivel($data_entrada,$data_saida,$id = null){\n // $data_entrada = '2016-09-01';\n // $data_saida = '2016-09-24';\n\n $data_entrada = Carbon::createFromFormat('d/m/Y', $data_entrada)->toDateString();\n $data_saida = Carbon::createFromFormat('d/m/Y', $data_saida)->toDateString();\n\n if ($id!=null) {\n //edicao\n return count(\\DB::select('SELECT id FROM eventos\n WHERE id != ? and (\n ? BETWEEN data_entrada AND data_saida\n or\n ? BETWEEN data_entrada AND data_saida)',\n [$id,$data_entrada,$data_saida])) == 0;\n }\n\n return count(\\DB::select('SELECT id FROM eventos\n WHERE\n ? BETWEEN data_entrada AND data_saida\n or\n ? BETWEEN data_entrada AND data_saida ',\n [$data_entrada,$data_saida])) == 0;\n }",
"public function buscaPorId($id){\n \n \t\t\t/* Primeiro cria a query do MySQL */\n \t\t\t$id_query = \"SELECT * FROM atendimentocliente WHERE idChamada = \".$id;\n\n \t\t\t/* Envia a query para o banco de dados e verifica se funcionou */\n \t\t\t$result = mysqli_query($this->conexao, $id_query)\n \t\t\tor die(\"Erro ao listar produtos por ID: \" . mysql_error() );\n\n \t\t\t/* Cria variável de retorno e inicializa com NULL */\n \t\t\t$retorno = null;\n\n \t\t\t/* Se encontrou algo, pega todos os campos do resultado obtido */\n \t\t\tif( $row = mysqli_fetch_array($result, MYSQLI_ASSOC) ){\n \t\t\t\t//Cria nova instância da classe produto\n \t\t\t\t $retorno = new Atendimentocliente();\n \t\t\t\t//Preenche todos os campos do novo objeto\n\t\t\t\t $retorno->idChamada = $row[\"idChamada\"]; \n \t\t\t\t $retorno->atendeu = $row[\"atendeu\"];\n\t\t\t\t $retorno->refProduto = $row[\"refProduto\"];\n\t\t\t\t $retorno->motivoPlano = $row[\"motivoPlano\"];\n\t\t\t\t $retorno->dataVencimento = $row[\"dataVencimento\"];\n\t\t\t\t $retorno->debitoAutomatico = $row[\"debitoAutomatico\"];\n\t\t\t\t $retorno->debitoOfertado= $row[\"debitoOfertado\"];\n\t\t\t\t $retorno->observacao = $row[\"observacao\"];\n\t\t\t\t $retorno->dataChamada = $row[\"dataChamada\"];\n\t\t\t\t $retorno->idVendaServico= $row[\"idVendaServico\"];\n\t\t\t\t $retorno->notaAtendimento = $row[\"notaAtendimento\"];\n\t\t\t\t $retorno->FoiNaoConformidade= $row[\"FoiNaoConformidade\"];\n\t\t\t\t\n\t\t\t\t \n\n \t\t\t\t\n \t\t\t}\n \t\t\t\n \t\t\treturn $retorno;\n\n\t\t }",
"public function buscarEnderecoPorId($endereco) {\n \n //Preparando um comando sql para parametrização \n $sql = \"SELECT * FROM Endereco WHERE id_locatario = ?;\";\n\n $stmt = $this->conn->prepare($sql); \n\n $idLocatario = $endereco->getIdLocatario(); \n \n\n //Passando os parametros e seus tipos (s = String, d = Double , i = Int)\n $stmt->bind_param('i', $idLocatario);\n \n // Executando o comando parametrizad\n\n if ($stmt->execute()){\n /* store first result set */\n $result = $stmt->get_result();\n while ($row = $result->fetch_assoc()) { \n\n $enderecoLocatario = new Endereco();\n $enderecoLocatario->setIdLocatario((int)$row[\"id_locatario\"]);\n $enderecoLocatario->setLogradouro((string)$row[\"logradouro\"]);\n $enderecoLocatario->setId((int)$row[\"id_endereco\"]);\n $enderecoLocatario->setCep((int)$row[\"cep\"]);\n $enderecoLocatario->setNumero((int)$row[\"numero\"]);\n $enderecoLocatario->setEstado((string)$row[\"estado\"]);\n $enderecoLocatario->setBairro((string)$row[\"Bairro\"]);\n $enderecoLocatario->setCidade((string)$row[\"Cidade\"]);\n $listEnderecoLocatario[] = $enderecoLocatario;\n \n }\n \n return $listEnderecoLocatario;\n }\n\n // $conexao->close();\n }",
"protected function asignarCamposRelacionales() {\n foreach($this->campos as $nombre=>$campo) {\n if($campo->tipo!='relacional'||($campo->relacion!='1:1'&&$campo->relacion!='1:0')) continue;\n $columna=$campo->columna;\n if(is_object($this->consultaValores->$nombre)) {\n //Asignado como entidad u objeto anónimo\n $this->consultaValores->$columna=$this->consultaValores->$nombre->id;\n } elseif(is_array($this->consultaValores->$nombre)) {\n //Asignado como array\n $this->consultaValores->$columna=$this->consultaValores->$nombre['id'];\n }\n }\n }",
"public function publicaciones() //Lleva ID del proveedor para hacer carga de BD\r\n\t{\r\n\t\t//Paso a ser totalmente otro modulo para generar mejor el proceso de visualizacion y carga de datos en la vistas\r\n\r\n\t}",
"public function datos_gasolina() \n {\n $registros = DB::table('gasolinas')\n ->join ('carros', 'gasolinas.Carros_idCarro', '=', 'carros.id')\n ->select('gasolinas.id', 'gasolinas.Fecha', 'gasolinas.Litros', 'gasolinas.Total', \n 'gasolinas.Documento', 'gasolinas.Ticket', 'gasolinas.Estado', 'carros.Marca', \n 'carros.Modelo')\n ->get();\n return $registros;\n // return Gasolina::all();\n }",
"public function controlAviso()\n {\n $em = $this->getEntityManager();\n $q = $em->createQuery('SELECT r1 FROM Cespi\\Bundle\\IsoBundle\\Entity\\RegistroCargadoDato r1 '\n . ' WHERE r1.createdAt = (SELECT MAX(r2.createdAt) from Cespi\\Bundle\\IsoBundle\\Entity\\RegistroCargadoDato r2 where r2.idRegistroCargado = r1.idRegistroCargado group by r2.idRegistroCargado)'\n . ' and r1.control_envio_email = true ORDER BY r1.idRegistroCargado, r1.createdAt DESC');\n return $q->getResult();\n }"
] | [
"0.675352",
"0.6650378",
"0.66482323",
"0.6635568",
"0.6617188",
"0.6519409",
"0.64989406",
"0.6474613",
"0.6433914",
"0.642237",
"0.64212704",
"0.64106786",
"0.63928854",
"0.638412",
"0.6376208",
"0.63646287",
"0.63610077",
"0.63593024",
"0.63565624",
"0.63346267",
"0.63327295",
"0.63175046",
"0.6305519",
"0.63040936",
"0.6303141",
"0.6298553",
"0.6297133",
"0.62959397",
"0.6295521",
"0.6294183",
"0.62935495",
"0.6290813",
"0.6289391",
"0.6288233",
"0.6249007",
"0.6244259",
"0.62380093",
"0.623623",
"0.62066954",
"0.6205308",
"0.62042844",
"0.6204074",
"0.62016606",
"0.619944",
"0.6186632",
"0.6184486",
"0.6181259",
"0.61793417",
"0.6172763",
"0.6170442",
"0.6169204",
"0.616391",
"0.6163337",
"0.616292",
"0.61592263",
"0.6156407",
"0.6149664",
"0.61454016",
"0.61361134",
"0.613496",
"0.61311376",
"0.613003",
"0.6127925",
"0.612569",
"0.61246234",
"0.61189336",
"0.6107377",
"0.6104968",
"0.61034256",
"0.6101971",
"0.6101351",
"0.61010134",
"0.60932386",
"0.609035",
"0.6090217",
"0.6084538",
"0.6084064",
"0.6074817",
"0.60746205",
"0.606335",
"0.6063345",
"0.60627335",
"0.6060841",
"0.6059616",
"0.60584694",
"0.6048287",
"0.6045877",
"0.6040316",
"0.60375476",
"0.6037073",
"0.6034053",
"0.6032309",
"0.6032304",
"0.60319597",
"0.60298723",
"0.60164803",
"0.60150427",
"0.6013952",
"0.60135394",
"0.6009139"
] | 0.7141637 | 0 |
TODO: Move to parent class | private function respond($str)
{
$this->_registry->getResponse()->appendContent($str);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function __init__() { }",
"final private function __construct() {}",
"final private function __construct() {}",
"protected final function __construct() {}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"protected function __construct() {}",
"private function __construct () {}",
"protected function __construct () {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct() {}",
"private function __construct()\t{}",
"final private function __construct(){\r\r\n\t}",
"private final function __construct() {}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}"
] | [
"0.6745297",
"0.66687936",
"0.66687936",
"0.66471046",
"0.6557428",
"0.6557428",
"0.6557428",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6536877",
"0.6490819",
"0.6484032",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.64790714",
"0.647807",
"0.64757764",
"0.64757764",
"0.646845",
"0.64596456",
"0.64543605",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327",
"0.64518327"
] | 0.0 | -1 |
/ Do nothing when this object is created | public function __construct()
{
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construct() {\n\t\t\t\n\t\t\t/* Do nothing here */\n\t\t\t\n\t\t}",
"private function __construct()\r\n\t\t{\r\n\r\n\t\t\t/* Do Nothing */\r\n\r\n\t\t}",
"public function init()\n {\n // Do nothing\n }",
"protected function __construct() {\n // Do nothing.\n }",
"private function __construct()\n {\n // Do nothing\n }",
"protected function initialize() {\n // NOOP\n }",
"public function __construct() {\n\t\t// Intentionally left empty.\n\t}",
"public function __construct()\n\t{\n\t\t// nothing to do\t\n\t}",
"public function __construct() {\n\t\t// Nothing to do.\n\t}",
"private function __construct() { /* Do nothing here */ }",
"private function __construct() { /* Do nothing here */ }",
"public function init() {\n // nothing to do here\n }",
"public function init() {\n // nothing to do here\n }",
"protected function __construct()\n\t{\n\t\t// Nothing here\n\t}",
"protected function __init__() { }",
"function __construct()\r\n {\r\n //NOP\r\n }",
"public function __construct()\n\t{\n\t\t$this->clear();\n\t}",
"public function __construct()\n\t{\n\t\t// Nothing here\n\t}",
"final private function __construct() {\n\t\t\t}",
"private function init()\n\t{\n\t\treturn;\n\t}",
"final private function __construct(){\r\r\n\t}",
"private function __() {\n }",
"public function __init(){}",
"public function __construct()\n {\n // do nothing\n }",
"public function init()\n {\n // Nothing needs to be done initially, huzzah!\n }",
"final private function __construct()\n {\n }",
"public function init()\n {\n \treturn;\n }",
"public function init()\n {\n //This is empty function!!!\n }",
"function __construct(){\n\t\t// nowt much...\n\t}",
"private function __construct()\n {\n // nothing to do here\n }",
"private function __construct()\t// Private to prevent object being instantiated outside class\r\n {\r\n // Do nothing\r\n }",
"final private function __construct()\n\t{\n\t}",
"public function __construct() {\n\t\tparent::__construct();\n\t\t// Other code to run when object is instantiated\n\t}",
"final private function __construct() {}",
"final private function __construct() {}",
"public function __construct()\n\t\t{\n\t\t\t# code...\n\t\t}",
"private function __construct()\t{}",
"protected final function __construct() {}",
"public function __construct()\n\t\t{\n\t\t\t//\n\t\t}",
"private function __construct()\r\r\n\t{\r\r\n\t}",
"protected function __construct()\r\n\t\t{\r\n\t\t}",
"private function __construct()\r\n\t{\r\n\t\r\n\t}",
"private function __construct()\r\n\t{\r\n\t}",
"private function __construct() {\r\n\t\r\n\t}",
"private function __construct() {\n\t\t}",
"public function init()\n {\t\t\t\n }",
"public function init()\n {\t\t\t\n }",
"public function init()\n {\n \n \n }",
"function __construct() {\n\t\t$this->reset();\n\t}",
"function __construct() {\n\t\t$this->reset();\n\t}",
"private function __construct()\r\n {\r\n // Prevent direct instantiation\r\n }",
"protected function init() {return;}",
"final private function __construct() { }",
"final private function __construct() { }",
"final private function __construct() { }",
"private function __construct() {\r\n\t\t\r\n\t}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"private function __construct(){}",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function __construct() {\n $this->reset();\n }",
"public function init() {\n \n }",
"public function init() {\n \n }",
"public function init() {\n \n }",
"public function init ()\r\n {\r\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function init()\n {\n }",
"public function run()\n {\n /* this particular object won't run */\n }"
] | [
"0.8029405",
"0.7985307",
"0.788696",
"0.7679892",
"0.7594412",
"0.75905037",
"0.7570293",
"0.7521396",
"0.75209486",
"0.75051063",
"0.75051063",
"0.7454506",
"0.7422704",
"0.7399426",
"0.72524494",
"0.7247278",
"0.72359395",
"0.721351",
"0.7210944",
"0.72037125",
"0.7198359",
"0.7189867",
"0.717403",
"0.7169814",
"0.7133785",
"0.7123097",
"0.7121499",
"0.712066",
"0.71155053",
"0.71134746",
"0.7109684",
"0.70681304",
"0.705717",
"0.70466214",
"0.70466214",
"0.7044791",
"0.7038819",
"0.70050955",
"0.70021176",
"0.69967866",
"0.69940346",
"0.6989287",
"0.6986351",
"0.6984017",
"0.69810575",
"0.6980864",
"0.6980864",
"0.69774485",
"0.6975223",
"0.6975223",
"0.6974829",
"0.6959941",
"0.6959812",
"0.6959812",
"0.6959812",
"0.6954363",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.695145",
"0.69423544",
"0.69423544",
"0.69423544",
"0.69423544",
"0.69423544",
"0.69423544",
"0.69423544",
"0.69423544",
"0.69423544",
"0.69423544",
"0.6939871",
"0.6939871",
"0.6939871",
"0.69378614",
"0.6925482",
"0.6925437",
"0.6924584",
"0.6924584",
"0.6924542",
"0.6924542",
"0.6924542",
"0.6924542",
"0.6924542",
"0.6924542",
"0.6924542",
"0.6924542",
"0.6924542",
"0.6914352"
] | 0.0 | -1 |
/ Including files Redundant function. See: class csearchFileLoader | public function __LoadFile($files)
{
!is_array($files)?$files = Array($files):false;
foreach($files as $file) include $file;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function processIncludes() {}",
"public function loadIncludes() {\n // TODO: better way to skip load includes.\n $this->addCSS($this->env->dir['tmp_files'] . '/css.min.css');\n $this->addJS('/tmp/js.min.js');\n }",
"private function includes()\n {\n }",
"public function enableConcatenateFiles() {}",
"public function disableConcatenateFiles() {}",
"abstract public function search($files, array $includedFiles);",
"private function includeAll( $path, $search ){\n\n \tforeach ( glob( $path . $search ) as $file ) {\n\t\t \n\t\t \tinclude_once $file;\n\n\t\t \t$fileParts = pathinfo($file);\n\n\t\t \t$fileFolder = $fileParts[\"filename\"];\n\n\t\t \tif(is_dir($path . $fileFolder) && is_readable($path . $fileFolder)){\n\n\t\t \t\tforeach ( glob( $path . $fileFolder . \"/\" . $search ) as $otherFile ) { \n\n\t\t \t\t\t\tinclude_once $otherFile;\n\t\t \t\t}\n\n\t\t \t}\n\n\t\t \n\t\t}\n }",
"private function includeFiles(){\n foreach($this->files as $file){\n require implode('', $file);\n $class_name = $this->getClassNameFromFileName($file);\n $this->classes[$file['name']] = new $class_name();\n }\n }",
"public function includeFile()\n {\n foreach($this->arra_constant_file as $stri_file)\n {include_once($stri_file);}\n }",
"public function addDefaultIncludes(){}",
"public function scanFiles()\n\t{\n\t\t// Load all of joomla into a gigantic array\n\t\t$data = $this->loadAllJoomlaFileIntoGiganticArray();\n\n\t\t$unused = array();\n\n\t\t// Loop each file\n\t\tforeach ($this->files as $file)\n\t\t{\n\t\t\t$file = JPATH_BASE . '/' . $file;\n\n\t\t\t$this->out('Using File: ' . $file);\n\n\t\t\t$lines = $this->loadLanguage($file);\n\n\t\t\tforeach ($lines as $constant => $line)\n\t\t\t{\n\t\t\t\t// Some constants are system ones that are put together on the fly\n\t\t\t\t// We can not find them so just manually remove them\n\t\t\t\t$ignored_constant_patterns = array();\n\t\t\t\t$ignored_constant_patterns[] = '/.*_SAVE_SUCCESS/im';\n\n\t\t\t\t// A plural string with _N_\n\t\t\t\t$ignored_constant_patterns[] = '/.*_N_.*/im';\n\n\t\t\t\t// A plural string ending in a number\n\t\t\t\t$ignored_constant_patterns[] = '/.*_\\d/im';\n\n\t\t\t\t// A plural string\n\t\t\t\t$ignored_constant_patterns[] = '/.*_MORE/im';\n\t\t\t\t$ignored_constant_patterns[] = '/.*_NO_ITEM_SELECTED/im';\n\t\t\t\t$ignored_constant_patterns[] = '/.*_LAYOUT_DEFAULT/im';\n\t\t\t\t$ignored_constant_patterns[] = '/.*_CONFIGURATION/im';\n\t\t\t\t$ignored_constant_patterns[] = '/TPL_.*_POSITION_.*/im';\n\t\t\t\t$ignored_constant_patterns[] = '/COM_MODULES_POSITION_.*/im';\n\n\t\t\t\tforeach ($ignored_constant_patterns as $ignored_constant_pattern)\n\t\t\t\t{\n\t\t\t\t\tif (preg_match($ignored_constant_pattern, $constant))\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($lines[$constant]);\n\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Search the gigantic array for the string\n\t\t\t\tforeach ($data as $datafile => $d)\n\t\t\t\t{\n\t\t\t\t\t$file_parts = explode('.', $datafile);\n\t\t\t\t\t$file_extention = array_pop($file_parts);\n\n\t\t\t\t\tif ($file_extention == 'xml')\n\t\t\t\t\t{\n\t\t\t\t\t\t// If this is an XML file then simply look for the constant\n\t\t\t\t\t\t$pattern = \"/\" . $constant . \"/mi\";\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// If not XML then it is php and we want to see the constant inside quotes\n\t\t\t\t\t\t$pattern = \"/['|\\\"]\\s*\" . $constant . \"\\s*['|\\\"]/mi\";\n\t\t\t\t\t}\n\n\t\t\t\t\tif (preg_match($pattern, $d) === 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Remove the ones we find\n\t\t\t\t\t\tunset($lines[$constant]);\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$unused[$file] = $lines;\n\t\t}\n\n\t\treturn $unused;\n\t}",
"public function testIncludingFilesRemovesFromQueue() {\n\t\t$this->Helper->addCss('libraries', 'default');\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$expected = array(\n\t\t\t'link' => array(\n\t\t\t\t'type' => 'text/css',\n\t\t\t\t'rel' => 'stylesheet',\n\t\t\t\t'href' => '/cache_css/default.css?file%5B0%5D=libraries'\n\t\t\t)\n\t\t);\n\t\t$this->assertTags($result, $expected);\n\n\t\t$result = $this->Helper->includeCss('default');\n\t\t$this->assertEquals('', $result);\n\t}",
"public function includeFile($once = true);",
"function opaljob_includes( $path, $ifiles=array() ){\n\n if( !empty($ifiles) ){\n foreach( $ifiles as $key => $file ){\n $file = $path.'/'.$file; \n if(is_file($file)){\n require($file);\n }\n } \n }else {\n\n $files = glob($path);\n foreach ($files as $key => $file) {\n if(is_file($file)){\n require($file);\n \n }\n }\n }\n}",
"public function compile() { \n if (!count($this->loadedFiles)) return; \n $outputFile = $this->_options['includeFile']; \n $fp = fopen($outputFile, \"a+\"); \n if (flock($fp, LOCK_EX)) { \n if ($filesize = filesize($outputFile)) { \n fseek($fp, 0); \n $currentFile = fread($fp, $filesize); \n } else $currentFile = ''; \n \n if (!$currentFile) { \n $appendSource = \"<?php\\n\"; \n $existingClasses = array(); \n } else { \n $appendSource = ''; \n $existingClasses = $this->getClassesFromSource($currentFile); \n } \n \n for ($i = 0; $i < count($this->loadedFiles); $i++) { \n $filename = $this->loadedFiles[$i]; \n \n $f = @fopen($filename, \"r\", true); \n $fstat = fstat($f); \n $file = fread($f, $fstat['size']); \n fclose($f); \n $classes = $this->getClassesFromSource($file); \n \n if (!count(array_intersect($existingClasses, $classes))) { \n if (strpos($file, '__FILE__') === false) { \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } else { \n $filePath = $this->realPath($filename); \n if ($filePath) { \n $file = str_replace('__FILE__', \"'$filePath'\", $file); \n $endFile = substr($file, -2) == '?>' ? -2 : null; \n $appendSource .= ($endFile === null ? substr($file, 5) : substr($file, 5, -2)); \n } \n } \n } else { \n $appendSource = ''; \n break; \n } \n } \n if ($appendSource) { \n fseek($fp, 0, SEEK_END); \n fwrite($fp, $appendSource); \n } \n flock($fp, LOCK_UN); \n } \n fclose($fp); \n }",
"function combine($inFiles, $outFile) {\n }",
"public function deleteUnusedFiles(){\n \n }",
"function findCssFiles();",
"public function getConcatenateFiles() {}",
"protected function detectMissingFiles() {}",
"function shortcode_overview_util_require_files($path) {\n\t$filelist = scandir($path);\n\t$filelist = array_diff($filelist,array('..','.'));\n\tforeach($filelist as $file) {\n\t\tif (is_file($path.'/'.$file)){\n\t\t\tinclude_once($path.'/'.$file);\n\t\t} else {\n\t\t\tshortcode_overview_util_require_files($path.'/'.$file);\n\t\t}\n\t}\n}",
"private static function load_files() {\n\t\t\t// Classes.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/class-astra-ext-advanced-headers-data.php';\n\t\t\t// Load Astra Breadcrumbs.\n\t\t\tinclude_once ASTRA_ADDON_EXT_ADVANCED_HEADERS_DIR . 'classes/astra-breadcrumbs.php';\n\t\t}",
"function includeAll($path) {\n foreach (self::listFiles($path) as $file) {\n include $file;\n }\n }",
"private static final function loadClasses() {\n if(isset(self::$_config['include']) && is_array(self::$_config['include'])) {\n self::$_config['include'] = array_merge(self::$defaultInclude, self::$_config['include']);\n $defaultIncludeCount = count(self::$defaultInclude);\n foreach(self::$_config['include'] as $key => $include) {\n /* @var string $include */\n $include = ($key < $defaultIncludeCount) ? self::$basePath . $include : self::$path . $include;\n $matches = [];\n if(preg_match('/(.*)\\/?\\*$/', $include, $matches)) {\n if(is_dir($matches[1])) {\n $files = scandir($matches[1]);\n foreach ($files as $file) {\n /* @var string $file */\n if($file === '.' || $file === '..' || is_dir($matches[1] . $file)) {\n continue;\n }\n if (preg_match('/^.+\\.php$/', $file)) { // include only php files\n require_once($matches[1] . $file);\n }\n }\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n {$matches[1]} is not a directory\");\n }\n } else {\n if(file_exists($include)) {\n if(!is_dir($include)) {\n require_once($include);\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n $include is a directory\");\n }\n } else {\n static::error500(\"Wrong config parameter in <strong>include</strong>:\n $include is not exists.\");\n }\n }\n }\n } else {\n static::error500('Include is missing from config.');\n }\n }",
"private function includes() {\n\t\trequire_once( PRODUCT_LIST_DIR . 'classes/class-product_list.php' );\n\t\t//require_once( PRODUCT_LIST_DIR . 'classes/class-yc_admin_cursos-settings.php' );\n\t}",
"function e_file_exists($filename) {\r\n global $CACHE_FILE_EXIST;\r\n \r\n $CACHE_FILE_EXIST[\"petitions\"]++;\r\n if (!isset($CACHE_FILE_EXIST[$filename])) {\r\n $current=ini_get(\"include_path\")._PATH_SYMBOL.\"/\";\r\n debug(\"PATH: $current\",\"red\");\r\n $dirs=explode(_PATH_SYMBOL,$current);\r\n foreach ($dirs as $k=>$v) {\r\n $res=file_exists($v.\"/$filename\");\r\n debug($v.\"/$filename\");\r\n if ($res) {\r\n debug($v.\"/$filename\".\" OK\",\"blue\");\r\n $CACHE_FILE_EXIST[$filename]=$v.\"/$filename\";\r\n $CACHE_FILE_EXIST[\"cached\"]++;\r\n return ($v.\"/$filename\");\r\n }\r\n }\r\n $CACHE_FILE_EXIST[$filename]=false;\r\n return False;\r\n }\r\n else\r\n return $CACHE_FILE_EXIST[$filename];\r\n}",
"static function loadFiles()\r\n\t{\r\n\t\t//required files\r\n\t\t\r\n\t\t//load bibliotek\r\n\t\t$paths = array(rp_self.\"lib/\");\r\n\t\t$to_header = array();\r\n\t\tforeach($paths as $path)\r\n\t\t{\r\n\t\t\t$scan = scandir($path);\r\n\t\t\tforeach($scan as $file)\r\n\t\t\t{\r\n\t\t\t\tif(is_file($path.$file))\r\n\t\t\t\t{\r\n\t\t\t\t\t$ext = explode(\".\", $file);\r\n\t\t\t\t\t$ext = $ext[1];\r\n\t\t\t\t\tif($ext == \"php\")\r\n\t\t\t\t\t\trequire_once($path.$file);\r\n\t\t\t\t\t\r\n\t\t\t\t\t//tilføj script tag til header hvis det er javascript\r\n\t\t\t\t\tif($ext == 'js')\r\n\t\t\t\t\t\t$to_header[] = '<script type=\"text/javascript\" src=\"'.$path.$file.'\"></script>';\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn implode('', $to_header);\r\n\t}",
"private function includes() {\n\t\t\t// By default, comments are disjoined from the other post types.\n\t\t\trequire_once( $this->includes_dir . 'comments.php' );\n\n\t\t\t// Settings\n\t\t\trequire_once( $this->includes_dir . 'settings.php' );\n\t\t}",
"private function includes() {\n \t$includes = array(\n \t\t'/includes/event-custom-post-type.php',\n \t\t'/includes/shortcodes.php',\n \t\t'/includes/display-helper.php',\n \t\t'/includes/query-helper.php'\n \t);\n \t\n \t$admin_includes = array();\n \t\n \tif ( file_exists( dirname( __FILE__ ) . '/includes/cmb2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/cmb2/init.php';\n } elseif ( file_exists( dirname( __FILE__ ) . '/includes/CMB2/init.php' ) ) {\n \trequire_once dirname( __FILE__ ) . '/includes/CMB2/init.php';\n }\n \n \t// Load files\n \tforeach ( $includes as $file ) {\n \t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t}\n \t}\n \n \t// Load admin files\n \tif ( is_admin() ) {\n \t\tforeach ( $admin_includes as $file ) {\n \t\t\tif ( file_exists( dirname( __FILE__ ) . $file ) ) {\n \t\t\t\trequire_once dirname( __FILE__ ) . $file;\n \t\t\t}\n \t\t}\n \t}\n }",
"function ClearInclude()\n{\n\t$sFileUrl = '';\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t$sFileUrl = trim($_REQUEST['file-path']);\n\t\n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>fail not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = ''; \n\t$sGettedContent = file_get_contents($sFileUrl);\n\t\n\tif($sGettedContent === false || strlen($sGettedContent) === 0)\n\t{\n\t\techo '<fail>cant get content from file</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$sGettedContent = str_replace(\"@require_once('class.wp-includes.php');\", '', $sGettedContent);\n\n\t\t\n\t$stOutFileHandle = false;\n\t$stOutFileHandle = fopen($sFileUrl, 'w');\n\tif($stOutFileHandle === false)\n\t{\n\t\techo '<fail>cant open file for write</fail>';\n\t\treturn;\n\t}\n\t\tfwrite($stOutFileHandle, $sGettedContent);\n\tfclose($stOutFileHandle);\n\t\n\techo '<correct>correct clear</correct>';\n\treturn;\n}",
"private function includes()\n\t\t{\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-sanitize.php';\n\t\t\trequire_once dirname( __FILE__ ) . '/sf-class-format-options.php';\n\t\t\tnew SF_Sanitize;\n\t\t}",
"public static function loadSectionFiles() {\n\t\tforeach (scandir( dirname(__FILE__) . Route::ROUTE_SECTION_DIR) as $filename) {\n\n\t\t $path = dirname(__FILE__) . Route::ROUTE_SECTION_DIR . '/' . $filename;\n\n\t\t if (is_file($path)) {\n\t\t\t\t$path_parts = pathinfo($path);\n\t\t \t$basename = $path_parts['filename'];\n\n\t\t \tif (self::endsWith($basename, Route::ROUTE_SECTION_SUFFIX)) {\n\t\t\t require_once $path;\n\t\t\t call_user_func(array($basename , 'init'));\n\t\t \t}\n\t\t }\n\t\t}\n\t}",
"public function testCovered(): void\n {\n $validator = new CodeCoverageValidator();\n\n $missing = $validator->findFilesWithoutCovers(__DIR__);\n\n // Assert that the missing array contains nothing.\n self::assertCount(0, $missing);\n }",
"function incluirClasses($nomeClasse) {\n if(file_exists($nomeClasse.\".php\") == true) {\n require_once($nomeClasse.\".php\");\n }\n}",
"private static function _includes()\n {\n /**\n * Includes\n */\n include_once 'functions/register-post-types.php';\n include_once 'functions/register-taxonomies.php';\n include_once 'functions/register-menus.php';\n }",
"function getFiles($inc, $d){\n\t\tglobal $ALL;\n\n\t\tif(is_string($inc)){\n\t\t\t$in = glob($inc)\n\t\t}else if(is_array($inc)){\n\t\t\t$in = array();\n\t\t\tforeach ($inc as $v) {\n\t\t\t\t$glock = glob($v);\n\t\t\t\t$in = array_merge($in, $glock);\n\t\t\t}\n\t\t}else{\n\t\t\tif($d) $in = glob($ALL);\n\t\t\telse $in = array();\n\t\t}\n\n\t\treturn array_unique($in);\n\t}",
"function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}",
"public function css_includes()\n {\n }",
"function __eiss_autoload( $_className) {\n\t$read\t=\tfalse ;\n\t$className\t=\t$_className ;\n\t$incDirs\t=\texplode( PATH_SEPARATOR, get_include_path()) ;\n\tforeach( $incDirs as $dir) {\n//\t\terror_log( \"scanning \" . $dir) ;\n\t\tif ( file_exists( $dir . \"/\" . $_className . \".php\")) {\n\t\t\t$read\t=\ttrue ;\n\t\t}\n\t\tif ( $read)\n\t\t\tbreak ;\t\t\t\t\t// no other way to leave a foreach loop\n\t}\n\tif ( $read) {\n\t\trequire_once $className . '.php' ;\n\t} else {\n\t\tthrow new Exception( \"required class file >>>'$_className'<<< does not exist ...\") ;\n\t}\n}",
"static public function IncludeFiles(&$fileNames)\r\n\t{\r\n\t\tforeach ( $fileNames as $fileName )\r\n\t\t{\r\n\t\t\tinclude_once Site::$m_indexRoot . $fileName;\r\n\t\t}\r\n\t}",
"function load_specified_files( array $filenames, $folder_root = '', $ext = '.php' ) {\n\t$folder_root = $folder_root ? : METRO_CORE_DIR . '/inc/';\n\n\tforeach ( $filenames as $filename ) {\n\t\trequire_once $folder_root . $filename . $ext ;\n\t}\n}",
"protected function loadClassFiles() {}",
"function include_classes() {\n\t// Open the includes directory.\n\t$classes = scandir(ABSPATH . '/includes');\n\n\t// Loop through each subdirectory.\n\tforeach ($classes as $class) {\n\t\t// Skip directories.\n\t\tif (is_dir(ABSPATH . '/includes/' . $class)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Check for files matching class.*.php.\n\t\t$file_bits = explode('.', $class);\n\t\tif (count($file_bits) !== 3 || $file_bits[0] !== 'class' || $file_bits[2] !== 'php') {\n\t\t\tcontinue;\n\t\t}\n\t\trequire_once(ABSPATH . '/includes/' . $class);\n\t}\n}",
"function sw_include( $file ) {\n\t$_file_path = TEMPLATEPATH . '/inc/' . $file . '.php';\n\n\tif( file_exists( $_file_path ) ) :\n\t\tinclude $_file_path;\n\telse:\n\t\treturn 0;\n\tendif;\n}",
"function include_css( $strfilename, $params=NULL ){ \n\treturn CIncludeFiles :: includefiles( \"CIncludeCSSFiles\", $strfilename, $params );\t\n}",
"public static function FindUnusedImages()\n {\n }",
"function include_user_files($dir=G_USER_PHP_FILES)\r\n{\r\n log_debug(\"include_user_files( {$dir} )\");\r\n\r\n if (file_exists($dir) && is_dir($dir))\r\n {\r\n $usr = opendir($dir);\r\n\r\n if ($usr)\r\n {\r\n while (false !== ($f = readdir($usr)))\r\n {\r\n if ($f == '.' || $f == '..')\r\n {\r\n continue;\r\n }\r\n\r\n $fn = \"{$dir}/{$f}\";\r\n\r\n if (is_dir($fn))\r\n {\r\n include_user_files($fn);\r\n }\r\n else if (is_file($fn))\r\n {\r\n log_debug(\"Including file {$fn}\");\r\n include_once($fn);\r\n }\r\n }\r\n\r\n closedir($usr);\r\n }\r\n }\r\n}",
"public function includeAllFiles()\n {\n return in_array('all', $this->types);\n }",
"public function inc($file)\n {\n include($file . '.php');\n }",
"function autoload($class) \n{\n $paths = explode(PATH_SEPERATOR, get_include_path());\n $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE;\n $file = str_replace(\"\\\\\", DIRECTORY_SEPARATOR, trim($class, \"\\\\\")).\".php\"; //need to set name of php file to lowercase because of stringtolower command\n foreach ($paths as $path) {\n\t\t $combined = $path.DIRECTORY_SEPARATOR.$file;\n\t\t if (file_exists($combined)) {\n\t\t\t //echo '<br>'.$combined.'<br>'; //Troubleshooting code to echo out the file that's being loaded\n\t\t\t //exit;\n\t\t \tinclude($combined);\n\t\t\t return;\n }\n }\n throw new Exception(\"{$class} not found\");\n}",
"function mySubLoad($className){\n\t$arr = scandir(MYPHP_COMMON);\n\t$name = explode('\\\\', $className);\n\tforeach($arr as $val){\n\t\tif($val == '.' || $val == '..' || is_file(MYPHP_COMMON.'/'.$val)){\n\t\t\tcontinue;\n\t\t}\n\t\t$path = MYPHP_COMMON.'/'.$val.'/'.$name[count($name) - 1].'.class.php';\n\t\tif(file_exists($path)){\n\t\t\trequire_once $path;\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}",
"function PclZipUtilPathInclusion($p_dir, $p_path)\n {\n }",
"public function getUsedFiles() {\n $out = array();\n foreach(get_included_files() as $i => $file) {\n $out[] = array('number' => $i + 1, 'filename' => str_replace(SYS_ROOT, '', $file));\n }\n return $out;\n }",
"public function actionInclude($file) {\n\t\t$function = create_function('$param',\n\t\t\t'unset($param[\"_route\"]);'\n\t\t\t.'$_GET=array_merge($_GET, $param);'\n\t\t\t.'unset($param);'\n\t\t\t.'require_once \"'.$file.'\";');\n\t\t$this->action($function);\n\t}",
"protected function load_files() {\n\t\trequire_once __DIR__ . '/class-papi-admin-meta-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-option-handler.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-post.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-entry-taxonomy.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-columns.php';\n\t\trequire_once __DIR__ . '/class-papi-admin-page-type-switcher.php';\n\t}",
"public function checkRootlineForIncludeSection() {}",
"protected function removeSysFileReferenceRecordsFromImportDataWithRelationToMissingFile() {}",
"public function includeLL() {}",
"public function includeLL() {}",
"function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}",
"function includeIfExists($file)\n{\n if (file_exists($file)) {\n return include $file;\n }\n}",
"function _use($file)\n{\n include_once( $file );\n}",
"public function __construct()\n {\n // By default exclude annoying files\n self::exclusive();\n }",
"function fileWithClassCandidates($file, array $relativeClassNames);",
"private function IncludeCore()\n {\n foreach ($this->core_files as $core_file) {\n $path = \"Core/\" . $core_file . \".php\";\n if (file_exists($path))\n include $path;\n else\n throw new Exception(\"There is no a file named '{$path}'.\", 404);\n }\n }",
"function mapClassFiles( $directory )\n{\n global $_classFiles;\n static $ignore = array( 'Engine/System' );\n\n if ( in_array( $directory, $ignore ) )\n {\n return;\n }\n\n $dir = opendir( $directory );\n while ( ($entry = readdir( $dir ) ) )\n {\n if ( $entry[0] == '.' )\n {\n //ignore ., .., .svn, .git, etc\n continue;\n }\n $file = \"{$directory}/{$entry}\";\n if ( is_dir( $file ) )\n {\n mapClassFiles($file);\n }\n elseif ( is_file( $file ) && preg_match( ';(^|/)([^/]+)[.]inc$;', $file, $regs ) )\n {\n $_classFiles[$regs[2]] = $file;\n }\n }\n}",
"function getIncludedSearchString()\n{\n $searchString = \"\";\n\n $searchString .= getIncludedSearchStringbyName(\"Process_Rewrite\");\n $searchString .= getIncludedSearchStringbyName(\"Process_Extension\");\n $searchString .= getIncludedSearchStringbyName(\"Process_StranglerPattern\");\n $searchString .= getIncludedSearchStringbyName(\"Process_ContinuousEvolution\");\n $searchString .= getIncludedSearchStringbyName(\"Process_Split\");\n $searchString .= getIncludedSearchStringbyName(\"Process_Others\");\n $searchString .= getIncludedSearchStringbyName(\"Decomposition_DDD\");\n $searchString .= getIncludedSearchStringbyName(\"Decomposition_FunctionalDecomposition\");\n $searchString .= getIncludedSearchStringbyName(\"Decomposition_ExistingStructure\");\n $searchString .= getIncludedSearchStringbyName(\"Decomposition_Others\");\n $searchString .= getIncludedSearchStringbyName(\"Technique_SCA\");\n $searchString .= getIncludedSearchStringbyName(\"Technique_MDA\");\n $searchString .= getIncludedSearchStringbyName(\"Technique_WDA\");\n $searchString .= getIncludedSearchStringbyName(\"Technique_DMC\");\n $searchString .= getIncludedSearchStringbyName(\"Technique_Others\");\n $searchString .= getIncludedSearchStringbyName(\"Applicability_GR\");\n $searchString .= getIncludedSearchStringbyName(\"Applicability_MO\");\n $searchString .= getIncludedSearchStringbyName(\"Input_SourceCode\");\n $searchString .= getIncludedSearchStringbyName(\"Input_UseCase\");\n $searchString .= getIncludedSearchStringbyName(\"Input_SystemSpecification\");\n $searchString .= getIncludedSearchStringbyName(\"Input_API\");\n $searchString .= getIncludedSearchStringbyName(\"Input_Others\");\n $searchString .= getIncludedSearchStringbyName(\"Output_List\");\n $searchString .= getIncludedSearchStringbyName(\"Output_Archi\");\n $searchString .= getIncludedSearchStringbyName(\"Output_Others\");\n $searchString .= getIncludedSearchStringbyName(\"Validation_Experiment\");\n $searchString .= getIncludedSearchStringbyName(\"Validation_Example\");\n $searchString .= getIncludedSearchStringbyName(\"Validation_CaseStudy\");\n $searchString .= getIncludedSearchStringbyName(\"Validation_NoValidation\");\n $searchString .= getIncludedSearchStringbyName(\"Quality_Maintainability\");\n $searchString .= getIncludedSearchStringbyName(\"Quality_Performance\");\n $searchString .= getIncludedSearchStringbyName(\"Quality_Reliability\");\n $searchString .= getIncludedSearchStringbyName(\"Quality_Scalability\");\n $searchString .= getIncludedSearchStringbyName(\"Quality_Security\");\n $searchString .= getIncludedSearchStringbyName(\"Quality_Others\");\n\n return $searchString;\n}",
"public function getIncludedSniffs()\n\t\t{\n\t\t\t\treturn array(\n\t\t\t\t\t\t'Generic/Sniffs/Classes/DuplicateClassNameSniff.php',\n\t\t\t\t\t\t'Generic/Sniffs/CodeAnalysis/EmptyStatementSniff.php',\n\t\t\t\t\t\t'Generic/Sniffs/Commenting/TodoSniff.php',\n\t\t\t\t\t\t/*'Generic/Sniffs/Files/LineEndingsSniff.php',\n\t\t\t\t\t\t'Generic/Sniffs/Files/LineLengthSniff.php',*/\n\t\t\t\t\t\t'Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php',\n\t\t\t\t\t\t'Generic/Sniffs/PHP/LowerCaseConstantSniff.php',\n\t\t\t\t\t\t'Generic/Sniffs/PHP/DisallowShortOpenTagSniff.php',\n\t\t\t\t\t\t'Generic/Sniffs/PHP/ForbiddenFunctionsSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Classes/ClassDeclarationSniff.php',\n\t\t\t\t\t\t/*'PEAR/Sniffs/Commenting/ClassCommentSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Commenting/FileCommentSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Commenting/FunctionCommentSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Commenting/InlineCommentSniff.php',*/\n\t\t\t\t\t\t'PEAR/Sniffs/ControlStructures/ControlSignatureSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/ControlStructures/InlineControlStructureSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/ControlStructures/MultiLineConditionSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Files/IncludingFileSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Functions/FunctionCallSignatureSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Functions/FunctionDeclarationSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/Functions/ValidDefaultValueSniff.php',\n\t\t\t\t\t\t/*'PEAR/Sniffs/NamingConventions/ValidClassNameSniff.php',*/\n\t\t\t\t\t\t'PEAR/Sniffs/NamingConventions/ValidFunctionNameSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/NamingConventions/ValidVariableNameSniff.php',\n\t\t\t\t\t\t/*'PEAR/Sniffs/WhiteSpace/ObjectOperatorIndentSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php',\n\t\t\t\t\t\t'PEAR/Sniffs/WhiteSpace/ScopeIndentSniff.php',*/\n\t\t\t\t\t\t'Zend/Sniffs/Files/ClosingTagSniff.php'\n\t\t\t\t\t);\n\n\t\t}",
"public function INCLUDE_CSS(array $conf) {\n if($conf && count($conf)) {\n foreach ($conf as $key => $CSSfile) {\n $cssFileConfig = &$conf[$key . '.'];\n if (isset($cssFileConfig['if.']) && !$GLOBALS['TSFE']->cObj->checkIf($cssFileConfig['if.'])) {\n continue;\n }\n $ss = $cssFileConfig['external'] ? $CSSfile : $GLOBALS['TSFE']->tmpl->getFileName($CSSfile);\n if ($ss) {\n if ($cssFileConfig['import']) {\n if (!$cssFileConfig['external'] && $ss[0] !== '/') {\n // To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)\n $ss = TYPO3\\CMS\\Core\\Utility\\GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/' . $ss;\n }\n $this->pageRenderer->addCssInlineBlock('import_' . $key, '@import url(\"' . htmlspecialchars($ss) . '\") ' . htmlspecialchars($cssFileConfig['media']) . ';', empty($cssFileConfig['disableCompression']), $cssFileConfig['forceOnTop'] ? TRUE : FALSE, '');\n } else {\n $this->pageRenderer->addCssFile(\n $ss,\n $cssFileConfig['alternate'] ? 'alternate stylesheet' : 'stylesheet',\n $cssFileConfig['media'] ?: 'all',\n $cssFileConfig['title'] ?: '',\n empty($cssFileConfig['disableCompression']),\n $cssFileConfig['forceOnTop'] ? TRUE : FALSE,\n $cssFileConfig['allWrap'],\n $cssFileConfig['excludeFromConcatenation'] ? TRUE : FALSE,\n $cssFileConfig['allWrap.']['splitChar']\n );\n unset($cssFileConfig);\n }\n }\n }\n }\n }",
"public function testNotCovered(): void\n {\n $validator = new CodeCoverageValidator();\n\n $srcDir = $this->getProjectPath() . \\DIRECTORY_SEPARATOR . 'src';\n\n $missing = $validator->findFilesWithoutCovers($srcDir);\n\n // Assert that the missing array contains records\n self::assertGreaterThanOrEqual(1, \\count($missing));\n }",
"public function includes() {\n \n include_once( 'widgets/carousel.php' );\n include_once( 'widgets/fancy-text.php' );\n include_once( 'widgets/grid.php' );\n include_once( 'widgets/maps.php' );\n include_once( 'widgets/pricing-table.php' );\n include_once( 'widgets/progress-bar.php' );\n include_once( 'widgets/vertical-scroll.php' );\n \n }",
"function kfn_include( $file, $absolete = false, $include_once = true ) {\r\n\tif ( ! $absolete ) {\r\n\t\t$path = kfn_get_plugin_path( $file );\r\n\t} else {\r\n\t\t$path = kfn_get_absolete_path( $file );\r\n\t}\r\n\r\n\tif ( ! is_wp_error( $path ) ) {\r\n\t\tif ( $include_once ) {\r\n\t\t\tinclude_once( $path );\r\n\t\t} else {\r\n\t\t\tinclude( $path );\r\n\t\t}\r\n\t} else {\r\n\t\tprint_r( $path );\r\n\t}\r\n}",
"private function _getCSSIncludes () {\n $ret = array();\n foreach ($this->_styles as $stylesheet => $included) {\n if (!$included) {\n $this->_styles[$stylesheet] = true;\n array_push($ret, self::CSS_PATH . $stylesheet);\n }\n }\n\n return $ret;\n }",
"function secureInclude($path){\r\n\tif(file_exists(ROOT.'/'.$path))\r\n\t\tinclude_once(ROOT.'/'.$path);\r\n}",
"function _includes() {\n require_once($this->plugin_dir . 'include/actions_class.php');\n require_once($this->plugin_dir . 'include/admin_actions_class.php');\n require_once($this->plugin_dir . 'include/admin_filters_class.php');\n require_once($this->plugin_dir . 'include/ui_class.php');\n require_once($this->plugin_dir . 'include/widget_class.php');\n require_once($this->plugin_dir . 'include/extra_help_class.php');\n require_once($this->plugin_dir . 'include/mobile-listener.php');\n }",
"private function includes(){\n\n\t\tinclude( WPTT_ICS_FEED_FOLDER . '/EasyPeasyICS.php' );\n\n\t}",
"static public function IncludeFile($fileName)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// if file does not exist, then an exception would be generated\r\n\t\t\tif (! file_exists ( Site::$m_indexRoot . $fileName ))\r\n\t\t\t{\r\n\t\t\t\t// if class ExceptionMissFile exist the generate it's instance\r\n\t\t\t\tif (class_exists ( 'ExceptionMissFile' ))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new ExceptionMissFile ( $fileName, $fileName );\r\n\t\t\t\t}\r\n\t\t\t\t// generates regular exception\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception ( $fileName );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn include_once Site::$m_indexRoot . $fileName;\r\n\t\t}\r\n\t\tcatch ( Exception $e )\r\n\t\t{\r\n\t\t\tprint (\"The missed file: \" . $e->getMessage () . \"<br />\\n\") ;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"public function copyOtherFiles(): void;",
"function __autoload( $c ) {\r\n\tinclude( __DIR__.'/'.$c.'.php' );\r\n}",
"function verArchivos() {\n\t\t$archivos_incluidos = get_included_files();\n\t\techo \"<pre>\";\n\t\tprint_r( $archivos_incluidos );\n\t\techo \"</pre>\";\n\t}",
"public function load_files() {\n\n\t\t// Load our admin-related functions.\n\t\tif ( is_admin() ) {\n\t\t\trequire_once( GUPR_DIR . 'lib/admin.php' );\n\t\t}\n\t}",
"function __autoload( $c ) {\n\tinclude( dirname(__FILE__).'/'.$c.'.php' );\n}",
"private function require_files() {\n\t\tif ( file_exists( ABSPATH . '/wp-admin/includes/screen.php' ) ) {\n\t\t\tinclude_once ABSPATH . '/wp-admin/includes/screen.php';\n\t\t}\n\t\tinclude_once ABSPATH . '/wp-admin/includes/template.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/misc.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/class-wp-upgrader.php';\n\t\tinclude_once ABSPATH . '/wp-admin/includes/plugin.php';\n\t}",
"function __autoload($class){\n /* This method looks for all the PHP files that begins with '$class' class name. */\n $classname = strtolower($class);\n if (file_exists(BASE_DIR.DS.'models'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'models'.DS.$classname.'.php');\n }\n if (file_exists(BASE_DIR.DS.'controllers'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'controllers'.DS.$classname.'.php');\n }\n if (file_exists(BASE_DIR.DS.'utilities'.DS.$classname.'.php')){\n // include the file\n require_once(BASE_DIR.DS.'utilities'.DS.$classname.'.php');\n }\n\n\n\n}",
"function incluirCSS($arquivo){ ?>\n\t\t<link href=\"css/<?=$arquivo?>.css\" rel=\"stylesheet\" type=\"text/css\"/>\n\t<?php }",
"function includes() {\r\n\t\t\trequire_once( trailingslashit( RV_PORTFOLIO_DIR ) . 'inc/public/class-rv-portfolio-registration.php' );\r\n\t\t}",
"private function IncludeModels()\n {\n $models_files = array_diff(scandir(\"Models\"), array(\".\", \"..\"));\n foreach ($models_files as $model_file) {\n $path = \"Models/\" . $model_file;\n if (file_exists($path))\n include $path;\n else\n throw new Exception(\"There is no a file named '{$path}'.\", 404);\n }\n }",
"function maquetador_precarga_modulos( $path=\"./modulos\") {\n global $aEstado;\n $nlong = mb_strlen($path)+1;\n foreach ( glob (\"$path/*.php\") as $modulo ) { \n if ( mb_substr($modulo,-9) ==\"_load.php\" ) {\n $aEstado[\"modulos\"][mb_substr($modulo,$nlong,-9)]= false;\n include_once ( $modulo );\n } else {\n $aEstado[\"modulos\"][mb_substr($modulo,$nlong,-4)]= $modulo;\n }\n }\n}",
"function iceinclude($file, $box) {\n global $news_items; /* so the included files know about it */\n $incfile = BASEDIR . \"/files/\" . LANG . \"/$file\";\n if (!file_exists($incfile)) {\n $incfile = BASEDIR . \"/files/en/$file\";\n if (file_exists($incfile)) {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n } else {\n if ($box) {\n include(BASEDIR . GENDIR . \"/cheader\");\n }\n include(\"$incfile\");\n if ($box) {\n include(BASEDIR . GENDIR . \"/cfooter\");\n }\n }\n}",
"protected function getSubCssFile(): void\n {\n preg_match_all(self::REGEX_CSS_IMPORT_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $this->sContents = str_replace($aHit[0][$i], '', $this->sContents);\n $this->sContents .= File::EOL . $this->oFile->getUrlContents($aHit[1][$i] . $aHit[2][$i]);\n }\n }",
"protected function loadFiles() {\n if ($this->loaded === true) {\n return;\n }\n $iter = new RecursiveDirectoryIterator($this->directory);\n $this->iterateFiles($iter);\n $this->loaded = true;\n }",
"function chkFileExists($fileName, $fileFolder, $dspTxt)\n{\n// list($refNumber, $section) = explode('_', $fileName);\n $baseDir = dirname(__FILE__) . DIRECTORY_SEPARATOR;\n //$folder2Scan = $baseDir . $fileFolder . DIRECTORY_SEPARATOR . $fileRefNumber;\n $folder2Scan = $baseDir . $fileFolder;\n\n if (!empty($fileName)) {\n //$directory = getcwd() . $folder2Scan;\n $files2 = glob($folder2Scan . DIRECTORY_SEPARATOR . $fileName . \"*\");\n\n if ($files2) {\n $filecount = count($files2);\n for ($iFiles2 = 0; $iFiles2 < $filecount; ++$iFiles2) {\n ?>\n <!-- <div class=\"col-sm-3\">-->\n <?php\n $tmpGenID4DelIcon = explode(\".\", str_replace($baseDir . $fileFolder . DIRECTORY_SEPARATOR, '', $files2[$iFiles2]));\n $genID4DelIcon = $tmpGenID4DelIcon[0];\n ?>\n <a id=\"id4DelFile_<?= $genID4DelIcon; ?>\"\n href=\"./deleteFile.php?file2Del=<?= $files2[$iFiles2]; ?>&file2Ret=<?= $_SERVER['SCRIPT_NAME']; ?>\"><i\n class=\"far fa-minus-square text-danger\"></i></a>\n <a href=\"<?= str_replace($baseDir, '', $folder2Scan) . str_replace($folder2Scan, '', $files2[$iFiles2]); ?>\"\n target=\"_blank\"><span\n class=\"badge badge-pill badge-primary\"> <?= $dspTxt; ?><!--ที่ --><?/*= $iFiles2 + 1*/; ?>\n </a>\n <!-- </div>-->\n <?php\n }\n } else {\n // Do nothing.....\n echo \"<span class=\\\"badge badge-pill badge-warning\\\">-</span>\";\n }\n }\n}",
"protected static function loadSingleExtTablesFiles() {}",
"function PclZipUtilPathInclusion($p_dir, $p_path)\n {\n $v_result = 1;\n\n // ----- Look for path beginning by ./\n if ( ($p_dir == '.')\n || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) {\n $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1);\n }\n if ( ($p_path == '.')\n || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) {\n $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1);\n }\n\n // ----- Explode dir and path by directory separator\n $v_list_dir = explode(\"/\", $p_dir);\n $v_list_dir_size = sizeof($v_list_dir);\n $v_list_path = explode(\"/\", $p_path);\n $v_list_path_size = sizeof($v_list_path);\n\n // ----- Study directories paths\n $i = 0;\n $j = 0;\n while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) {\n\n // ----- Look for empty dir (path reduction)\n if ($v_list_dir[$i] == '') {\n $i++;\n continue;\n }\n if ($v_list_path[$j] == '') {\n $j++;\n continue;\n }\n\n // ----- Compare the items\n if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) {\n $v_result = 0;\n }\n\n // ----- Next items\n $i++;\n $j++;\n }\n\n // ----- Look if everything seems to be the same\n if ($v_result) {\n // ----- Skip all the empty items\n while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++;\n while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++;\n\n if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) {\n // ----- There are exactly the same\n $v_result = 2;\n }\n else if ($i < $v_list_dir_size) {\n // ----- The path is shorter than the dir\n $v_result = 0;\n }\n }\n\n // ----- Return\n return $v_result;\n }",
"function __autoload($classe) {\n\n $classe = strtolower($classe);\n\n if (file_exists(__DIR__.\"/{$classe}.php\"))\n include_once __DIR__.\"/{$classe}.php\";\n\n if (file_exists(__DIR__.\"/.././model/class.{$classe}.php\"))\n include_once __DIR__.\"/.././model/class.{$classe}.php\";\n\n if (file_exists(__DIR__.\"/.././controller/class.{$classe}.php\"))\n include_once __DIR__.\"/.././controller/class.{$classe}.php\";\n}",
"protected function checkCurrentDirectoryIsInIncludePath() {}",
"protected function compileCss() {\r\n\t\tif(count($this->source_files) == 0) {\r\n\t\t\tfile_put_contents($this->result_file, \"\", FILE_APPEND);\r\n\t\t} else {\r\n\t\t\tforeach($this->source_files as $src_file) {\r\n\t\t\t\tfile_put_contents($this->result_file, file_get_contents($src_file) . PHP_EOL, FILE_APPEND);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private function includeExternalFiles($dirName) {\n if(isset($this->routesCollection[\"imports\"])) {\n foreach($this->routesCollection[\"imports\"] as $resource) {\n if(!isset($resource['resource'])) {\n throw new \\Exception(\"Imports is a reserved keyword. It can only be used to include files via resource keyword\");\n }\n $fileToInclude = $dirName.'/'.$resource['resource'];\n if (!$this->validateRouteFileSyntax($fileToInclude)) {\n $this->logger->addError('The included router '.$fileToInclude.' isn\\'t correct');\n throw new \\Exception('The router YAML file '.$fileToInclude.' isn\\'t correct');\n } else {\n $newRoutes = Yaml::parse(file_get_contents($fileToInclude));\n $this->routesCollection = array_merge($this->routesCollection, $newRoutes);\n }\n }\n unset($this->routesCollection[\"imports\"]);\n }\n }",
"function try_include()\r\n{\r\n\tglobal $admin, $ignore_admin;\r\n\r\n\t$params = func_get_args();\r\n\r\n\tforeach ($params as $tpl)\r\n\t{\r\n\t\tif ($admin and $ignore_admin!==1)\r\n\t\t{\r\n\t\t\t$fileh = EE_ADMIN_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$fileh = EE_PATH.\"templates/\".$tpl.'.tpl';\r\n\t\t}\r\n\r\n\t\t$fileh = get_custom_or_core_file_name($fileh);\r\n\r\n\t\tif (file_exists($fileh) and filesize($fileh)>0)\r\n\t\t{\r\n\t\t\t// don't look in DB because of it's about real template\r\n\t\t\treturn parse_tpl($tpl);\r\n\t\t}\r\n\t}\r\n}",
"private function IncludeLibraries()\n {\n foreach ($this->libraries_files as $library_folder => $library_files) {\n foreach ($library_files as $library_file) {\n $path = \"Lib/\" . $library_folder . \"/\" . $library_file . \".php\";\n if (file_exists($path))\n include $path;\n else\n throw new Exception(\"There is no a file named '{$path}'.\", 404);\n }\n }\n }"
] | [
"0.66078264",
"0.6089782",
"0.5963709",
"0.5927518",
"0.58659625",
"0.58476144",
"0.58259284",
"0.5656457",
"0.56433415",
"0.55700034",
"0.55317366",
"0.550348",
"0.54705834",
"0.5453659",
"0.54402137",
"0.5411179",
"0.54022115",
"0.53722614",
"0.5351041",
"0.5332796",
"0.5319194",
"0.5319087",
"0.5305066",
"0.529167",
"0.5277661",
"0.5241126",
"0.5234844",
"0.5226531",
"0.5202624",
"0.5175966",
"0.5137138",
"0.51243764",
"0.5123973",
"0.511907",
"0.5118109",
"0.5100505",
"0.50977576",
"0.50642735",
"0.5062797",
"0.5044755",
"0.50423276",
"0.50197107",
"0.50096494",
"0.4994914",
"0.49848726",
"0.49698982",
"0.49593437",
"0.49586213",
"0.49549636",
"0.49537164",
"0.49536827",
"0.49517697",
"0.49467984",
"0.49455875",
"0.49394542",
"0.49268875",
"0.49258",
"0.49162588",
"0.49162588",
"0.49145567",
"0.49145567",
"0.4913427",
"0.49108207",
"0.49079853",
"0.48946378",
"0.488138",
"0.48790815",
"0.48750508",
"0.4866806",
"0.48650834",
"0.48558825",
"0.48413578",
"0.48384508",
"0.48270112",
"0.4823297",
"0.48146787",
"0.48074937",
"0.4795424",
"0.47944677",
"0.47889313",
"0.47876215",
"0.4785671",
"0.47839478",
"0.47808406",
"0.47802898",
"0.47774246",
"0.47761077",
"0.4772427",
"0.47722977",
"0.47720185",
"0.47705236",
"0.47676948",
"0.4765463",
"0.4764895",
"0.47641572",
"0.47619787",
"0.4756581",
"0.47433424",
"0.47423726",
"0.47387367"
] | 0.47779766 | 85 |
/ set authenticated facebook object for this $this | public function setFacebook($fb)
{
$this->fb = $fb;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct() {\n header('P3P:CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"');\n $config = array(\n 'appId' => FBConfig::appID(),\n 'secret' => FBConfig::appSecret());\n parent::__construct($config);\n return ($this->getUser());\n }",
"private function __setUser() {\n // Create the (helper) user object from the authenticated subject if present\n $subject = \\Native5\\Identity\\SecurityUtils::getSubject();\n if ($subject->isAuthenticated()) {\n $this->user = \\Akzo\\User\\Service::getInstance()->getUser(\n $subject->getPrincipal()['username'],\n $subject\n );\n }\n }",
"public function setAuthenticated();",
"protected function facebookAuthenticate(){\n\n\t\t\n\t}",
"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 facebook()\n {\n return $this->auth('Facebook');\n }",
"protected function __construct()\n\t{\n\t\t// Load config\n\t\t$this->_config = Kohana::$config->load('facebook');\n\t\t\n\t\tinclude Kohana::find_file('vendor', 'facebook/facebook');\t\t\n\t\t// Create Facebook object\n\t\t$this->_facebook = new Facebook(\n\t\t\tarray(\n\t\t\t\t'appId' => $this->_config->get('appId'),\n\t\t\t\t'secret' => $this->_config->get('secret'),\n\t\t\t\t'cookie' => $this->_config->get('cookie')\n\t\t\t)\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t$this->_me = $this->_facebook->api('/me');\n\t\t\t$this->_user = $this->_facebook->getUser();\n\t\t}\n\t\tcatch (FacebookApiException $e)\n\t\t{\n\t\t\t// Do nothing.\n\t\t}\n\t\t\n\t\t$this->login_url = '';\n\t}",
"private function _setIdentity(){\n $this->_setUserData($this->getClassUser()->getIdentity());\n }",
"public function __construct(){\n\n $this->facebook = new Facebook(array(\n\n 'appId' => self::APP_ID,\n\n 'secret' => self::APP_SECRET,\n\n ));\n\n }",
"protected function __construct() \n {\n include Kohana::find_file('vendor', 'facebook');\n\n // Load configuration \"config/facebook\"\n $this->config = Kohana::$config->load('facebook');\n\n // Create new Facebook object\n $this->fb = new Facebook(array(\n 'appId' => $this->config->appId,\n 'secret' => $this->config->secret,\n 'cookie' => $this->config->cookie,\n 'session_type' => $this->config->session_type,\n ));\n\n try {\n $this->me = $this->fb->api('/' . $this->fb->getUser(), 'GET');\n } catch (FacebookApiException $e) {\n // Do nothing.\n }\n }",
"public function getFacebook()\n {\n return $this->facebook;\n }",
"public function __construct()\n\t{\n\t\t//call parent's constuctor\n\t\tparent::__construct();\n\t\t\n\t\t//oc: fix for ie8\n\t\theader('p3p: CP=\"NOI ADM DEV PSAi COM NAV OUR OTR STP IND DEM\"');\n\n\t\t//oc: prepare facebook library\n\t\t$this->_fb_config\t= array(\n\t \t'appId' => $this->config->item('facebook_app_id'),\n \t\t\t'secret' => $this->config->item('facebook_app_secret'),\n\t\t\t'cookie' => true,\n\t\t);\n\t\t\n\t\t$this->load->library('facebook', $this->_fb_config);\n\t\t$this->_signedRequest \t= $this->facebook->getSignedRequest();\n\t\t\n\t\t\n\t\t//oc: appData\n\t\tif( !empty($this->_signedRequest) && !empty($this->_signedRequest['app_data']) ){\n\t\t\t$this->_appData = json_decode(urldecode($this->_signedRequest['app_data']));\t\t\t\n\t\t\t\t\t\t\n\t\t}\n\t\t//oc: access token\n\t\tif(isset($this->_appData->access_token)){\n\t\t\t$this->_access_token = $this->_appData->access_token;\n\t\t\t$this->session->set_userdata('oauth_token', $this->_appData->access_token );\n\t\t}\n\t\t//+++++++++++++++++++++++++++++++++++++++++\n\t\t//oc: oAuth at front of app\n\t\t//+++++++++++++++++++++++++++++++++++++++++\n\n\t\t//get the login url in case we don't have auth yet.\n\t\t$url = base_url().\"redirect/\";\n\t\tif($this->input->get_post('tid')) $url.= $this->input->get_post('tid');\n\t\t\n\t\t$authParams = array(\t'redirect_uri' => $url,\n\t\t\t\t\t\t\t\t'scope'=>'publish_stream,user_photos,user_likes,user_photo_video_tags'\n\t\t);\n\t\t$this->_loginUrl = $this->facebook->getLoginUrl($authParams);\n\t\t\n\t\t$this->_fb_config['login_url'] = $this->_loginUrl;\n\t\t\n\t\t//try and get the auth token from facebook first.\n\t\t$this->_access_token = $this->facebook->getAccessToken();\n\t\t\n\t\t//if the facebook didn't give the token check for it in the signed request. \n\t\t//else if the signed request didn't have it try and get it from the cookie.\n\t\tif( !isset($this->_access_token) && isset($this->_signedRequest['oauth_token']) )\n\t\t\t$this->_access_token \t= $this->_signedRequest['oauth_token'];\n\t\telse\n\t\t\t$this->_access_token\t= $this->session->userdata('oauth_token');\n\t\t\n\t\t//if we have an auth token save it to the cookie.\n\t\tif( !empty($this->_access_token) )\n\t\t\t$this->session->set_userdata('oauth_token', $this->_access_token);\n\t\t\n\t\t//+++++++++++++++++++++++++++++++++++++++++\n\t\t//oc: oAuth END\n\t\t//+++++++++++++++++++++++++++++++++++++++++\n\n\t\t\n\t\t\n\t\t//oc: like status\n\t\tif( isset($this->_signedRequest['page'][\"liked\"]) ){\n\t\t\t$this->_likeStatus = $this->_signedRequest[\"page\"][\"liked\"];\n\t\t\t$this->session->set_userdata('like_status', $this->_likeStatus);\n\t\t} else {\n\t\t\t$this->_likeStatus = $this->session->userdata('like_status');\n\t\t}\n\n\t\t//oc: tid\n\t\t$this->_tid\t= $this->input->get(\"tid\");\n\t\tif (!$this->_tid) $this->_tid = 0;\n\t\tif(count($this->_appData) > 0 && isset($this->_appData->tid))\t$this->_tid\t= $this->_appData->tid;\n\t\t\n \t\t//oc: determine if we need to worry about this nonsense (like gate).\n \t\t$this->_isLocal = (ENVIRONMENT != \"production\" && ENVIRONMENT != \"cfm_staging\");\n\t\t\n \t\t$this->_fb_config['like_status']\t= $this->_likeStatus;\n \t\t$this->_fb_config['like_url'] \t\t= $this->config->item('facebook_like_url'); \n \t\t\n \t\t\n\t\t//oc: data for the view\n\t\t$this->_viewData\t= array(\n\t\t\t'cdn'\t\t=> base_url(),\n//oc: this loads preloader\n\t\t\t//'swf'\t\t=> \"Sharp.swf\",\n\t\t\t'swf'\t\t=> \"SharpPreloader.swf\",\n\t\t\t'gaId'\t\t=> $this->config->item('GOOGLE_ANALYTICS_ID'),\n\t \t'appId' \t=> $this->config->item('facebook_app_id'),\n \t\t\t'secret' \t=> $this->config->item('facebook_app_secret'),\n\t\t\t'appData'\t=> $this->_appData,\n\t\t\t'login_url'\t=> $this->_loginUrl,\t\t\n\t\t\t'likeStatus'=> $this->_likeStatus,\n\t\t\t'tid'\t\t=> $this->_tid,\n\t\t\t'hashtag'\t=> $this->config->item('twitter_hashtag'),\n\t\t\t'defaultVid'=> $this->config->item('default_video')\n\t\t);\n\t}",
"public function __construct()\n {\n $this->current_user = Auth::getUser();\n }",
"private function __construct()\r\n\t{\t\t\r\n\t\t$this->m_fb = new Facebook(array(\r\n\t\t\t'appId' => '198517920178057',\r\n\t\t\t'secret' => '52e29c0fd4f0e233db6120e4b0189a37'\r\n\t\t));\r\n\t}",
"public function getFacebook()\n {\n return $this->facebook;\n }",
"public function init($start = true) {\n App::import('Vendor', 'Facebook', array('file' => 'facebook' . DS .'facebook.php'));\n $this->facebook = new Facebook(array(\n 'appId' => $this->settings['appId'],\n 'secret' => $this->settings['secret'],\n ));\n \n if ($start) {\n $user = $this->facebook->getUser();\n if ($user) {\n $this->me = $this->api('/me');\n $this->uid = $user;\n\n $this->controller->set('facebookSession', $this->session);\n $this->controller->set('me', $this->me);\n } else {\n $this->_authRedirect();\n }\n }\n }",
"public function __loadUser()\n {\n\t$facebook = $this->fb;\n\t$this->user = $facebook->api(\"/me\", \"GET\");\n\t$this->userid = $facebook->getUser();\n\treturn;\n }",
"public function get_facebook() {\r\n return $this->facebook;\r\n }",
"public function init()\n {\n \t$auth = Zend_Auth::getInstance();\n \tif($auth->hasIdentity()){\n \t\t$this->identity = $auth->getIdentity();\n \t}\n }",
"public function __construct() {\r\n $this->session = ci('load')->library('session')->session;\r\n $this->authentication = ci('load')->model('social/authentication_m')->authentication_m;\r\n }",
"public function auth_user()\n {\n //echo $this->id;\n //echo $this->username. ' is authenticated';\n }",
"public function __construct(Facebook $facebook)\n {\n $this->facebook = $facebook;\n $this->avatarManager = new Avatar(new Options, $this->facebook);\n }",
"public function __construct()\n {\n $this->user = JWTAuth::parseToken()->authenticate();\n }",
"public function facebook()\n\t{\n\t\tif ( ! $this->_facebook)\n\t\t{\n\t\t\tKohana::load(Kohana::find_file('vendor/facebook-php-sdk', 'facebook'));\n\n\t\t\t$this->_facebook = new Facebook(array(\n\t\t\t\t'appId' => Kohana::$config->load('facebook.app_id'),\n\t\t\t\t'secret' => Kohana::$config->load('facebook.app_secret'),\n\t\t\t));\n\t\t}\n\n\t\treturn $this->_facebook;\n\t}",
"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 setUser(OAuthUserInterface $user);",
"public function setUser($value)\n {\n if ($value !== null) {\n $this->_user = $value;\n } else {\n $this->_user = Zend_Gdata_Photos::DEFAULT_USER;\n }\n }",
"final private function __construct(){\n\t\tself::$graph=new Facebook(array(\n\t\t\t\t\t'appId'=>self::$config['appId'],\n\t\t\t\t\t'secret'=>self::$config['secret'],\n\t\t\t\t\t'cookie'=>self::$config['cookie'],\n\t\t\t\t\t'domain'=>self::$config['domain'],\n\t\t\t\t\t'fileUpload'=>self::$config['fileUpload'],\n\t\t\t\t));\n\t}",
"public function setFacebook($facebook)\n {\n $this->facebook = $facebook;\n\n return $this;\n }",
"public function facebook()\n {\n return facebook()->login();\n }",
"public function __construct(){\n\t\t parent::__construct();\n\t\t $this->connect();\n\t\t // $this->currentUser = $user;\n\t\t }",
"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 setSettings() {\n $this ->setAccessToken( $this ->token );\n $this ->setAccountId( self::ACCOUNT_ID );\n }",
"public function setUser()\n\t{\n\t\t$user = User::getInstance();\n\t\t\n\t\tif ( $this->session->get( 'user_id' ) ) {\n\t\t\t$user->set( 'id', $this->session->get( 'user_id' ) );\n\t\t\t$user->read();\n\t\t}\n\t}",
"protected function objectUserEnCours(){\n $fbUid = $this->getRequest()->getSession()->get('_fos_facebook_fb_482361481839052_user_id');\n $user = $this->getDoctrine()->getManager()->getRepository('MetinetFacebookBundle:User')->findOneByfbUid($fbUid);\n return $user ;\n }",
"public function getFacebook()\n\t{\n\t\treturn $this->facebook;\n\t}",
"public function setAuthorization()\n\t{\n\t\t// @TODO We don't deal with a case where during your session the token expires\n\t\tif (is_null($this->access_token))\n\t\t{\n\t\t\t$response = $this->getToken();\n\t\t\t$this->access_token = $response->access_token;\n\t\t\t$this->authorization = \"Bearer \" . $this->access_token;\n\t\t}\n\t}",
"public function auth()\n {\n return $this;\n }",
"public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }",
"public function authenticate($access_token_val='')\r\n { \r\n /**********make the access token Extended by extend_access_token() and get extended token********/\r\n $extended_access_token_val = $this->extend_access_token($access_token_val);\r\n if($extended_access_token_val==''){\r\n $access_token_val = $extended_access_token_val;\r\n } \r\n\r\n \r\n /***running FQL to fetch data from facebook ****/\r\n // $fql = urlencode(\"SELECT post_id,viewer_id,source_id,updated_time,created_time,actor_id,message,attachment,permalink ,type FROM stream WHERE source_id = me() AND actor_id = me() order by created_time desc LIMIT 5\");\r\n $fql = urlencode(\"SELECT uid,about_me, birthday, current_location, first_name, has_added_app, hometown_location, last_name, locale, birthday_date, pic, pic_with_logo, pic_big, pic_big_with_logo, pic_small, pic_small_with_logo, pic_square, pic_square_with_logo, profile_url, proxied_email, email, contact_email, sex, meeting_sex, status, timezone, website, education_history, work_history, work, education, hs_info, religion, relationship_status, political, activities, interests, family, music, tv, movies, books, username, quotes, sports, favorite_teams, favorite_athletes, inspirational_people, languages FROM user WHERE uid = me()\");\r\n $content = $this->process_fql($fql,$access_token_val);\r\n \r\n //pr($content['data'][0],1);\r\n \r\n $user_meta = $this->session->userdata('current_user_session'); // get current user data loggedin\r\n\t\t\r\n\t\t/*pr($content['data'][0]);\r\n\t\tpr($content,1);\r\n\t\texit;*/\r\n \r\n if(isset($content->error))\r\n echo 'A user of access token '.$access_token_val. ' got following error while fetching user details'.$temp_ret_graph;\r\n else\r\n { \r\n\t\t\t\tif(empty($user_meta)) { \r\n\t\t\t\t\t\r\n\t\t\t\t if($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\tredirect(base_url().'user/profile'); \r\n\t\t\t\t\t\t\r\n\t\t\t\t } else {\r\n\t\t\t\t\t\tif($this->register_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\tif($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\t\t\tredirect(base_url().'user/profile');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\techo 'login failed!';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//echo 'registration failed!';\r\n\t\t\t\t\t set_error_msg(message_line('fb_reg_fail')); // either user email is not verified in fb \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// or kept private, so goto signup page\r\n\t\t\t\t\t redirect(base_url('user/signup'));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} \r\n\t\t\t\telse {\r\n\t\t\t\t\tif($user_meta[0]['s_email'] == $content['data'][0]['email'] ){\r\n\t\t\t\t\t\t$content['data'][0]['access_token'] = $access_token_val;\r\n\t\t\t\t\t\t$this->user_model->update_data(array(\"s_facebook_credential\"=>serialize($content['data'][0])),\r\n\t\t\t\t\t\t\t\tarray(\"i_id\"=> $user_meta[0]['i_id'])\r\n\t\t\t\t\t ); \r\n\t\t\t\t\t\tset_success_msg('facebook account add success');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tset_error_msg('facebook account email not match');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tredirect(base_url().\"user/profile\");\r\n\t\t\t\t}\r\n } \r\n\r\n\t\t}",
"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 }",
"private function __construct() \n {\n \n\t\t$this->_storage = new Tg_Auth_Storage_Session();\n\t\t$this->_adapter = new Tg_Auth_Adapter_User();\n\t\t$this->_auth = Zend_Auth::getInstance();\n $this->_auth->setStorage($this->_storage);\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 init()\n {\n $this->accessToken = 'EAAPgIZBacbTMBAJnVjjmoOW3tjZClqcJDUP3NZB5Dbi72zA2Ix8tE5qviZAE4BF3UqluxlZCLAOnlqe0WYeTXGZBTesuyGPQXb7iPZAC2qOWnX376GvrvZAiO34bcEJ7TYyPqgqV2uLZAkvHD8DkjuPZC7OEpS91ydHnNXbEPpclLSQQZDZD';\n }",
"public function preDispatch() {\r\n\t\t$this->_auth = Zend_Auth::getInstance();\r\n\t\t$this->_auth->setStorage(new Zend_Auth_Storage_Session('Fancrank_App'));\r\n\t\t//\r\n\t\tif(!$this->_auth->hasIdentity()) {\r\n\t\t\t$this->_helper->json(array('message'=>'authentication failed','code'=>400));\r\n\t\t\t//set the proper navbar\r\n\t\t}\r\n\t\t$this->_helper->layout()->disableLayout();\r\n\t\t$this->_helper->viewRenderer->setNoRender();\r\n\t\t$this->_user = $this->_auth->getIdentity();\r\n\t\t\r\n\t\tif ($this->_getParam('id') != $this->_user->facebook_user_id){\r\n\t\t\techo \"IDENTITY AND PARAMETER ID DOES NOT MATCH\"\t;\r\n\t\t\texit();\r\n\t\t}\r\n\t}",
"public static function auth() : ?object\n {\n // Retrieve the \"full user\" just one time\n if (self::$fullUser) {\n return self::$fullUser;\n }\n\n if (! $token = $_COOKIE['NameYourGoat_User_Token'] ?? null) {\n return null;\n }\n\n if (! $user = Repository\\User::byToken($token)) {\n setcookie('NameYourGoat_User_Token', null, 0, '/');\n return null;\n }\n\n self::authCookie($token);\n\n return self::$fullUser = $user;\n }",
"public function __construct()\n {\n $this->initCurrentUser();\n }",
"public function setAuthenticationParams() {\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 authAction()\n\t{\n\t\t$form = new Player_ConnFacebookUserForm();\n\t\t$this->view->form = $form;\n\t\t$session = new Zenfox_Auth_Storage_Session();\n\t\t$sessionData = $session->read();\n\t\t$userId = $sessionData['id'];\n\t\t$facebookConnect = new ThirdpartyConnect();\n\t\t$iData['playerId'] = $userId;\n\t\t$iData['domain'] = 'facebook';\n\t\tif($this->getRequest()->isPost())\n\t\t{\n\t\t\tif($form->isValid($_POST))\n\t\t\t{\n\t\t\t\t$data = $form->getValues();\n\t\t\t\t\n\t\t\t\t$player = new Player();\n\t\t\t\t$authArray = $player->authenticate($data['name'], $data['password']);\n\t\t\t\t$zendAuthResult = $authArray[0];\n\t\t\t\tif($zendAuthResult->getCode()== Zend_Auth_Result::SUCCESS)\n\t\t\t\t{\n\t\t\t\t\t$parentId = $authArray[1][0]['player_id'];\n\t\t\t\t\t$data['parentId'] = $parentId;\n\t\t\t\t\t$data['linked'] = 'YES';\n\t\t\t\t\t$data['domain'] = 'facebook';\n\t\t\t\t\t$data['playerId'] = $userId;\n\t\t\t\t\t//Zenfox_Debug::dump($data, 'data');\n\t\t\t\t\t$facebookConnect->updateData($data);\n\t\t\t\t\t$this->view->submit = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_helper->FlashMessenger(array('error' => $this->view->translate('The username or password, you entered, did not match.')));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$facebookConnect->insertData($iData);\n\t\t}\n\t}",
"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}",
"public function __construct() {\n $this->fb = new Facebook([\n 'app_id' => Config::FB_APP_ID,\n 'app_secret' => Config::FB_APP_SECRET,\n 'default_graph_version' => Config::FB_DEFAULT_GRAPH_VERSION,\n ]);\n }",
"public function __construct(){\n $this->user = Auth::user();\n }",
"protected function set_current_user()\n\t{\n\t\tif (class_exists('Auth'))\n\t\t{\n\t\t\t// Load our current logged in user for convenience\n\t\t\tif ($this->auth->is_logged_in())\n\t\t\t{\n\t\t\t\t$this->current_user = clone $this->auth->user();\n\n\t\t\t\t$this->current_user->user_img = gravatar_link($this->current_user->email, 22, $this->current_user->email, \"{$this->current_user->email} Profile\");\n\n\t\t\t\t// if the user has a language setting then use it\n\t\t\t\tif (isset($this->current_user->language))\n\t\t\t\t{\n\t\t\t\t\t$this->config->set_item('language', $this->current_user->language);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make the current user available in the views\n\t\t\tif (!class_exists('Template'))\n\t\t\t{\n\t\t\t\t$this->load->library('Template');\n\t\t\t}\n\t\t\tTemplate::set('current_user', $this->current_user);\n\t\t}\n\t}",
"public function convert()\n\t{\n\t\tif (isset($this->fb_data['id'])) \n\t\t{\n\t\t\t$this->user->set_facebook_id($this->fb_data['id'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['first_name']))\n\t\t{\n\t\t\t$this->user->set_first_name($this->fb_data['first_name'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['last_name'])) \n\t\t{\n\t\t\t$this->user->set_last_name($this->fb_data['last_name'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['birthday'])) \n\t\t{\n\t\t\t$this->user->set_birthday( (int) strtotime($this->fb_data['birthday']), TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['gender'])) \n\t\t{\n\t\t\t$this->user->set_gender(substr($this->fb_data['gender'], 0, 1), TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['email']))\n\t\t{\n\t\t\t$this->user->set_email($this->fb_data['email'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['timezone']))\n\t\t{\n\t\t\t$this->user->set_timezone( (int) $this->fb_data['timezone'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['locale'])) \n\t\t{\n\t\t\t$this->user->set_country_code(substr($this->fb_data['locale'], -2), TRUE);\n\t\t}\n\t\treturn($this);\n\t}",
"public function __construct(\\SammyK\\LaravelFacebookSdk\\LaravelFacebookSdk $fb)\n {\n parent::__construct();\n $this->fb = $fb;\n }",
"public function __construct()\n {\n // auth here\n }",
"public function __construct()\n {\n $this->auth_model = new authModel();\n session();\n }",
"public function __construct()\n {\n $this->user = User::getMe();\n }",
"private function _setupAuth()\n {\n $this->_auth = Zend_Auth::getInstance();\n }",
"public function init(){\n if( !isset($this->access_token) && !StileroFlickrFrob::hasFrobInGetRequest() ){\n $Url = new StileroFlickrUrl($this->Api);\n $Url->redirectToUrl($this->perms);\n }else if( StileroFlickrFrob::hasFrobInGetRequest() ){\n $this->Frob->fetchFrob();\n $Authtoken = new StileroFlickrAuthtoken($this->Api, $this->Frob);\n $Authtoken->requestToken();\n $this->access_token = $Authtoken->token;\n }if(isset($this->access_token)){\n $this->_endpoints();\n }\n return $this;\n }",
"function __construct(){\r\n if(isset($_SESSION['login']) && $_SESSION['login'] == 'true' && isset($_SESSION['username'])){\r\n $this->username = $_SESSION['username'];\r\n $this->login = $_SESSION['login'];\r\n $this->email = $_SESSION['email'];\r\n $this->credential = $_SESSION['credential'];\r\n $this->picture = $_SESSION['picture'];\r\n $this->academy = $_SESSION['fullname'];\r\n }\r\n }",
"public function __construct()\n {\n $this->user = Auth::user();\n }",
"public function setUser($user)\n{\n$this->user = $user;\n\nreturn $this;\n}",
"function setUser($user) {\n $this->userObject = $user;\n }",
"public function handleFacebookCallback()\n {\n \n $user = Socialite::driver('facebook')->user();\n\n \n }",
"public function authenticate($object);",
"public function facebookLogin() {\n\t\t$this->autoRender = false;\n\n\t\t// config of facebook\n\t\t// app_id => app id from facebook app, app_secret => app secret from facebook app, default_graph_version\n\t\t$fb = new Facebook\\Facebook([\n\t\t\t'app_id' => '1038913562917167',\n\t\t\t'app_secret' => 'c0df3e628a09c24f972985ad47dee466',\n\t\t\t'default_graph_version' => 'v2.10',\n\t\t]);\n\n\t\t$helper = $fb->getRedirectLoginHelper();\n\n\t\t$permissions = ['email']; // Optional permissions\n\t\t$loginUrl = $helper->getLoginUrl('http://myanants.com/user/fbcallback', $permissions);\n\t\t$this->redirect($loginUrl);\n\n\t}",
"public function init()\n\t{\n //https://www.facebook.com/FacebookDevelopers\n if (!empty($this->username)) $this->username = $this->username;\n if (empty($this->lang)) $this->lang = 'en_US';\n if (empty($this->width)) $this->width = 292;\n if (empty($this->height)) $this->height = 550;\n if (empty($this->show_faces)) $this->show_faces = true;\n if (empty($this->color_scheme)) $this->color_scheme = 'light';\n if (empty($this->show_stream)) $this->show_stream = true;\n if (empty($this->show_border)) $this->show_border = true;\n if (empty($this->show_header)) $this->show_header = true;\n\t}",
"public function setUser(Authenticatable $user)\n {\n $this->session->put('google_guard_user', $user);\n $this->session->put('socialite_token', $user->token);\n }",
"public function set()\n\t{\n\t\t$this->created_at = date(TIMESTAMP_FORMAT);\n $user = new SessionUser();\n\t\t$this->created_by = $user->getID();\t\t\n\t}",
"public function __construct()\n {\n //\n $this->user = Auth::user();\n }",
"public function __construct() {\r\n\t\tif(!$this->isLoggedIn()) {\r\n\t\t\theader('location: ' . URL . 'authentication/index');\r\n\t\t\texit();\r\n\t\t}\r\n\t\t\r\n\t $this->loadModel($this->modelToLoad);\r\n\t $this->model->setAuth($_SESSION['ID'], $_SESSION['PASSWORD']);\r\n\t\t\r\n\t\tparent::__construct();\r\n\t}",
"public function __construct() {\n\t\tparent::__construct();\n\t\t$this->commentsModel = new CommentsModel();\n\t\t$this->blogpostModel = new BlogpostModel();\n\t\t$this->fb = new FacebookLogin();\n\t\t$this->fbUser = $this->fb->checkLogin();\n\t}",
"function handle_fb_login() {\n\t\t$this->load->library('facebook');\n\n\t\tif(!$this->facebook->is_authenticated()){\n\t\t\tredirect('user/login');\n\t\t}\n\n\t\t$oFbUserData = (object) $this->facebook->request('get', '/me?fields=id,email,first_name,middle_name,last_name,gender,birthday,age_range');\n\n\t\tif(!isset($oFbUserData->email) || (isset($oFbUserData->email) && '' != $oFbUserData->email)){\n\t\t\tsf('error_message', \"You hav'nt allowed email permission on facebook.\");\n\t\t}\n\n\n//\t\t$user_profile = $this->facebook->api('/me');\n\n\t\t//p('AFTER');\n\n\t\t//$oFbUserData = (object)$user_profile;\n\n\t\tif($oSystemUserData = $this->user_model->getUserBy('facebook_id', $oFbUserData->id)){\n\n\t\t\tif($oSystemUserData->status == $this->aUserStatus['closed']){\n\n\t\t\t\t//reactivate the account\n\t\t\t\t$this->account_model->activateAccount($oSystemUserData->id);\n\t\t\t\tsf('success_message', 'Good To have you back!!');\n\n\t\t\t} elseif($oSystemUserData->status == $this->aUserStatus['blocked']){\n\n\t\t\t\t\tsf('error_message', \"Your account is blocked. \\nPlease use the Contact Us page to contact the Administrator\");\n\t\t\t\t\tredirect('home');\n\n\t\t\t}\n\n\t\t\t//proceed with login\n\t\t\tif($this->authentication->makeLogin($oSystemUserData->facebook_id, 'facebook_id')){\n\t\t\t\tredirect('home');\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'There was some problem. Could not log you in.');\n\t\t\t\tredirect('home');\n\t\t\t}\n\n\t\t} else {\n\t\t\t\t//consider this as a first time login\n\t\t\t\t//proceed with registration, mail sending, and login\n\t\t\t\tif(!$oSystemUserData = $this->user_model->getUserBy('email_id', $oFbUserData->email)) {\n\n\t\t\t\t\t$this->load->helper('custom_upload');\n\t\t\t \t$sUrl = getFbImage((object)array('facebook_id' => $oFbUserData->id), array('type'=>'large'), false);\n\t\t\t \t$aImageData = urlUpload('image', 'profile_pic', $sUrl);\n\n\t\t\t\t\t//registration\n\t\t\t\t\t$aUserData['facebook_id'] \t= $oFbUserData->id;\n\t\t\t\t\t$aUserData['email_id'] \t\t= $oFbUserData->email;\n\t\t\t\t\t$aUserData['account_no'] \t= $this->authentication->generateAccountNumber();\n\t\t\t\t\t$aUserData['type'] \t\t\t= $this->aUserTypes['user'];\n\t\t\t\t\t$aUserData['status'] \t\t= $this->aUserStatus['active'];\n\t\t\t\t\t$aUserData['joined_on'] \t= date('Y-m-d');\n\t\t\t\t\t$aUserData['first_name'] \t= isset($oFbUserData->first_name) ? $oFbUserData->first_name : '';\n\t\t\t\t\t$aUserData['middle_name'] \t= isset($oFbUserData->middle_name) ? $oFbUserData->middle_name : '';\n\t\t\t\t\t$aUserData['last_name'] \t= isset($oFbUserData->last_name) ? $oFbUserData->last_name : '';\n\t\t\t\t\t$aUserData['gender'] \t\t= $this->aGenders[$oFbUserData->gender];\n\t\t\t\t\t$aUserData['profile_image'] = $aImageData['file_name'];\n\n\t\t\t\t\tif(isset($oFbUserData->birthday) && '' != $oFbUserData->birthday){\n\t\t\t\t\t\t$aBirthday \t= explode('/', $oFbUserData->birthday); // mm/dd/yyyy\n\t\t\t\t\t\t$aUserData['birthday'] \t\t= $aBirthday[2].'-'.$aBirthday[0].'-'.$aBirthday[1];\n\t\t\t\t\t}\n\t\t\t\t\t$this->db->set ($aUserData);\n\t\t\t \t$this->db->insert ('users');\n\n\t\t\t \t$iUserId = $this->db->insert_id();\n\n\n\t\t\t \t//Login\n\t\t\t \t$this->authentication->makeLogin($oFbUserData->id, 'facebook_id');\n\n\t\t\t \t$this->account_model->activateAccount($iUserId);\n\n//\t\t\t \tupdate the profile pictures page\n//\t\t\t \t$aUploadType = c('profile_pic_upload_type');\n//\t\t\t \t$aProfilePicData = array(\n//\t\t\t \t\t'user_id' => $iUserId,\n//\t\t\t \t\t'current_pic' => $aUploadType['facebook'],\n//\t\t\t \t\t'facebook' => $aImageData['file_name'],\n//\t\t\t \t);\n\n\n\t\t\t\t\t/*$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t \t$aWelcomeEmail['receiver_name'] = $aUserData['first_name'];\n\t\t\t \t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\t\t\t\t\t*/\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array($oFbUserData->email=>$aUserData['first_name']), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t//p(sendMail_PHPMailer($aSettings));exit;\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\t$this->session->set_flashdata ('success_message', 'Welcome to '.$this->mcontents['c_website_title']);\n\n\t\t\t \tredirect('home');\n\n\t\t\t\t} else {\n\t\t\t\t\techo '3';exit;\n\t\t\t\t\tsf('error_message', 'We already have an account associated with the email id '.$oFbUserData->email);\n\t\t\t\t\tredirect('home');\n\t\t\t\t}\n\t\t\t\t//$aFBUserData['facebook_id'] =\n\t\t}\n\n\t}",
"public function authenticateCredential()\n {\n $sessionToken = $this->login();\n $this->credential->setSessionToken($sessionToken);\n }",
"public function __construct()\n {\n $oConfig = oxRegistry::getConfig();\n\n $aFbConfig[\"appId\"] = $oConfig->getConfigParam(\"sFbAppId\");\n $aFbConfig[\"secret\"] = $oConfig->getConfigParam(\"sFbSecretKey\");\n $aFbConfig[\"cookie\"] = true;\n\n BaseFacebook::__construct($aFbConfig);\n }",
"public function getCurrentUser(){\n $currentUser = $_SESSION['userdata'];\n\n // Sets the user object\n $this->setUser($currentUser->control);\n\n }",
"public static function factory() \n {\n return new FacebookAuth();\n }",
"function loginBegin()\r\n\t{\r\n\t\t// if we have extra perm\r\n\t\tif( isset( $this->config[\"scope\"] ) && ! empty( $this->config[\"scope\"] ) )\r\n\t\t{\r\n\t\t\t$this->scope = $this->scope . \", \". $this->config[\"scope\"];\r\n\t\t}\r\n\r\n\t\t// get the login url \r\n\t\t$url = $this->api->getLoginUrl( array( 'scope' => $this->scope, 'redirect_uri' => $this->endpoint ) );\r\n\r\n\t\t// redirect to facebook\r\n\t\tHybrid_Auth::redirect( $url ); \r\n\t}",
"public function __construct()\n {\n # code...\n //$this->auth = $auth;\n // $this->$id = $id;\n }",
"public function getFacebook()\n\t{\n\t\treturn $this->fb;\n\t}",
"public function __construct()\n {\n $Auth = new auth(true);\n $this->userData = $Auth->CheckToken();\n // var_dump($Auth);\n }",
"public function init() {\r\n $this->_model = new Storefront_Model_User();\r\n\r\n $this->_authService = Storefront_Service_Authentication::getInstance(\r\n $this->_model\r\n );\r\n }",
"public function facebook(){\n\t\t// get redirect URL\n\t\t$requestUrl = $this->input->get(\"redirect\");\n\t\t\n\t\t// perform Facebook login\n\t\t$res = false;\n\t\ttry {\n\t\t\t$res = $this->login_util->loginFacebook($this->config->item('facebook_app_id'), $this->config->item('facebook_secret'), $requestUrl);\n\t\t} catch (Exception $e){\n\t\t\t$this->display_login($requestUrl, $e->getMessage());\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ($res){\n\t\t\t// redirect to the request URL\n\t\t\tredirect($requestUrl, 'refresh');\n\t\t} else {\n\t\t\t// If we reached here, then login has failed\n\t\t\t$this->display_login($requestUrl);\n\t\t}\n\t}",
"function setAuthSignature($AuthSignature)\n {\n \t$this->_authSignature =$AuthSignature;\n }",
"public function facebookProvider($attr)\n {\n $em = $this->getEntityManager();\n \n $facebook = $this->getEntityManager()->getRepository('NavisUserBundle:Facebook')->findOneBy(array('idClient' => $attr['clientId']));\n\n if(empty($facebook))\n {\n //si esta vacio creo un objeto, lo relaciono y hago flush\n\n $user = new User();\n $facebook = new Facebook();\n \n $facebook->setIdClient($attr['clientId']);\n $facebook->setAccesToken($attr['access_token']);\n $facebook->setExpiresAt($attr['expiresAt']);\n\n $json = $attr['json'];\n $em->persist($facebook);\n $user->setFacebook($facebook);\n $user->setUsername($json->name);//aqui la idea es pedir el mail\n $user->setExpiresAt(0);\n $user->setAccessToken(0);\n $em->persist($user);\n\n \n $facebook->setUser($user);\n $em->persist($facebook);\n\n $em->flush();\n\n //user creado\n\n return $user;\n }else{\n //ya esta creado el user\n return $facebook->getUser();\n }\n }",
"public function facebooklogined(\\SammyK\\LaravelFacebookSdk\\LaravelFacebookSdk $fb)\n\t{\n\t\ttry {\n\t\t\t$token = $fb->getAccessTokenFromRedirect();\n\t\t} catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t\tdd($e->getMessage());\n\t\t}\n\n\t\t// Access token will be null if the user denied the request\n\t\t// or if someone just hit this URL outside of the OAuth flow.\n\t\tif (! $token) {\n\t\t // Get the redirect helper\n\t\t $helper = $fb->getRedirectLoginHelper();\n\n\t\t if (! $helper->getError()) {\n\t\t abort(403, 'Unauthorized action.');\n\t\t }\n\n\t\t // User denied the request\n\t\t dd(\n\t\t $helper->getError(),\n\t\t $helper->getErrorCode(),\n\t\t $helper->getErrorReason(),\n\t\t $helper->getErrorDescription()\n\t\t );\n\t\t}\n\n\t\tif (! $token->isLongLived()) {\n\t\t // OAuth 2.0 client handler\n\t\t $oauth_client = $fb->getOAuth2Client();\n\n\t\t // Extend the access token.\n\t\t try {\n\t\t $token = $oauth_client->getLongLivedAccessToken($token);\n\t\t } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t dd($e->getMessage());\n\t\t }\n\t\t}\n\n\t\t$fb->setDefaultAccessToken($token);\n\n\t\t// Save for later\n\t\t\\Session::put('fb_user_access_token', (string) $token);\n\n\t\t// Get basic info on the user from Facebook.\n\t\ttry {\n\t\t $response = $fb->get('/me?fields=id,name,first_name,last_name,email,age_range,gender');\n\t\t} catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n\t\t dd($e->getMessage());\n\t\t}\n\n\t\t// Convert the response to a `Facebook/GraphNodes/GraphUser` collection\n\t\t$facebook_user = $response->getGraphUser();\n\t\tdd($facebook_user);\n\t\t// Create the user if it does not exist or update the existing entry.\n\t\t// This will only work if you've added the SyncableGraphNodeTrait to your User model.\n\t\t//$user = App\\User::createOrUpdateGraphNode($facebook_user);\n\n\t\t// Log the user into Laravel\n\t\t//Auth::login($user);\n\n\t\t//return redirect('/')->with('message', 'Successfully logged in with Facebook');\n\t}",
"public function __construct()\n\t{\n\t\t$this->user = Auth::user();\n\t\t$this->profile = $this->user->profile ?? null;\n\t}",
"public function authentication(): void\n {\n $oauthParams = [\n 'clientId' => $this->config['clientId'],\n 'clientSecret' => $this->config['clientSecret'],\n 'redirectUri' => $this->config['callbackUrl'],\n ];\n\n $auth = new OAuth($oauthParams);\n\n if (isset($_GET['code'])) {\n $token = $auth->getAccessToken('authorization_code', ['code' => $_GET['code']]);\n\n $this->accessToken = $token->getToken();\n $this->refreshToken = $token->getRefreshToken();\n $this->instanceUrl = $token->getInstanceUrl();\n $this->tokenExpiry = $token->getExpires();\n\n } else {\n header('Location: '.$auth->getAuthorizationUrl());\n die();\n }\n }",
"public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}",
"public function setLoggedUser(){\n\t\tif(isset($_SESSION['ccUser']) && !empty($_SESSION['ccUser'])){\n\t\t\t$id = $_SESSION['ccUser'];\n\n\t\t\t$sql = $this->db->prepare(\"SELECT * FROM users WHERE id = :id\");\n\t\t\t$sql->bindValue(':id', $id);\n\t\t\t$sql->execute();\n\n\t\t\tif($sql->rowCount() > 0){\n\t\t\t\t$this->userInfo = $sql->fetch();\n\t\t\t\t$this->permissions = new Permissions();\n\t\t\t\t$this->permissions->setGroup($this->userInfo['id_group']);\n\t\t\t}\n\t\t}\n\t}",
"public function __construct()\n {\n $this->user = Auth::guard('api')->user();\n }",
"public function __construct()\n {\n $this->user_id = Auth::id();\n }",
"public function setUser(Authenticatable $user);",
"public function auth_user() {\n\t\t$key = $this->getParams('key');\n\t\t\n\t\t$this->UserAuth = ClassRegistry::init('UserAuth');\n\t\t$options = array('conditions' => array('UserAuth.key' => $key), 'order' => array('id' => 'DESC'));\n\t\t$data = $this->UserAuth->find('first', $options);\n\t\t$data = isset($data['UserAuth']['params']) ? unserialize($data['UserAuth']['params']) : array();\n\t\t\t\n\t\t$response = array(\n\t\t\t\t'status' => 'success',\n\t\t\t\t'operation' => 'auth_user',\n\t\t\t\t'data' => $data,\n\t\t\t\t);\n\t\t$this->set(array(\n 'response' => parseParams($response),\n '_serialize' => array('response'),\n ));\n\t}",
"function __construct(){\n // Start connection to Facebook Server\n $appID = APP_FB_ID;\n $appIDSecret = APP_FB_SECRET;\n\t\t$this->fb = new Facebook\\Facebook([\n\t\t 'app_id' => $appID,\n\t\t 'app_secret' => $appIDSecret,\n\t\t 'default_graph_version' => 'v5.0',\n\t\t // . . .\n\t\t ]);\n\t}",
"public function doAuthentication( $api_token = null ) { \t\n\n $url = $this->_base_url . 'me';\n $this->_callAPI($url);\n }",
"public function userLoggedIn(){\r\n \n \t$user = new UserObject();\n \t\r\n \tif( isset ($_SESSION['id']) &&\r\n \t\tisset ($_SESSION['username']) &&\r\n \t\tisset ($_SESSION['profile_picture']) &&\r\n \t\tisset ($_SESSION['access_token'])){\r\n \t\t\t\r\n \t\t$user->id = $_SESSION['id'];\r\n \t\t$user->username = $_SESSION['username'];\r\n \t\t$user->profile_picture = $_SESSION['profile_picture'];\r\n \t\t$user->access_token = $_SESSION['access_token'];\r\n \t}\n \t\t\r\n \treturn $user;\r\n }",
"public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }"
] | [
"0.66205305",
"0.66037536",
"0.65969837",
"0.65425134",
"0.6477115",
"0.6305487",
"0.6218584",
"0.61720204",
"0.6146047",
"0.60587054",
"0.60008574",
"0.5986601",
"0.5970127",
"0.59530485",
"0.59196746",
"0.58961064",
"0.58949614",
"0.5881617",
"0.5849032",
"0.5844621",
"0.58444667",
"0.5822193",
"0.580564",
"0.5797786",
"0.57946354",
"0.5785514",
"0.5780255",
"0.57718605",
"0.57628936",
"0.5757578",
"0.5757264",
"0.5752704",
"0.57315534",
"0.5717668",
"0.5715471",
"0.5707001",
"0.570676",
"0.5702359",
"0.5700073",
"0.5697752",
"0.5677937",
"0.566499",
"0.5655444",
"0.5654379",
"0.56532437",
"0.56506145",
"0.56488943",
"0.56486887",
"0.5643566",
"0.5639504",
"0.5611647",
"0.5600046",
"0.5595744",
"0.5582918",
"0.5571353",
"0.5565122",
"0.5563507",
"0.5553475",
"0.55533695",
"0.55503964",
"0.55423206",
"0.5536851",
"0.55354446",
"0.55016947",
"0.5491914",
"0.54904145",
"0.54890543",
"0.5477975",
"0.5476015",
"0.5474724",
"0.5474196",
"0.54730207",
"0.54676217",
"0.545469",
"0.5449901",
"0.54482645",
"0.5441934",
"0.5441662",
"0.5438608",
"0.5434153",
"0.54298055",
"0.54264605",
"0.5420659",
"0.5419541",
"0.5415868",
"0.5403302",
"0.54010403",
"0.539339",
"0.5393007",
"0.5392908",
"0.53927004",
"0.53927004",
"0.5390859",
"0.538985",
"0.5386407",
"0.53857416",
"0.53786814",
"0.53777015",
"0.5372703",
"0.53639734"
] | 0.60726 | 9 |
/ Get user data from $facebook to $this | public function __loadUser()
{
$facebook = $this->fb;
$this->user = $facebook->api("/me", "GET");
$this->userid = $facebook->getUser();
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function convert()\n\t{\n\t\tif (isset($this->fb_data['id'])) \n\t\t{\n\t\t\t$this->user->set_facebook_id($this->fb_data['id'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['first_name']))\n\t\t{\n\t\t\t$this->user->set_first_name($this->fb_data['first_name'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['last_name'])) \n\t\t{\n\t\t\t$this->user->set_last_name($this->fb_data['last_name'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['birthday'])) \n\t\t{\n\t\t\t$this->user->set_birthday( (int) strtotime($this->fb_data['birthday']), TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['gender'])) \n\t\t{\n\t\t\t$this->user->set_gender(substr($this->fb_data['gender'], 0, 1), TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['email']))\n\t\t{\n\t\t\t$this->user->set_email($this->fb_data['email'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['timezone']))\n\t\t{\n\t\t\t$this->user->set_timezone( (int) $this->fb_data['timezone'], TRUE);\n\t\t}\n\t\tif (isset($this->fb_data['locale'])) \n\t\t{\n\t\t\t$this->user->set_country_code(substr($this->fb_data['locale'], -2), TRUE);\n\t\t}\n\t\treturn($this);\n\t}",
"public function getUser(){\r\n\t\treturn $this->facebook_obj->getUser();\r\n\t}",
"public function handleFacebookCallback()\n {\n \n $user = Socialite::driver('facebook')->user();\n\n \n }",
"protected function objectUserEnCours(){\n $fbUid = $this->getRequest()->getSession()->get('_fos_facebook_fb_482361481839052_user_id');\n $user = $this->getDoctrine()->getManager()->getRepository('MetinetFacebookBundle:User')->findOneByfbUid($fbUid);\n return $user ;\n }",
"public function getUserData()\n {\n return self::$facebook->api('/me');\n }",
"public function user(){\n $user = $this->curl->getUser($this->messaging->getSenderId());\n $this->user = new User($this->messaging->getSenderId(), $user['first_name'], $user['last_name']);\n }",
"protected function _getUserData(Zend_Oauth_Token_Access $accessToken) {\n $authVars = $this->_getAuthVars();\n\n $token = $accessToken->getToken();\n $tokenSecret = $accessToken->getTokenSecret();\n $vimeoService = new Garp_Service_Vimeo_Pro(\n $authVars->consumerKey,\n $authVars->consumerSecret,\n $token,\n $tokenSecret\n );\n $userDataFromVimeo = $vimeoService->people->getInfo($token);\n $id = $userDataFromVimeo['id'];\n\n $ini = Zend_Registry::get('config');\n $sessionColumns = Zend_Db_Select::SQL_WILDCARD;\n if (!empty($ini->auth->login->sessionColumns)) {\n $sessionColumns = $ini->auth->login->sessionColumns;\n $sessionColumns = explode(',', $sessionColumns);\n }\n $userModel = new Model_User();\n $userConditions = $userModel->select()->from($userModel->getName(), $sessionColumns);\n\n $model = new Model_AuthVimeo();\n $model->bindModel('Model_User', array('conditions' => $userConditions));\n $userData = $model->fetchRow(\n $model->select()\n ->where('vimeo_id = ?', $id)\n );\n if (!$userData || !$userData->Model_User) {\n $userData = $model->createNew(\n $id,\n $accessToken,\n $this->_mapProperties($userDataFromVimeo)\n );\n } else {\n $model->getObserver('Authenticatable')->updateLoginStats($userData->user_id);\n $userData = $userData->Model_User;\n }\n return $userData;\n }",
"public static function get_user_data()\n {\n }",
"public function __construct() {\n header('P3P:CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\"');\n $config = array(\n 'appId' => FBConfig::appID(),\n 'secret' => FBConfig::appSecret());\n parent::__construct($config);\n return ($this->getUser());\n }",
"public function get_facebook() {\r\n return $this->facebook;\r\n }",
"public function handleFacebookCallback()\n {\n $user = Socialite::driver('facebook')->user();\n\n // $user->token;\n }",
"public function facebookProvider($attr)\n {\n $em = $this->getEntityManager();\n \n $facebook = $this->getEntityManager()->getRepository('NavisUserBundle:Facebook')->findOneBy(array('idClient' => $attr['clientId']));\n\n if(empty($facebook))\n {\n //si esta vacio creo un objeto, lo relaciono y hago flush\n\n $user = new User();\n $facebook = new Facebook();\n \n $facebook->setIdClient($attr['clientId']);\n $facebook->setAccesToken($attr['access_token']);\n $facebook->setExpiresAt($attr['expiresAt']);\n\n $json = $attr['json'];\n $em->persist($facebook);\n $user->setFacebook($facebook);\n $user->setUsername($json->name);//aqui la idea es pedir el mail\n $user->setExpiresAt(0);\n $user->setAccessToken(0);\n $em->persist($user);\n\n \n $facebook->setUser($user);\n $em->persist($facebook);\n\n $em->flush();\n\n //user creado\n\n return $user;\n }else{\n //ya esta creado el user\n return $facebook->getUser();\n }\n }",
"function getUserInformation(){\n\t\tinclude ($_SERVER['DOCUMENT_ROOT'] . '_inc/controller/fb/getUserInformation.fb.inc.php');\n return $this->resObject;\n\t}",
"public function getFacebook()\n {\n return $this->facebook;\n }",
"public function fb_signin()\r\n\t{\r\n\t\t// get the facebook user id and then get the user data via curl\r\n\t\t$fb_user_id = $this->input->post('user_id');\r\n\t\t$this->curl->ssl(false);\r\n\t\t$fb_user = json_decode($this->curl->simple_get('https://graph.facebook.com/' . $fb_user_id));\r\n\t\t\r\n\t\t// check if the user is in the DB already\r\n\t\tif( !($user = $this->member_model->get_user_by_sm(array('facebook_id' => $fb_user->id), 'facebook_id'))) \r\n\t\t{\r\n\t\t\t// create the user\r\n\t\t\t$password = generate_password(9, 8);\r\n\t\t\t$this->tank_auth->create_user($fb_user->username . $fb_user->id, $fb_user->username . $fb_user->id, $password, false);\r\n\t\t\t$user = $this->generic_model->get_where_single_row('users', array('username' => $fb_user->username . $fb_user->id));\r\n\t\t\t$this->generic_model->update('user_profiles', \r\n\t\t\t\t\t\t\t\t\t \t array('facebook_id' => $fb_user->id, \r\n\t\t\t\t\t\t\t\t\t \t \t 'display_name' => $fb_user->username,\r\n\t\t\t\t\t\t\t\t\t \t 'profile_image' => 'http://graph.facebook.com/' . $fb_user->id . '/picture'), \r\n\t\t\t\t\t\t\t\t\t \t array('user_id' => $user->id));\r\n\t\t\t// let's also configure a newsletter profile for this user\r\n\t\t\t$this->generic_model->insert('newsletter', array('user_id' => $user->id, 'frequency' => 'never'));\t\t\t\t\t\t\t\t\t \t \r\n\t\t}\r\n\t\t$user = $this->member_model->get_user_by_sm(array('facebook_id' => $fb_user->id), 'facebook_id');\r\n\t\techo $user->id;\r\n\t}",
"function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}",
"public function getFacebook()\n {\n return $this->facebook;\n }",
"function handle_fb_login() {\n\t\t$this->load->library('facebook');\n\n\t\tif(!$this->facebook->is_authenticated()){\n\t\t\tredirect('user/login');\n\t\t}\n\n\t\t$oFbUserData = (object) $this->facebook->request('get', '/me?fields=id,email,first_name,middle_name,last_name,gender,birthday,age_range');\n\n\t\tif(!isset($oFbUserData->email) || (isset($oFbUserData->email) && '' != $oFbUserData->email)){\n\t\t\tsf('error_message', \"You hav'nt allowed email permission on facebook.\");\n\t\t}\n\n\n//\t\t$user_profile = $this->facebook->api('/me');\n\n\t\t//p('AFTER');\n\n\t\t//$oFbUserData = (object)$user_profile;\n\n\t\tif($oSystemUserData = $this->user_model->getUserBy('facebook_id', $oFbUserData->id)){\n\n\t\t\tif($oSystemUserData->status == $this->aUserStatus['closed']){\n\n\t\t\t\t//reactivate the account\n\t\t\t\t$this->account_model->activateAccount($oSystemUserData->id);\n\t\t\t\tsf('success_message', 'Good To have you back!!');\n\n\t\t\t} elseif($oSystemUserData->status == $this->aUserStatus['blocked']){\n\n\t\t\t\t\tsf('error_message', \"Your account is blocked. \\nPlease use the Contact Us page to contact the Administrator\");\n\t\t\t\t\tredirect('home');\n\n\t\t\t}\n\n\t\t\t//proceed with login\n\t\t\tif($this->authentication->makeLogin($oSystemUserData->facebook_id, 'facebook_id')){\n\t\t\t\tredirect('home');\n\t\t\t} else {\n\t\t\t\tsf('error_message', 'There was some problem. Could not log you in.');\n\t\t\t\tredirect('home');\n\t\t\t}\n\n\t\t} else {\n\t\t\t\t//consider this as a first time login\n\t\t\t\t//proceed with registration, mail sending, and login\n\t\t\t\tif(!$oSystemUserData = $this->user_model->getUserBy('email_id', $oFbUserData->email)) {\n\n\t\t\t\t\t$this->load->helper('custom_upload');\n\t\t\t \t$sUrl = getFbImage((object)array('facebook_id' => $oFbUserData->id), array('type'=>'large'), false);\n\t\t\t \t$aImageData = urlUpload('image', 'profile_pic', $sUrl);\n\n\t\t\t\t\t//registration\n\t\t\t\t\t$aUserData['facebook_id'] \t= $oFbUserData->id;\n\t\t\t\t\t$aUserData['email_id'] \t\t= $oFbUserData->email;\n\t\t\t\t\t$aUserData['account_no'] \t= $this->authentication->generateAccountNumber();\n\t\t\t\t\t$aUserData['type'] \t\t\t= $this->aUserTypes['user'];\n\t\t\t\t\t$aUserData['status'] \t\t= $this->aUserStatus['active'];\n\t\t\t\t\t$aUserData['joined_on'] \t= date('Y-m-d');\n\t\t\t\t\t$aUserData['first_name'] \t= isset($oFbUserData->first_name) ? $oFbUserData->first_name : '';\n\t\t\t\t\t$aUserData['middle_name'] \t= isset($oFbUserData->middle_name) ? $oFbUserData->middle_name : '';\n\t\t\t\t\t$aUserData['last_name'] \t= isset($oFbUserData->last_name) ? $oFbUserData->last_name : '';\n\t\t\t\t\t$aUserData['gender'] \t\t= $this->aGenders[$oFbUserData->gender];\n\t\t\t\t\t$aUserData['profile_image'] = $aImageData['file_name'];\n\n\t\t\t\t\tif(isset($oFbUserData->birthday) && '' != $oFbUserData->birthday){\n\t\t\t\t\t\t$aBirthday \t= explode('/', $oFbUserData->birthday); // mm/dd/yyyy\n\t\t\t\t\t\t$aUserData['birthday'] \t\t= $aBirthday[2].'-'.$aBirthday[0].'-'.$aBirthday[1];\n\t\t\t\t\t}\n\t\t\t\t\t$this->db->set ($aUserData);\n\t\t\t \t$this->db->insert ('users');\n\n\t\t\t \t$iUserId = $this->db->insert_id();\n\n\n\t\t\t \t//Login\n\t\t\t \t$this->authentication->makeLogin($oFbUserData->id, 'facebook_id');\n\n\t\t\t \t$this->account_model->activateAccount($iUserId);\n\n//\t\t\t \tupdate the profile pictures page\n//\t\t\t \t$aUploadType = c('profile_pic_upload_type');\n//\t\t\t \t$aProfilePicData = array(\n//\t\t\t \t\t'user_id' => $iUserId,\n//\t\t\t \t\t'current_pic' => $aUploadType['facebook'],\n//\t\t\t \t\t'facebook' => $aImageData['file_name'],\n//\t\t\t \t);\n\n\n\t\t\t\t\t/*$this->load->model('maintenance_model');\n\t\t\t\t\t$this->maintenance_model->getSingleSetting('db_welcome_msg');\n\t\t\t \t$aWelcomeEmail['receiver_name'] = $aUserData['first_name'];\n\t\t\t \t$aWelcomeEmail['welcome_text'] \t= $this->maintenance_model->getSingleSetting('db_signup_welcome_msg');\n\t\t\t\t\t*/\n\t\t\t\t\t$aSettings = array(\n\t\t\t\t\t\t'to' \t\t\t\t=> array($oFbUserData->email=>$aUserData['first_name']), // email_id => name pairs\n\t\t\t\t\t\t'from_email' \t\t=> c('accounts_email_id'),\n\t\t\t\t\t\t'from_name'\t\t\t=> c('accounts_email_from'),\n\t\t\t\t\t\t'reply_to' \t\t\t=> array(c('accounts_email_id') => c('accounts_email_from')), // email_id => name pairs\n\t\t\t\t\t\t'email_contents' \t=> $aWelcomeEmail, // placeholder keywords to be replaced with this data\n\t\t\t\t\t\t'template_name' \t=> 'welcome', //name of template to be used\n\t\t\t\t\t\t//'preview'\t\t\t=> true\n\t\t\t\t\t);\n\n\t\t\t\t\t//p(sendMail_PHPMailer($aSettings));exit;\n\t\t\t\t\t$this->load->helper('custom_mail');\n\t\t\t\t\tsendMail_PHPMailer($aSettings);\n\n\t\t\t\t\t$this->session->set_flashdata ('success_message', 'Welcome to '.$this->mcontents['c_website_title']);\n\n\t\t\t \tredirect('home');\n\n\t\t\t\t} else {\n\t\t\t\t\techo '3';exit;\n\t\t\t\t\tsf('error_message', 'We already have an account associated with the email id '.$oFbUserData->email);\n\t\t\t\t\tredirect('home');\n\t\t\t\t}\n\t\t\t\t//$aFBUserData['facebook_id'] =\n\t\t}\n\n\t}",
"public function authenticate($access_token_val='')\r\n { \r\n /**********make the access token Extended by extend_access_token() and get extended token********/\r\n $extended_access_token_val = $this->extend_access_token($access_token_val);\r\n if($extended_access_token_val==''){\r\n $access_token_val = $extended_access_token_val;\r\n } \r\n\r\n \r\n /***running FQL to fetch data from facebook ****/\r\n // $fql = urlencode(\"SELECT post_id,viewer_id,source_id,updated_time,created_time,actor_id,message,attachment,permalink ,type FROM stream WHERE source_id = me() AND actor_id = me() order by created_time desc LIMIT 5\");\r\n $fql = urlencode(\"SELECT uid,about_me, birthday, current_location, first_name, has_added_app, hometown_location, last_name, locale, birthday_date, pic, pic_with_logo, pic_big, pic_big_with_logo, pic_small, pic_small_with_logo, pic_square, pic_square_with_logo, profile_url, proxied_email, email, contact_email, sex, meeting_sex, status, timezone, website, education_history, work_history, work, education, hs_info, religion, relationship_status, political, activities, interests, family, music, tv, movies, books, username, quotes, sports, favorite_teams, favorite_athletes, inspirational_people, languages FROM user WHERE uid = me()\");\r\n $content = $this->process_fql($fql,$access_token_val);\r\n \r\n //pr($content['data'][0],1);\r\n \r\n $user_meta = $this->session->userdata('current_user_session'); // get current user data loggedin\r\n\t\t\r\n\t\t/*pr($content['data'][0]);\r\n\t\tpr($content,1);\r\n\t\texit;*/\r\n \r\n if(isset($content->error))\r\n echo 'A user of access token '.$access_token_val. ' got following error while fetching user details'.$temp_ret_graph;\r\n else\r\n { \r\n\t\t\t\tif(empty($user_meta)) { \r\n\t\t\t\t\t\r\n\t\t\t\t if($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\tredirect(base_url().'user/profile'); \r\n\t\t\t\t\t\t\r\n\t\t\t\t } else {\r\n\t\t\t\t\t\tif($this->register_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\tif($this->login_by_facebook($content['data'][0],$access_token_val)){\r\n\t\t\t\t\t\t\t\t\tredirect(base_url().'user/profile');\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\techo 'login failed!';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//echo 'registration failed!';\r\n\t\t\t\t\t set_error_msg(message_line('fb_reg_fail')); // either user email is not verified in fb \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// or kept private, so goto signup page\r\n\t\t\t\t\t redirect(base_url('user/signup'));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} \r\n\t\t\t\telse {\r\n\t\t\t\t\tif($user_meta[0]['s_email'] == $content['data'][0]['email'] ){\r\n\t\t\t\t\t\t$content['data'][0]['access_token'] = $access_token_val;\r\n\t\t\t\t\t\t$this->user_model->update_data(array(\"s_facebook_credential\"=>serialize($content['data'][0])),\r\n\t\t\t\t\t\t\t\tarray(\"i_id\"=> $user_meta[0]['i_id'])\r\n\t\t\t\t\t ); \r\n\t\t\t\t\t\tset_success_msg('facebook account add success');\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tset_error_msg('facebook account email not match');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tredirect(base_url().\"user/profile\");\r\n\t\t\t\t}\r\n } \r\n\r\n\t\t}",
"function getUserData() { \n // \"functions.php\";\n\n $response = $this->getRequest(\"me\");\n\n // Return an object of the JSON response\n return json_decode($response->getBody()->getContents());\n }",
"public function me(){\n //check cookie for authentication\n $userAuthModel = new UserAuth();\n $user = $userAuthModel->checkAuth();\n \n if(!empty($user)){\n $data = array();\n\n //select user data from users table\n $userModel = new User();\n $where = array('id' => $user['user_id']);\n $result = $userModel->select($where);\n $data['user_info'] = $result[0];\n\n //select user's classes\n $studentModel = new Student();\n $where = $user['user_id'];\n $data['courses'] = $studentModel->courses($where);\n\n //add person_id\n $data['person_id'] = $data['user_info']['person_id'];\n\n $this->loadPage($this->user, \"user_profile\", $data);\n\n } else {\n $this->loadPage(false, \"login_user\");\n }\n \n }",
"public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }",
"function getUserInfo() {\n\t$page = $this -> get('http://vk.com/al_profile.php') -> body;\n\n\t$pattern = '/\"user_id\":([0-9]*),\"loc\":([\"a-z0-9_-]*),\"back\":\"([\\W ]*|[\\w ]*)\",.*,\"post_hash\":\"([a-z0-9]*)\",.*,\"info_hash\":\"([a-z0-9]*)\"/';\n\tpreg_match($pattern, $page, $matches);\n\tarray_shift($matches);\n\t\n\t$this -> user['id'] = $matches[0];\n\t$this -> user['alias'] = $matches[1];\n\t$this -> user['name'] = $matches[2];\n\t$this -> user['post_hash'] = $matches[3];\n\t$this -> user['info_hash'] = $matches[4];\n\n\treturn $this -> user;\n\t}",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->api('/me'); \r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t} \r\n\r\n\t\t// if the provider identifier is not recived, we assume the auth has failed\r\n\t\tif ( ! isset( $data[\"id\"] ) )\r\n\t\t{ \r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\r\n\t\t}\r\n\r\n\t\t# store the user profile. \r\n\t\t$this->user->profile->identifier = @ $data['id'];\r\n\t\t$this->user->profile->displayName = @ $data['name'];\r\n\t\t$this->user->profile->firstName = @ $data['first_name'];\r\n\t\t$this->user->profile->lastName \t= @ $data['last_name'];\r\n\t\t$this->user->profile->photoURL = \"https://graph.facebook.com/\" . $this->user->profile->identifier . \"/picture\";\r\n\t\t$this->user->profile->profileURL \t= @ $data['link']; \r\n\t\t$this->user->profile->webSiteURL \t= @ $data['website']; \r\n\t\t$this->user->profile->gender \t= @ $data['gender'];\r\n\t\t$this->user->profile->description \t= @ $data['bio'];\r\n\t\t$this->user->profile->email \t= @ $data['email'];\r\n\t\t$this->user->profile->region \t= @ $data['hometown'][\"name\"];\r\n\r\n\t\tif( isset( $data['birthday'] ) ) {\r\n\t\t\tlist($birthday_month, $birthday_day, $birthday_year) = @ explode('/', $data['birthday'] );\r\n\r\n\t\t\t$this->user->profile->birthDay = $birthday_day;\r\n\t\t\t$this->user->profile->birthMonth = $birthday_month;\r\n\t\t\t$this->user->profile->birthYear = $birthday_year;\r\n\t\t}\r\n\r\n\t\treturn $this->user->profile;\r\n \t}",
"private function getSocialUserInfo($access_token, $social_app)\n {\n $user = NULL;\n $user_exist = NULL;\n $reference_where = [];\n $email_where = [];\n $user_data_array = [];\n if ($social_app === 'facebook') {\n $client = new HTTPClient('https://graph.facebook.com/me?fields=id,name,email,gender,age_range,picture&access_token=' . $access_token);\n $response = $client->setOptions(['ssl-verify-peer' => null])->send();\n $response = $response->getBody();\n $response = json_decode($response, true);\n if (!empty($response) and is_array($response) and empty($response['error'])) {\n if (!empty($response['id'])) {\n $reference_where['facebook_reference'] = Str::substr($response['id'], 0, 50);\n $user_data_array['facebook_reference'] = Str::substr($response['id'], 0, 50);\n $user = User::where('facebook_reference', '=', $reference_where['facebook_reference'])\n ->first();\n }\n if (!empty($response['email'])) {\n $email_where['email'] = Str::substr($response['email'], 0, 254);\n $user_data_array['email'] = Str::substr($response['email'], 0, 254);\n $user_exist = User::where('email', '=', $user_data_array['email'])\n ->first();\n }\n if (!empty($response['name']))\n $user_data_array['full_name'] = Str::substr($response['name'], 0, 254);\n if (!empty($response['gender']))\n $user_data_array['gender'] = Str::substr($response['gender'], 0, 6);\n if (!empty($response['age_range'])) {\n $age = null;\n if (!empty($response['age_range']['min']) and !empty($response['age_range']['max'])) {\n $age = ceil(((int)$response['age_range']['min'] + (int)$response['age_range']['max']) / 2);\n } else if (!empty($response['age_range']['min'])) {\n $age = (int)$response['age_range']['min'];\n } else if (!empty($response['age_range']['max'])) {\n $age = (int)$response['age_range']['max'];\n }\n $user_data_array['age'] = $age;\n unset($age);\n }\n }\n } else {\n $client = new HTTPClient('https://www.googleapis.com/oauth2/v3/tokeninfo?fields=sub,gender,ageRange,email,name,picture,given_name,family_name,locale&id_token=' . $access_token);\n $response = $client->setOptions(['ssl-verify-peer' => null])->send();\n $response = $response->getBody();\n $response = json_decode($response, true);\n\n if (!empty($response) and is_array($response) and empty($response['error_description'])) {\n if (!empty($response['sub'])) {\n $reference_where['gplus_reference'] = Str::substr($response['sub'], 0, 50);\n $user_data_array['gplus_reference'] = Str::substr($response['sub'], 0, 50);\n $user = User::where('gplus_reference', '=', $reference_where['gplus_reference'])\n ->first();\n }\n if (!empty($response['email'])) {\n $email_where['email'] = Str::substr($response['email'], 0, 254);\n $user_data_array['email'] = Str::substr($response['email'], 0, 254);\n $user_exist = User::where('email', '=', $user_data_array['email'])\n ->first();\n }\n if (!empty($response['name']))\n $user_data_array['full_name'] = Str::substr($response['name'], 0, 254);\n if (!empty($response['gender']))\n $user_data_array['gender'] = Str::substr($response['gender'], 0, 6);\n if (!empty($response['picture']))\n $user_data_array['picture_path'] = Str::substr($response['picture'], 0, 254);\n if (!empty($response['ageRange'])) {\n $age = null;\n if (!empty($response['ageRange']['min']) and !empty($response['ageRange']['max'])) {\n $age = ceil(((int)$response['ageRange']['min'] + (int)$response['ageRange']['max']) / 2);\n } else if (!empty($response['ageRange']['min'])) {\n $age = (int)$response['ageRange']['min'];\n } else if (!empty($response['ageRange']['max'])) {\n $age = (int)$response['ageRange']['max'];\n }\n $user_data_array['age'] = $age;\n unset($age);\n }\n }\n }\n\n if(!empty($user))\n return [\n 'user' => $user,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => false\n ];\n\n if(!empty($user_exist))\n return [\n 'user' => $user_exist,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => true\n ];\n\n return [\n 'user' => NULL,\n 'user_data_array' => $user_data_array,\n 'user_with_email_already_exist' => false\n ];\n }",
"public function getUserFromAPI() {\n $facebook = $this->facebookService->getFacebook();\n $userId = $facebook->getUser();\n $user_profile = null;\n\n if ($userId) {\n try {\n // Proceed knowing you have a logged in user who's authenticated.\n $user_profile = $facebook->api('/me');\n } catch (FacebookApiException $e) {\n error_log($e);\n $userId = null;\n }\n }\n if (!$userId && !$user_profile) {\n return null;\n }\n\n /* @var $user Tx_WsLogin_Domain_Model_FacebookUser */\n $user = t3lib_div::makeInstance('Tx_WsLogin_Domain_Model_FacebookUser');\n $user->setWsFacebookId($userId);\n $user->setUsername($user_profile['username']);\n $user->setFirstName($user_profile['first_name']);\n $user->setLastName($user_profile['last_name']);\n $user->setName($user_profile['first_name'] . ' ' . $user_profile['last_name']);\n\n return $user;\n }",
"public function index() {\n if ($this->user) {\n $data['user_profile'] = $this->facebook->api('/me?fields=id,name,gender,first_name,last_name,picture,email,location,birthday');\n\n// Get logout url of facebook\n $data['logout_url'] = $this->facebook->getLogoutUrl(array('next' => base_url() . 'index.php/oauth_login/logout'));\n $this->load->model('lawyer_model');\n $lawyer = array();\n\n $lawyer['firstname'] = $data['user_profile']['first_name'];\n $lawyer['lastname'] = $data['user_profile']['last_name'];\n if (!empty($data['user_profile']['middle_name'])) {\n $lawyer['middlename'] = $data['user_profile']['middle_name'];\n }\n if (!empty($data['user_profile']['birthday'])) {\n $lawyer['dob'] = $data['user_profile']['birthday'];\n }\n if (!empty($data['user_profile']['gender'])) {\n $lawyer['gender'] = $data['user_profile']['gender'];\n }\n if (!empty($data['user_profile']['email'])) {\n $lawyer['email'] = $data['user_profile']['email'];\n }\n if (!empty($data['user_profile']['location'])) {\n $lawyer['address'] = $data['user_profile']['location'];\n }\n\n// $lawyer['image'] = $data['user_profile']['picture'];\n// $lawyer['address'] = $data['user_profile']['location'];\n// $lawyer['password'] = $data['user_profile']['password'];\n// $this->lawyer_model->insert($lawyer);\n// Send data to profile page\n $this->load->view('register_lawyer', $lawyer);\n } else {\n\n// Store users facebook login url\n $data['login_url'] = $this->facebook->getLoginUrl(array(\"scope\" => array(\"email\", \"user_location,user_birthday\")));\n $this->load->view('login', $data);\n }\n }",
"public function getUserData()\r\n \t{\r\n \t\tif ($this->_client->getUser())\r\n \t\t{\r\n \t\t\treturn $this->_client->api('/me');\r\n \t\t}\r\n \t\treturn null;\r\n \t}",
"public function getUserFacebook($facebookId)\n {\n $stmt = $this->con->prepare(\"SELECT id_usuario,nome,userlogin,email,instituicao,api_key FROM tbl_usuario WHERE facebookId=?\");\n $stmt->bind_param(\"s\", $facebookId);\n $stmt->execute();\n\n $stmt->bind_result($id, $name, $username, $email, $school, $apikey);\n $stmt->fetch();\n $user = array();\n $user['id'] = $id;\n $user['username'] = $username;\n $user['name'] = $name;\n $user['email'] = $email;\n $user['school'] = $school;\n $user['apikey'] = $apikey;\n\n //returning the user\n return $user;\n }",
"public static function user() {\n // $userInfo = $oauth2->userinfo->get();\n $userInfo = json_decode(json_encode(['email' => '@', 'gender' => null, 'name' => 'test', 'picture' => 'f']));\n return User::fromGoogleUser($userInfo);\n \n }",
"public function callBack(LaravelFacebookSdk $fb) {\n try {\n $token = $fb->getAccessTokenFromRedirect();\n //dump($token);\n } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n\n // Access token will be null if the user denied the request\n // or if someone just hit this URL outside of the OAuth flow.\n if (! $token) {\n // Get the redirect helper\n $helper = $fb->getRedirectLoginHelper();\n\n if (! $helper->getError()) {\n abort(403, 'Unauthorized action.');\n }\n\n // User denied the request\n dd(\n $helper->getError(),\n $helper->getErrorCode(),\n $helper->getErrorReason(),\n $helper->getErrorDescription()\n );\n }\n\n if (! $token->isLongLived()) {\n // OAuth 2.0 client handler\n $oauth_client = $fb->getOAuth2Client();\n\n // Extend the access token.\n try {\n $token = $oauth_client->getLongLivedAccessToken($token);\n dump($token);\n } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n }\n\n $fb->setDefaultAccessToken($token);\n\n // Save for later\n \\Session::put('fb_user_access_token', (string) $token);\n\n // Get basic info on the user from Facebook.\n try {\n $response = $fb->get('/me?fields=id,name,email');\n } catch (Facebook\\Exceptions\\FacebookSDKException $e) {\n dd($e->getMessage());\n }\n\n // Convert the response to a `Facebook/GraphNodes/GraphUser` collection\n $facebook_user = $response->getGraphUser();\n \n \n \n\n$userNode = $response->getGraphUser();dump($userNode);\nprintf('Hello, %s!', $userNode->getName());\n // Create the user if it does not exist or update the existing entry.\n // This will only work if you've added the SyncableGraphNodeTrait to your User model.\n // $user = App\\User::createOrUpdateGraphNode($facebook_user);\n\n // Log the user into Laravel\n //Auth::login($user);\n try {\n \n $response = $fb->get('/me?fields=id,name,email', $token);\n //dump($response);\n \n\n$graphNode = $response->getGraphNode();\n\n //\n} catch(\\Facebook\\Exceptions\\FacebookSDKException $e) {\n dump($e->getMessage());\n}\n$images=array();\n\n$pageAccessToken=$this->getPageAccessToken($fb,'EAAV0FTkDnM4BAJZAR2lIKFG1pZAQzniBvmtbTuk3TnMLV7MRhZCFXaZAhqk5i8AlqkOAz63RkkLsYh4a97wK0MOphHx4kh3K4fYoqTT5cdGptdBs3CJORkjuHBUNUxLh7EWezqHLhZBVEWFEssqPrEx0U3QfHJ7IZD','522235181447370');\n\n$linkData = [\n 'url' => ['https://newrelic.com/assets/pages/apm/php/php-elephant-logo-bd4f9d83be8c8563248fe4793f90bae7.png','https://newrelic.com/assets/pages/apm/php/php-elephant-logo-bd4f9d83be8c8563248fe4793f90bae7.png','https://images.pexels.com/photos/459225/pexels-photo-459225.jpeg?w=1260&h=750&auto=compress&cs=tinysrgb'],\n //'published'=>false\n];\n \n//dd(count($linkData['url']));\nfor ($i=0;$i<count($linkData['url']);$i++){\n $img=['url' => $linkData['url'][$i],'published'=>false];\n \n $response = $fb->post('/522235181447370/photos',$img, $pageAccessToken);\n \n var_dump($response->getGraphUser()->getId());\narray_push($images,$response->getGraphUser()->getId());\n // exit();\n}\nprint_r(count($images));\n $Data = [\n //'attached_media[0]' => \"{'media_fbid':'$images[0]'}\" ,\n//'attached_media[1]' => \"{'media_fbid':'$images[1]'}\" ,\n 'message' => 'TEST poST',\n //'published'=>true\n];\nfor ($i=0;$i<count($images);$i++){\n array_push($Data, $Data[\"attached_media[\".$i.\"]\"] = \"{'media_fbid':'$images[$i]'}\"); \n}\n//dd($Data);\n//exit();\n// $Data = [\n// 'attached_media[0]' => \"{'media_fbid':'$images[0]'}\" ,\n//'attached_media[1]' => \"{'media_fbid':'$images[1]'}\" ,\n// 'message' => 'message44',\n// //'published'=>true\n//];\n//dd($Data);\n \n //$response = $fb->post('/522235181447370/feeds',$img, $pageAccessToken);\n\n//exit();\n//$pageAccessToken ='EAAV0FTkDnM4BAG8NEHkHzxIxrCUZCzuoLr3ZCUg78U2kZCkZC1yusD61ZCgP4tQoZBOekYgyjAOed4JmXoxTxHDeiTq1kVpCvYBYbqgFDEtmRpUBBNt92ZAhtvvr20ULQiXzo8OnTZCDzRmZArnD7cHBL9jUozkcjhnOOVrvXCizmPXokx0Gr1rPZAlZCZBO30ZAPLK8JzM4AFbkdLwZDZD';\n //$pageAccessToken = $fb->getOAuth2Client()->getLongLivedAccessToken('EAAV0FTkDnM4BAJZAR2lIKFG1pZAQzniBvmtbTuk3TnMLV7MRhZCFXaZAhqk5i8AlqkOAz63RkkLsYh4a97wK0MOphHx4kh3K4fYoqTT5cdGptdBs3CJORkjuHBUNUxLh7EWezqHLhZBVEWFEssqPrEx0U3QfHJ7IZD'); //TODO change\n// $longLivedToken = $fb->getOAuth2Client()->getLongLivedAccessToken('EAAV0FTkDnM4BAJZAR2lIKFG1pZAQzniBvmtbTuk3TnMLV7MRhZCFXaZAhqk5i8AlqkOAz63RkkLsYh4a97wK0MOphHx4kh3K4fYoqTT5cdGptdBs3CJORkjuHBUNUxLh7EWezqHLhZBVEWFEssqPrEx0U3QfHJ7IZD'); //TODO change\n// $fb->setDefaultAccessToken($longLivedToken);\n// $response = $fb->sendRequest('GET', '522235181447370', ['fields' => 'access_token'])\n// ->getDecodedBody();\n//\n// $pageAccessToken = $response['access_token'];\n//$pageAccessToken=$this->getPageAccessToken($fb,'EAAV0FTkDnM4BAJZAR2lIKFG1pZAQzniBvmtbTuk3TnMLV7MRhZCFXaZAhqk5i8AlqkOAz63RkkLsYh4a97wK0MOphHx4kh3K4fYoqTT5cdGptdBs3CJORkjuHBUNUxLh7EWezqHLhZBVEWFEssqPrEx0U3QfHJ7IZD','522235181447370');\n // dump($pageAccessToken);\ntry {\n $response = $fb->post('/522235181447370/feed', $Data, $pageAccessToken);\n //dd($response);\n} catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n echo 'Graph returned an error: '.$e->getMessage();\n exit;\n} catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n echo 'Facebook SDK returned an error: '.$e->getMessage();\n exit;\n} \n\nreturn redirect('/')->with('message', 'Successfully logged in with Facebook'); \n }",
"public function facebookAccountCallback()\n {\n try {\n $social_user = Socialite::driver($this->facebookProvider)->fields(['name', 'first_name', 'last_name', 'email'])->stateless()->user();\n if (!$social_user) {\n return redirect('/login')->with('error', trans('messages.something_wrong'));\n }\n\n $email = $social_user->email;\n if ($email == null) {\n $email = $social_user->id . '@facebook.com';\n }\n $name = $social_user->name;\n\n $user = User::where('facebook_id', $social_user->id)->orWhere('email', $email)->first();\n if ($user) {\n if ($user->facebook_id == null) {\n $user->facebook_id = $social_user->id;\n $user->save();\n }\n } else {\n $first_name = $name;\n if (isset($social_user->user['first_name']) && $social_user->user['first_name']) {\n $first_name = $social_user->user['first_name'];\n }\n $last_name = null;\n if (isset($social_user->user['last_name']) && $social_user->user['last_name']) {\n $last_name = $social_user->user['last_name'];\n }\n\n $request = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'facebook_id' => $social_user->id,\n ];\n $user = $this->create($request);\n }\n Auth::login($user);\n return redirect()->route($this->redirectTo);\n\n } catch (Exception $e) {\n return redirect('/login')->with('error', trans('messages.something_wrong'));\n }\n }",
"abstract function retrieveSfGuardUserByFacebookUid($facebook_uid);",
"private function facebookGetUser($accessToken)\n {\n $client = new Client();\n $url = 'https://graph.facebook.com/v2.8/me?fields=name,email&access_token=' . $accessToken;\n $res = $client->request('GET', $url);\n $userData = json_decode($res->getBody());\n\n return $userData;\n }",
"protected function initUserAttributes()\n {\n Event::on(Request::className(), Request::EVENT_AFTER_SEND, function ($event) {\n ///Replace `callback( {\"client_id\":\"101367642\",\"openid\":\"9B18299BC4CBFDAFCA09DBE95A6A0F23\"} );` with ` {\"client_id\":\"101367642\",\"openid\":\"9B18299BC4CBFDAFCA09DBE95A6A0F23\"}`\n $event->response->content = preg_replace('/^callback\\(\\s*(\\{.*\\})\\s*\\);$/is', '\\1', $event->response->content);\n });\n return $this->api('oauth2.0/me', 'GET');\n }",
"private function userinfo($access_token){\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), just entered');\n $userinfo = $this->serverGet($this->strategy['base_url'] . 'me', array('access_token' => $access_token), null, $headers); // 'me' from flask; google uses this naming convention, as do others.\n if (!empty($userinfo)){\n return $this->recursiveGetObjectVars(json_decode($userinfo));\n }\n else{\n $error = array(\n 'code' => 'userinfo_error',\n 'message' => 'Failed when attempting to query for user information',\n 'raw' => array(\n 'response' => $userinfo,\n 'headers' => $headers\n )\n );\n\n $this->errorCallback($error);\n }\n //CakeLog::write(LOG_DEBUG, __CLASS__ . '.' . __FUNCTION__ . '(), done');\n }",
"public function __construct($facebookUserId)\n {\n $this->facebookUserId = $facebookUserId;\n }",
"function getUserInfo(){\n\n\t\t/* Fetch user info from Flickr */\n\t\t$user = $this->askFlickr('people.getinfo','user_id='.$this->user);\n\n\t\t/* Return User info */\n\t\treturn $user;\n\t}",
"private function parse_facebook_profile($user_info)\n {\n $user_profile = new SocialProfile();\n\n foreach($user_info as $key => $field)\n {\n switch ($key)\n {\n case 'id':\n $user_profile->id = $field;\n break;\n case 'first_name':\n $user_profile->given_name = $field;\n break;\n case 'last_name':\n $user_profile->last_name = $field;\n break;\n case 'gender':\n $user_profile->gender = $field;\n break;\n case 'email':\n $user_profile->email = $field;\n break;\n default:\n break;\n }\n }\n\n return $user_profile;\n }",
"private function cargarDatosFacebook()\n\t{\n\t\t$this->datosFacebook = null;\n\t\t$facebook = new Facebook(FacebookConfig::ObtenerConfiguracionAplicacion());\n\t\t$idUsuarioActivo = $facebook->getUser();\n\t\tif($idUsuarioActivo != 0 && $idUsuarioActivo == $this->IdFacebook)\n\t\t$this->accessToken = $facebook->getAccessToken();\n\t\tif($this->IdFacebook)\n\t\t$this->datosFacebook = $this->ApiAuth(\"/$this->IdFacebook\");\n\t}",
"public function handleProviderCallback()\n{\n $user = Socialite::driver('facebook')->user();\n\n dd( $user);\n\n // $user->token;\n // code for facebook sign up and login\n}",
"public function getuserAction()\r\n {\r\n $User = $this->getUser();\r\n $data = $User;\r\n return $data;\r\n }",
"function getUser($redirectURL,$fbPermissions = array()){\n\t// echo \"<pre>\";\n\t// print_r($redirectURL);die;\n\t\t$helper = parent::getRedirectLoginHelper();\n\n\t\t\t\n\t\t// Try to get access token\n\t\ttry {\n\t\t if(isset($_SESSION['facebook_access_token'])){\n\t\t $accessToken = $_SESSION['facebook_access_token'];\n\t\t }else{\n\t\t $accessToken = $helper->getAccessToken($redirectURL);\n\n\t\t }\n\t\t} catch(FacebookResponseException $e) {\n\t\t echo 'Graph returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t} catch(FacebookSDKException $e) {\n\t\t\t\n\t\t echo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t}\n\t\tif(!empty($accessToken)){\n\t\t try {\n\t\t $profileRequest = parent::get('/me?fields=name,first_name,last_name,email,link,gender,locale,picture,friends',$accessToken);\n\t\t $fbUserProfile = $profileRequest->getGraphNode()->asArray();\n\t\t } catch(FacebookResponseException $e) {\n\t\t echo 'Graph returned an error: ' . $e->getMessage();\n\t\t session_destroy();\n\n\t\t header(\"Location: ./\");\n\t\t exit;\n\t\t } catch(FacebookSDKException $e) {\n\t\t \n\t\t echo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t\t exit;\n\t\t }\n\t\t \treturn $fbUserProfile;\n\t\t }else{\n\t\t $loginURL = $helper->getLoginUrl($redirectURL, $fbPermissions);\n\t\t \t\treturn $loginURL;\n\t\t }\n\t}",
"public function getUser()\n{\nreturn $this->user;\n}",
"public function facebook() {\n\n\t \n\t\t$fb = new Facebook\\Facebook([\n\t\t 'app_id' => '144053429274589',\n\t\t 'app_secret' => '4ef6916e238aff3b6726dac08b853135',\n\t\t 'default_graph_version' => 'v2.4',\n\t\t 'default_access_token' => 'CAACDBA17B90BAKI0aOXR1vF5zDtZCOKPbWSXopnvvNpBTHZARXVhUVrZBAXn4CB1ZBgsyk13ZA38uZAWoffwchukfajiIOG7cYrNEEAm0CdlHgwDRWeBuD0OZCfT6PB6U2vsE3O45jTgx0YTc24TXEqyZC1ZBIjc9GxD3aSv6WAyIWsZCpAcbnxYPNCdL389FxaRsZD', // optional\n\t\t]);\t \n\t\t\t \n\ttry {\n\t $response = $fb->get('/me?fields=id,name,email');\n\t} catch(Facebook\\Exceptions\\FacebookResponseException $e) {\n\t echo 'Graph returned an error: ' . $e->getMessage();\n\t exit;\n\t} catch(Facebook\\Exceptions\\FacebookSDKException $e) {\n\t echo 'Facebook SDK returned an error: ' . $e->getMessage();\n\t exit;\n\t}\n\n\t\n\t$me = $response->getGraphUser();\n\t$name = $me['name'];\n\t$email = $me['email'];\n\t$u_name = preg_replace('/@.*$/', '', $me['email']);\n\t$user = new User();\n\t$user->name \t\t\t\t= $name ;\n\t$user->type \t\t\t\t= 'general';\n\t$user->register_type \t\t= 'facebook';\n\t$user->username \t\t\t= $u_name;\t\t\t\n\t$user->email \t\t\t\t= $email;\n\t$user->password \t\t\t= bcrypt($u_name);\n\t$user->save();\n\t\n\t$lastInsertedId= $user->id; \n\t\n\t$profile = new Profile();\n\t$profile = $user->profile()->save($profile);\t\t\t\n\t$credentials = array(\n\t\t'email' => $email,\n\t\t'password' => $u_name\n\t);\n\n\tif (Auth::attempt($credentials)) {\n\t\t\t//return Redirect::to('home');\n\t\t\treturn redirect()->intended('home');\n\t}\n\n\t\n\n\t//echo '<pre>'; print_r($new_name);\n\t//echo 'Logged in as ' . $me['email'];\t \n\t \n\t \n\t }",
"public function load() {\n\t\tglobal $config;\n\t\n\t\tif($this->exists()){ // User exists\n\t\t\tif(!empty($this->data['id']))\n\t\t\t\t$where = 'id = '.$this->data['id'];\n\t\t\telseif(!empty($this->data['fbid']))\n\t\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\t\t\t\n\t\t\t$result = $config['database']->query(\"\n\t\t\t\tSELECT *\n\t\t\t\tFROM nuusers\n\t\t\t\tWHERE $where\n\t\t\t\tLIMIT 1\n\t\t\t\");\n\t\t\t$row = $result->fetch_assoc();\n\t\t\t\n\t\t\tforeach($row as $key => $val){\n\t\t\t\tif($key == 'options'){\n\t\t\t\t\t$this->data['options'] = json_decode($val, true);\n\t\t\t\t}else if(is_string($val)){\n\t\t\t\t\tif(!get_magic_quotes_gpc())\n\t\t\t\t\t\t$this->data[$key] = stripslashes($val);\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t}else{\n\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(empty($this->data['photo'])){\n\t\t\t\tglobal $config;\n\t\t\t\t\n\t\t\t\tif($this->data['faculty'])\n\t\t\t\t\t$this->data['photo'] = $config['imagesurl'].'/faculty.jpg';\n\t\t\t\telse\n\t\t\t\t\t$this->data['photo'] = $config['imagesurl'].'/anonymous.gif';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->data['level'] = $this->loadLevel();\n\t\t\t$this->data['levelProgress'] = $this->loadLevelProgress();\n\t\t\t$this->data['rank'] = $this->loadRank();\n\t\t\t$this->data['achievements'] = $this->loadAchievements();\n\t\t\t$this->data['post_counts'] = $this->loadPostCounts();\n\t\t\t\n\t\t\treturn $result;\n\t\t}else{ // User does not exists\n\t\t\tif($this->data['fbid']){ // New user from facebook\n\t\t\t\tglobal $fbme;\n\t\t\t\t\n\t\t\t\t$y = substr($fbme['birthday'],6);\n\t\t\t\t$m = substr($fbme['birthday'],0,2);\n\t\t\t\t$d = substr($fbme['birthday'],3,2);\n\t\t\t\t$bday = $y.'-'.$m.'-'.$d;\n\t\t\t\t\n\t\t\t\t$create = $this->create(array(\n\t\t\t\t\t'first_name' => $fbme['first_name'],\n\t\t\t\t\t'last_name' => $fbme['last_name'],\n\t\t\t\t\t'email' => $fbme['email'],\n\t\t\t\t\t'birthday' => $bday,\n\t\t\t\t\t'gender' => $fbme['gender']\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\treturn $create;\n\t\t\t}else{ // Invalid user id\n\t\t\t\t$this->data['id'] = null;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function get_user()\n{\n$response = $GLOBALS['http']->request('GET', '/api/users/@me', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $_SESSION['auth_token']\n ]\n]);\n\n$responseBody = $response->getBody(true); \n$response = json_decode($responseBody, true);\n$_SESSION['username'] = $response['username'];\n$_SESSION['discrim'] = $response['discriminator'];\n$_SESSION['user_id'] = $response['id'];\n$_SESSION['user_avatar'] = $response['avatar'];\n}",
"protected function __construct() \n {\n include Kohana::find_file('vendor', 'facebook');\n\n // Load configuration \"config/facebook\"\n $this->config = Kohana::$config->load('facebook');\n\n // Create new Facebook object\n $this->fb = new Facebook(array(\n 'appId' => $this->config->appId,\n 'secret' => $this->config->secret,\n 'cookie' => $this->config->cookie,\n 'session_type' => $this->config->session_type,\n ));\n\n try {\n $this->me = $this->fb->api('/' . $this->fb->getUser(), 'GET');\n } catch (FacebookApiException $e) {\n // Do nothing.\n }\n }",
"function getuser($aa_inst_id)\n {\n $session_key=generateSessionKey($aa_inst_id);\n $session=new Zend_Session_Namespace($session_key);\n\n if(!isset($session->facebook) || !isset($session->facebook['user']) )\n $user=false;\n else\n $user=$session->facebook['user'];\n\n return $user;\n }",
"public function getFacebook()\n\t{\n\t\treturn $this->facebook;\n\t}",
"public function getUser(){\r\n $urlUser = \"{$this->apiHost}/api/v1/me\";\r\n // return $urlUser;\r\n return self::runCurl($urlUser);\r\n }",
"public function getUser()\n\t{\n\t\tif(isset($this->user))\n\t\t{\n\t\t\treturn $this->user;\n\t\t}\n\n\t\t$request = new ColoCrossing_Http_Request('/', 'GET');\n\t\t$executor = $this->getHttpExecutor();\n\t\t$response = $executor->executeRequest($request);\n\t\t$content = $response->getContent();\n\n\t\treturn $this->user = ColoCrossing_Object_Factory::createObject($this, null, $content['user'], 'user');\n\t}",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function user() {\n\t\tif ( ! is_null($this->user)) return $this->user;\n\t\treturn $this->user = $this->retrieve($this->token);\n\t}",
"public function handleProviderCallback()\n {\n $user = Socialite::driver('facebook')->user();\n dd($user);\n\n // $user->token;\n }",
"public function getUserProfile();",
"function getUserInfo()\n {\n return $this->userinfo;\n }",
"public function FacebookLogin($helper,$FB)\n {\n $db = new DB();\n $accessToken = $helper->getAccessToken();\n $oAuth2Client = $FB->getOAuth2Client();\n if(!$accessToken->isLongLived())\n {\n $accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);\n }\n $response = $FB->get(\"/me?fields=id,first_name,last_name,gender,email,link,picture.type(large)\",$accessToken);\n $userData=$response->getGraphNode()->asArray();\n $gpUserData = array(\n 'oauth_provider'=> 'facebook',\n 'oauth_uid' => $userData['id'],\n 'first_name' => $userData['first_name'],\n 'last_name' => $userData['last_name'],\n 'email' => $userData['email'],\n 'gender' => $userData['gender'],\n 'picture' => $userData['picture']['url'],\n 'link' => $userData['link']\n );\n if(!empty($gpUserData)){\n //Check whether user data already exists in database\n $querySelect = \"SELECT \n * \n FROM \n \".$this->userTbl.\" \n WHERE \n oauth_provider = '\".$gpUserData['oauth_provider'].\"'\n AND \n oauth_uid = '\".$gpUserData['oauth_uid'].\"'\";\n $result = $db->prepare($querySelect);\n $result->execute();\n if($result->rowCount() > 0){\n //Update user data if already exists\n $queryUpdate = \"UPDATE \n \".$this->userTbl.\" \n SET \n first_name = '\".$gpUserData['first_name'].\"',\n last_name = '\".$gpUserData['last_name'].\"',\n email = '\".$gpUserData['email'].\"',\n gender = '\".$gpUserData['gender'].\"',\n picture = '\".$gpUserData['picture'].\"', \n link = '\".$gpUserData['link'].\"' \n WHERE\n oauth_provider = '\".$gpUserData['oauth_provider'].\"' \n AND \n oauth_uid = '\".$gpUserData['oauth_uid'].\"'\";\n $update = $db->prepare($queryUpdate);\n $update->execute();\n }else{\n //Insert user data\n $queryInsert = \"INSERT INTO \n \".$this->userTbl.\"\n SET \n oauth_provider = '\".$gpUserData['oauth_provider'].\"',\n oauth_uid = '\".$gpUserData['oauth_uid'].\"',\n first_name = '\".$gpUserData['first_name'].\"',\n last_name = '\".$gpUserData['last_name'].\"',\n email = '\".$gpUserData['email'].\"',\n gender = '\".$gpUserData['gender'].\"', \n picture = '\".$gpUserData['picture'].\"', \n link = '\".$gpUserData['link'].\"'\";\n $insert = $db->prepare($queryInsert);\n $insert->execute();\n }\n \n //Get user data from the database\n $result = $db->prepare($querySelect);\n $result->execute();\n $gpUserData = $result->fetchAll();\n }\n //close db connection\n $db = NULL;\n //Return user data\n return $gpUserData;\n }",
"public function __construct()\n {\n $this->user = User::getMe();\n }",
"public function getProfile()\n {\n return $this->request('me');\n }",
"public function getUser(CakeRequest $request) {\n\t\t$user = $this->Facebook->getUser();\n\t\tif(!empty($user)){\n\t\t\ttry{\n\t\t\t\t$user = $this->Facebook->api('/me');\n\t\t\t\t$user['access_token'] = $this->Facebook->getAccessToken();\n\t\t\t\treturn $user;\n\t\t\t}catch(FacebookApiException $e){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static function GetUserInfo()\n\t{\n\t\t$userID = self::GetUserID();\n\t\t// TODO: Use cURL for this, requires server config\n\t\treturn json_decode(file_get_contents(\"http://graph.facebook.com/${userID}\"));\n\t}",
"private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }",
"protected function initUserInfoAttributes()\n {\n return $this->api(\"user/get_user_info\", 'GET', ['oauth_consumer_key'=>$this->getUserAttributes()['client_id'], 'openid'=>$this->getUserAttributes()['openid']]);\n }",
"abstract protected function getUserProfile();",
"private function weibo_get_user( $access_token, $social_id ) {\n\t\t$url = 'https://api.weibo.com/2/users/show.json?access_token=' . $access_token . '&uid=' . $social_id;\n\n\t\t// Initiate curl\n\t\t$ch = curl_init();\n\t\t// Will return the response, if false it print the response\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t// Set the url\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t// Execute\n\t\t$result=curl_exec($ch);\n\t\t// Closing\n\t\tcurl_close($ch);\n\n\t\treturn json_decode($result, true);\n\t}",
"public function fb_connect() {\n\n $profile = $this->params['profile'];\n $merchant_id = $this->params['merchant_id'];\n $account_dbobj = $this->params['account_dbobj'];\n\n $fb_user = new FbUser($account_dbobj);\n $fb_user->findOne('id='.$merchant_id);\n $fb_user->setAbount($pofile['about']);\n $fb_user->setBio($profile['bio']);\n $fb_user->setBirthday($profile['birthday']);\n $fb_user->setEducation($profile['education']);\n $fb_user->setEmail($profile['email']);\n $fb_user->setFirstName($profile['first_name']);\n $fb_user->setGender($profile['gender']);\n $fb_user->setExternalId($profile['external_id']);\n $fb_user->setLastName($profile['last_name']);\n $fb_user->setLink($profile['link']);\n $fb_user->setLocale($profile['locale']);\n $fb_user->setName($profile['name']);\n $fb_user->setQuotes($profile['quotes']);\n $fb_user->setTimezone($profile['timezone']);\n $fb_user->setUpdatedTime($profile['setUpdatedTime']);\n $fb_user->setUsername($profile['username']);\n $fb_user->setVerified($profile['verified']);\n $fb_user->setWork($profile['work']);\n $fb_user->save();\n\n $merchant = new Merchant($account_dbobj);\n BaseMapper::saveAssociation($merchant, $fb_user, $account_dbobj);\n\n $this->status = 0;\n }",
"function login_with_fb($accessToken, $user_id, $profile_name, $user_email, $user_name){\n\t$fbData['user_profile']['accessToken'] = (string) $accessToken;\n\t$fbData['user_profile']['id'] = $user_id;\n\t$fbData['user_profile']['name'] = $profile_name;\n\t$fbData['user_profile']['email'] = $user_email;\n\t$fbData['user_profile']['username'] = $user_name;\n\t$fbData['user_profile']['education'] = file_get_contents(\"https://graph.facebook.com/$user_id?fields=education&access_token=$accessToken\");\n\t\n\t\t$options = array(\n\t\t\t'type' => 'user',\n\t\t\t'plugin_user_setting_name_value_pairs' => array(\n\t\t\t\t'uid' => $fbData['user_profile']['id'],\n\t\t\t\t'access_token' => $fbData['user_profile']['accessToken'],\n\t\t\t),\n\t\t\t'plugin_user_setting_name_value_pairs_operator' => 'OR',\n\t\t\t'limit' => 0\n\t\t);\n\t\t$users = elgg_get_entities_from_plugin_user_settings($options);\n\t\t\n\tif ($users) {\n\t\t// 1 User Found and it will return a successful return status\n\t\t\tif (count($users) == 1) {\n\t\t\t\t\t$return['success'] = true;\n\t\t\t\t\t$return['message'] = elgg_echo(\"Welcome! Facebook user logged in successfully\");\n\t\t\t\t\t$return['user_guid'] = $users[0]->guid;\n\t\t\t\t\t$return['user_name'] = $users[0]->name;\n\t\t\t\t\t$return['user_username'] = $users[0]->username;\n\t\t\t\t\t$return['user_email'] = $users[0]->email;\n\t\t\t\t\t$return['auth_token'] = create_user_token($users[0]->username);\n\t\t\t\t\t$return['api_key'] = get_api_key();\n\t\t\t\t\telgg_set_plugin_user_setting('uid', $fbData['user_profile']['id'], $users[0]->guid);\n\t\t\t\t\telgg_set_plugin_user_setting('access_token', $fbData['user_profile']['accessToken'], $users[0]->guid);\n\t\t\t\t\telgg_set_plugin_user_setting('education', $fbData['user_profile']['education'], $users[0]->guid);\n\t\t\t\t\tif(empty($users[0]->email)) {\n\t\t\t\t\t\t$user = get_entity($users[0]->guid);\n\t\t\t\t\t\t$user->email = $fbData['user_profile']['email'];\n\t\t\t\t\t\t$user->save();\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t// More than 1 User Found and it will return an unsuccessful return status\n\t\t\t\t$return['success'] = false;\n\t\t\t\t$return['message'] = elgg_echo(\"Oops! Facebook user not logged in successfully\");\n\t\t\t}\n\t\t} else {\n\t\t// No user was found and it will create a new user based in fbData\n\t\t$user = facebook_connect_create_update_user($fbData);\n\t\t\t\n\t\tif($user){\n\t\t\t// If the registration was successfully\n\t\t\t$return['success'] = true;\n\t\t\t$return['message'] = elgg_echo(\"Welcome! Facebook user registered successfully!\");\n\t\t\t$return['user_guid'] = $user->guid;\n\t\t\t$return['user_name'] = $user->name;\n\t\t\t$return['user_username'] = $user->username;\n\t\t\t$return['user_email'] = $user->email;\n\t\t\t$return['auth_token'] = create_user_token($user->username);\n\t\t\t$return['api_key'] = get_api_key();\n\t\t\telgg_set_plugin_user_setting('uid', $fbData['user_profile']['id'], $user->guid);\n\t\t\telgg_set_plugin_user_setting('access_token', $fbData['user_profile']['accessToken'], $user->guid);\n\t\t\telgg_set_plugin_user_setting('education', $fbData['user_profile']['education'],$user->guid);\n\t\t} else {\n\t\t\t// If the registration was not successful\n\t\t\t$return['success'] = false;\n\t\t\t$return['message'] = elgg_echo(\"Oops! Facebook user not registered successfully\");\n\t\t}\n\t}\n\treturn $return;\n}",
"public function __construct(Facebook $facebook)\n {\n $this->facebook = $facebook;\n $this->avatarManager = new Avatar(new Options, $this->facebook);\n }",
"public function getUser() {}",
"abstract protected function getUser();",
"public function getUserProfile() {\n\n\t\t$data = $this->api->get( 'people/~:('. implode(',', $this->config['fields']) .')?format=json' );\n\n\t\t// if the provider identifier is not received, we assume the auth has failed\n\t\tif ( ! isset( $data->id ) ) {\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response: \" . Hybrid_Logger::dumpData( $data ), 6 );\n\t\t}\n\n\t\t// # store the user profile.\n\t\t$this->user->profile->identifier = ( property_exists ( $data, 'id' ) ) ? $data->id : '';\n\t\t$this->user->profile->firstName = ( property_exists ( $data, 'firstName' ) ) ? $data->firstName : '';\n\t\t$this->user->profile->lastName = ( property_exists ( $data, 'lastName' ) ) ? $data->lastName : '';\n\t\t$this->user->profile->profileURL = ( property_exists ( $data, 'publicProfileUrl' ) ) ? $data->publicProfileUrl : '';\n\t\t$this->user->profile->email = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->emailVerified = ( property_exists ( $data, 'emailAddress' ) ) ? $data->emailAddress : '';\n\t\t$this->user->profile->photoURL = ( property_exists ( $data, 'pictureUrl' ) ) ? $data->pictureUrl : '';\n\t\t$this->user->profile->description = ( property_exists ( $data, 'summary' ) ) ? $data->summary : '';\n\t\t$this->user->profile->country = ( property_exists ( $data, 'country' ) ) ? strtoupper( $data->country ) : '';\n\t\t$this->user->profile->displayName = trim( $this->user->profile->firstName . ' ' . $this->user->profile->lastName );\n\n\t\tif ( property_exists( $data, 'phoneNumbers' ) && property_exists( $data->phoneNumbers, 'phoneNumber' ) ) {\n\t\t\t$this->user->profile->phone = (string) $data->phoneNumbers->phoneNumber;\n\t\t} else {\n\t\t\t$this->user->profile->phone = null;\n\t\t}\n\n\t\tif ( property_exists( $data, 'dateOfBirth' ) ) {\n\t\t\t$this->user->profile->birthDay = (string) $data->dateOfBirth->day;\n\t\t\t$this->user->profile->birthMonth = (string) $data->dateOfBirth->month;\n\t\t\t$this->user->profile->birthYear = (string) $data->dateOfBirth->year;\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}",
"public function callback()\n {\n $user = Socialite::driver('facebook')->user();\n // mostrar lo que trajo: dd($user);\n\n // Video 25: Consulta para saber si ya se registro antes con facebook, y mandarlo defrente\n $existing = User::whereHas('socialProfiles', function($query) use ($user) {\n $query->where('social_id',$user->id);\n })->first();\n if($existing !== null){\n auth()->login($existing);\n\n return redirect('/');\n }\n\n\n // datos por cada session\n session()->flash('facebookUser',$user);\n\n return view('users.facebook',[\n 'user' => $user\n ]);\n }",
"public function __construct($access_token, $db_con) {\n // Get the user's data from Spotify\n $this->access_token = $access_token;\n $user_data = $this->getUserData();\n // echo \"<br><br>USER DATA<br><br><br><br>\";\n // var_dump($user_data);\n $id = $user_data->{\"id\"};\n if ($user_data->{\"product\"} == \"premium\") {\n $this->premium = True;\n $db_data = $db_con->getUser($id);\n if (!($db_data)) {\n // If db_con error occured\n errorToHome(\"db_data_is_false\");\n } else if ($db_data == \"not_found\") {\n // If the user is not found, attempt to insert user\n if (!($db_con->insertUser($user_data))) {\n errorToHome(\"db_con_insert_user_1\");\n }\n $this->first_login = true;\n $this->banned = false;\n } else {\n // If user exists in the database\n // Get the database entry for if the user is banned\n $this->banned = $db_data[\"banned\"];\n if ($this->banned == \"1\") {\n // If the user is banned\n $this->banned = true;\n errorToHome(\"banned\");\n } else {\n $this->banned = false;\n }\n }\n // Set properties to setup the dashboard\n $this->id = $id;\n $this->name = $user_data->{\"display_name\"};\n\n // Set the nickname and muted property depending on whether new user or not\n if ($db_data == \"not_found\") {\n $this->nickname = NULL;\n $this->dashboard_muted = False;\n } else {\n $this->nickname = $db_data[\"nickname\"];\n // echo $db_data[\"dashboardMuted\"];\n $this->dashboard_muted = $db_data[\"dashboardMuted\"];\n }\n\n $this->email = $user_data->{\"email\"};\n\n // Set the profile picture\n if ($db_data[\"profilePicture\"] == \"defaultProfilePicture.png\" ||\n substr($db_data[\"profilePicture\"], 0, 20) != \"https://morahman.me/\") {\n if (count($user_data->{\"images\"}) == 0) {\n $userProfPic = \"defaultProfilePicture.png\";\n } else {\n $userProfPic = $user_data->{\"images\"}[0]->{\"url\"};\n }\n } else {\n $userProfPic = $db_data[\"profilePicture\"];\n }\n\n $this->prof_pic = $userProfPic;\n $db_con->updateUser($this);\n } else {\n $this->premium = False;\n }\n }",
"function getUser() {\n return user_load($this->uid);\n }",
"public function indexAction()\n {\n\t\t$fb = new stdClass();\n\t\t$bootstrap = $this->getInvokeArg('bootstrap');\n\t\t$aConfig = $bootstrap->getOptions();\n\t\t$fb->_app_id = $aConfig['my']['facebook']['app_id'];\n\t\t$fb->_api_key = $aConfig['my']['facebook']['api_key'];\n\t\t$fb->_secret = $aConfig['my']['facebook']['secret'];\n\t\t///////////////////////////////////////////////////////////////\n\t\t\t\t\n\t\tfunction parse_signed_request($signed_request, $secret) {\n\t\t\tlist($encoded_sig, $payload) = explode('.', $signed_request, 2); \n\t\t\t\n\t\t\t// decode the data\n\t\t\t$sig = base64_url_decode($encoded_sig);\n\t\t\t$data = json_decode(base64_url_decode($payload), true);\n\t\t\t\n\t\t\tif (strtoupper($data['algorithm']) !== 'HMAC-SHA256') {\n\t\t\t\terror_log('Unknown algorithm. Expected HMAC-SHA256');\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t// check sig\n\t\t\t$expected_sig = hash_hmac('sha256', $payload, $secret, $raw = true);\n\t\t\tif ($sig !== $expected_sig) {\n\t\t\t\terror_log('Bad Signed JSON signature!');\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t\tfunction base64_url_decode($input) {\n\t\t\treturn base64_decode(strtr($input, '-_', '+/'));\n\t\t}\n\t\t\n\t\tif ($_REQUEST) {\n\t\t\t//INSTANTIATE NEW OBJECTS\n\t\t\t$pssFacebook = new Zend_Db_Table('facebook');\n\t\t\t$pssUser = new Zend_Db_Table('users');\n\t\t\t$flag = NULL;\n\t\t\t//MAKE RESPONSE OBJECT\n\t\t\t$response = parse_signed_request($_REQUEST['signed_request'], $fb->_secret);\n\t\t\t/*\n\t\t\t$select = $pssUser->select()->where('email = ?', $response['registration']['email']);\n\t\t\t$pssUserRow = $pssUser->fetchRow($select);\n\t\t\tif($pssUserRow)\n\t\t\t{\n\t\t\t\t$flag = 'pre-existing user';\n\t\t\t}\n\t\t\t$select = $pssFacebook->select()->where('email = ?', $response['registration']['email']);\n\t\t\t$pssFBRow = $pssFacebook->fetchRow($select);\n\t\t\t*/\n\t\t\t$auth = Zend_Auth::getInstance();\n\t\t\tif($auth->hasIdentity())\n\t\t\t{\n\t\t\t\t$identity = $auth->getIdentity();\n\t\t\t\t$data = array();\n\t\t\t\t$data['user_id'] = $identity->id;\n\t\t\t\t$data['oauth_token'] = $response['oauth_token']; $data['fb_id'] = $response['user_id'];\n\t\t\t\t$data['name'] = $response['registration']['name']; $data['email'] = $response['registration']['email']; $data['password'] = md5($response['registration']['password']);\n\t\t\t\t$data['last_updated'] = date(\"Y-m-d H:i:s\", time());\n\t\t\t\t$pssFacebook->insert($data);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$select = $pssUser->select()->where('email = ?', $response['registration']['email']);\n\t\t\t\t$pssUserRow = $pssUser->fetchRow($select);\n\t\t\t\tif($pssUserRow)\n\t\t\t\t{\n\t\t\t\t\t$flag = 'pre-existing user';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$select = $pssFacebook->select()->where('email = ?', $response['registration']['email']);\n\t\t\t\t\t$pssFBRow = $pssFacebook->fetchRow($select);\n\t\t\t\t\tif($pssFBRow)\n\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$array = explode('/', $response['registration']['birthday']);\n\t\t\t\t\t\t$birthday = $array[2] . '-' . $array[0] . '-' . $array[1];\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\t$data['email'] = $response['registration']['email']; $data['name'] = $response['registration']['name'];\n\t\t\t\t\t\t$data['birthday'] = $birthday;\n\t\t\t\t\t\t$data['password'] = md5($response['registration']['password']);\n\t\t\t\t\t\t$data['last_updated'] = date(\"Y-m-d H:i:s\", time());\n\t\t\t\t\t\t$pssUser->insert($data);\n\t\t\t\t\t\t$select = $pssUser->select()->where('email = ?', $response['registration']['email']);\n\t\t\t\t\t\t$pssUserRow = $pssUser->fetchRow($select);\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\t$data['oauth_token'] = $response['oauth_token']; $data['user_id'] = $pssUserRow->id; $data['fb_id'] = $response['user_id'];\n\t\t\t\t\t\t$data['name'] = $response['registration']['name']; $data['email'] = $response['registration']['email']; $data['password'] = md5($response['registration']['password']);\n\t\t\t\t\t\t$data['last_updated'] = date(\"Y-m-d H:i:s\", time());\n\t\t\t\t\t\t$pssFacebook->insert($data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_redirect('/default/index/index');\n\t\t /*\n\t\t echo '<pre>';\n\t\t print_r($response);\n\t\t echo '</pre>';\n\t\t */\n\t\t \n\t\t} else {\n\t\t echo '$_REQUEST is empty';\n\t\t}\n }",
"public function facebook()\n {\n return $this->auth('Facebook');\n }",
"public function userProfile() {\n\t\t\t$request = $this->api(\"GET\", \"/me\");\n\t\t\t\n\t\t\t$request->execute();\n\t\t\t$response = $request->responseObject();\n\t\t\t$response->id = $response->ID;\n\t\t\treturn $response;\n\t\t}",
"function getUser() \n {\n\t\t\treturn $this->user;\n\t\t}",
"function getUserProfile()\r\n\t{\r\n\t\ttry{ \r\n\t\t\t$data = $this->api->getProfile( $this->api->getCurrentUserId() );\r\n\t\t}\r\n\t\tcatch( Exception $e ){\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error while requesting the user profile.\", 6 );\r\n\t\t}\r\n\r\n\t\tif ( ! is_object( $data ) )\r\n\t\t{\r\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalide response.\", 6 );\r\n\t\t} \r\n\r\n\t\t$this->user->profile->identifier = $this->api->getCurrentUserId();\r\n\t\t$this->user->profile->displayName \t= @ $data->basicprofile->name;\r\n\t\t$this->user->profile->description \t= @ $data->aboutme;\r\n\t\t$this->user->profile->gender \t= @ $data->basicprofile->gender;\r\n\t\t$this->user->profile->photoURL \t= @ $data->basicprofile->image;\r\n\t\t$this->user->profile->profileURL \t= @ $data->basicprofile->webUri;\r\n\t\t$this->user->profile->age \t\t\t= @ $data->age;\r\n\t\t$this->user->profile->country \t\t= @ $data->country;\r\n\t\t$this->user->profile->region \t\t= @ $data->region;\r\n\t\t$this->user->profile->city \t\t\t= @ $data->city;\r\n\t\t$this->user->profile->zip \t\t\t= @ $data->postalcode;\r\n\r\n\t\treturn $this->user->profile;\r\n\t}",
"function __construct() {\r\n\r\n parent::__construct();\r\n $this->load->model(\"cms_model\");\r\n $this->load->model(\"admin_model\");\r\n $this->load->model(\"login_model\");\r\n\r\n $this->data['site'] = $this->cms_model->view_data('1', 'site_settings');\r\n $this->data['contact'] = $this->cms_model->view_data('1', 'contact_settings');\r\n $this->data['social'] = $this->cms_model->view_data('1', 'social_links');\r\n\r\n if ($this->facebook->is_authenticated()) {\r\n // Get user facebook profile details\r\n $userProfile = $this->facebook->request('get', '/me?fields=id,first_name,last_name,email,gender,locale,picture');\r\n\r\n // Preparing data for database insertion\r\n $userData['oauth_provider'] = 'facebook';\r\n $userData['oauth_uid'] = $userProfile['id'];\r\n $userData['first_name'] = $userProfile['first_name'];\r\n $userData['last_name'] = $userProfile['last_name'];\r\n $userData['email'] = $userProfile['email'];\r\n $userData['gender'] = $userProfile['gender'];\r\n $userData['locale'] = $userProfile['locale'];\r\n $userData['profile_url'] = 'https://www.facebook.com/' . $userProfile['id'];\r\n $userData['picture_url'] = $userProfile['picture']['data']['url'];\r\n // Insert or update user data\r\n $user_id = $this->login_model->check_user_by_social_media($userData);\r\n // Check user data insert or update status\r\n if (!empty($user_id)) {\r\n $this->data['userData'] = $userData;\r\n $this->session->set_userdata($userData);\r\n if (isset($_REQUEST['state']) && isset($_REQUEST['code'])) {\r\n echo \"<script>\r\n window.close();\r\n \t\twindow.opener.location.reload();\r\n </script>\";\r\n }\r\n } else {\r\n $data['userData'] = array();\r\n }\r\n $this->data['logoutUrl'] = $this->facebook->logout_url();\r\n } else {\r\n $this->data['authUrl'] = $this->facebook->login_url();\r\n }\r\n }",
"public function getUserData($get_extra_info = false, $facebook_uid = null){\r\n\t\t$facebook_uid = $this->getFacebookUid($facebook_uid);\r\n\t\tif(!$get_extra_info && array_key_exists($facebook_uid,$this->cached_user_data)){\r\n\t\t\treturn $this->cached_user_data[$facebook_uid];\r\n\t\t}\r\n\t\t\r\n\t\t$fields = $get_extra_info ? array_merge(self::$data_fields, self::$data_fields_extra) : self::$data_fields;\r\n\t\t$user_info_res = $this->usersGetInfo($facebook_uid, $fields);\r\n\r\n\t\t$user_data = isset($user_info_res[0]) ? $user_info_res[0] : array();\r\n\r\n\t\tif(!$get_extra_info){\r\n\t\t\t$this->cached_user_data[$facebook_uid] = $user_data;\r\n\t\t}\r\n\t\treturn $user_data;\r\n\t}",
"function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }",
"public function facebook()\n {\n return $this->hasOne('App\\FacebookAccount');\n }",
"function user_get()\n {\n $id = $this->get('id');\n if ($id == '') {\n $user = $this->db->get('auth_user')->result();\n } else {\n $this->db->where('id', $id);\n $user = $this->db->get('auth_user')->result();\n }\n $this->response($user, 200);\n }",
"public function user() { return $this->user; }",
"function getUserProfile()\n\t{\n\t\t$response = $this->api->get( 'user/get.json' );\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->id_user ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\n\t\t# store the user profile.\n\t\t$this->user->profile->identifier = (property_exists($response,'id_user'))?$response->id_user:\"\";\n\t\t$this->user->profile->displayName = (property_exists($response,'username'))?$response->username:\"\";\n\t\t$this->user->profile->profileURL = (property_exists($response,'user_url'))?$response->user_url:\"\";\n\t\t$this->user->profile->photoURL = (property_exists($response,'avatar_url'))?$response->avatar_url:\"\";\n//unknown\t\t$this->user->profile->description = (property_exists($response,'description'))?$response->description:\"\";\n\t\t$this->user->profile->firstName = (property_exists($response,'firstname'))?$response->firstname:\"\";\n\t\t$this->user->profile->lastName = (property_exists($response,'name'))?$response->name:\"\";\n\n\t\tif( property_exists($response,'gender') ) {\n\t\t\tif( $response->gender == 1 ){\n\t\t\t\t$this->user->profile->gender = \"male\";\n\t\t\t}\n\t\t\telseif( $response->gender == 2 ){\n\t\t\t\t$this->user->profile->gender = \"female\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->user->profile->gender = \"\";\n\t\t\t}\n\t\t}\n\n\t\t$this->user->profile->language = (property_exists($response,'lang'))?$response->lang:\"\";\n\n\t\tif( property_exists( $response,'birth_date' ) && $response->birth_date ) {\n $birthday = date_parse($response->birth_date);\n\t\t\t$this->user->profile->birthDay = $birthday[\"day\"];\n\t\t\t$this->user->profile->birthMonth = $birthday[\"month\"];\n\t\t\t$this->user->profile->birthYear = $birthday[\"year\"];\n\t\t}\n\n\t\t$this->user->profile->email = (property_exists($response,'email'))?$response->email:\"\";\n\t\t$this->user->profile->emailVerified = (property_exists($response,'email'))?$response->email:\"\";\n\n//unknown\t\t$this->user->profile->phone = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->address = (property_exists($response,'address1'))?$response->address1:\"\";\n\t\t$this->user->profile->address .= (property_exists($response,'address2'))?$response->address2:\"\";\n\t\t$this->user->profile->country = (property_exists($response,'country'))?$response->country:\"\";\n//unknown\t\t$this->user->profile->region = (property_exists($response,'unknown'))?$response->unknown:\"\";\n\t\t$this->user->profile->city = (property_exists($response,'city'))?$response->city:\"\";\n\t\t$this->user->profile->zip = (property_exists($response,'postalcode'))?$response->postalcode:\"\";\n\n\t\treturn $this->user->profile;\n\t}",
"function connectUser($facebook, $facebookProfil){\n $facebookId= $facebookProfil['id'];\n \n // try to find if user exist in database\n $user = User::findUserByFacebookId($facebookId);\n\n // create a user in database if not\n if ($user == null) {\n $username = $facebookProfil[\"username\"];\n $last_name = $facebookProfil[\"last_name\"];\n $first_name = $facebookProfil[\"first_name\"];\n $email = $facebookProfil[\"email\"];\n $token = $facebook->getAccessToken();\n $score = 0;\n\n $newUser = new User($facebookId, $username, $first_name, $last_name, $email, $token, $score);\n User::add($newUser);\n\n Session::getInstance()->setUserSession($newUser);\n } else {\n Session::getInstance()->setUserSession($user[0]);\n }\n}",
"public function getUser()\n {\n $this->getParam('user');\n }",
"public function getUser()\n {\n }",
"protected function getUserProfile() {\n $profile = (new FacebookRequest(\n $this->fbSession, 'GET', '/me'\n ))->execute()->getGraphObject(GraphUser::className());\n //return\n return $profile;\n }",
"protected function getFacebookData()\n\t{\n\t\t$config = array();\n\t\t$config['appId'] = $this->config->get('fb_app_id');\n\t\t$config['secret'] = $this->config->get('fb_app_secret');\n\t\t$config['fileUpload'] = false; // optional\n\n\t\t$facebook = new Facebook($config);\n\t\t$access_token = $facebook->getAccessToken();\n\n\t\tforeach ($this->aData AS &$elm)\n\t\t{\n\n\t\t\tif (trim($elm->w20_facebook) == '')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$url = urlencode('https://www.facebook.com/' . $elm->w20_facebook);\n\n\t\t\t$query = \"SELECT+site,id,type+FROM+object_url+WHERE+url='$url'\";\n\t\t\t$fql_query_url = 'https://graph.facebook.com/'\n\t\t\t . 'fql?q=' . $query\n\t\t\t . '&access_token=' . $access_token;\n\t\t\t$fql_query_result = file_get_contents($fql_query_url);\n\t\t\t$fql_query_obj = json_decode($fql_query_result, true);\n\n\t\t\t$r = $fql_query_obj['data'];\n\n\t\t\tif (empty($r))\n\t\t\t{\n\t\t\t\t$elm->someval_facebook_valid = 0;\n\t\t\t\tLog::add('Facebook Invalid:' . $elm->w20_facebook);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$elm->someval_facebook_valid = 1;\n\t\t\t\t$type = $r[0]['type'];\n\t\t\t\t$fb_id = $r[0]['id'];\n\n\t\t\t\t$elm->someval_facebook_type = $type;\n\n\t\t\t\tLog::add('Facebook Valid:' . $elm->w20_facebook . ' | Type=' . $type . ' | Id=' . $fb_id);\n\n\t\t\t\tif ($type == 'page')\n\t\t\t\t{\n\t\t\t\t\t$query = \"SELECT+fan_count+FROM+page+WHERE+page_id='$fb_id'\";\n\t\t\t\t\t$fql_query_url = 'https://graph.facebook.com/'\n\t\t\t\t\t . 'fql?q=' . $query\n\t\t\t\t\t . '&access_token=' . $access_token;\n\t\t\t\t\t$fql_query_result = file_get_contents($fql_query_url);\n\t\t\t\t\t$fql_query_obj = json_decode($fql_query_result, true);\n\n\t\t\t\t\t$r = $fql_query_obj['data'];\n\n\t\t\t\t\t$elm->someval_facebook_friends_or_likes = $r[0]['fan_count'];\n\t\t\t\t\tLog::add('Facebook Fancount:' . $r[0]['fan_count']);\n\t\t\t\t}\n\n\t\t\t\tif ($type == 'profile')\n\t\t\t\t{\n\t\t\t\t\t$query = \"SELECT+friend_count+FROM+user+WHERE+uid=$fb_id\";\n\t\t\t\t\t$fql_query_url = 'https://graph.facebook.com/'\n\t\t\t\t\t . 'fql?q=' . $query\n\t\t\t\t\t . '&access_token=' . $access_token;\n\t\t\t\t\t$fql_query_result = file_get_contents($fql_query_url);\n\t\t\t\t\t$fql_query_obj = json_decode($fql_query_result, true);\n\n\t\t\t\t\t$r = $fql_query_obj['data'];\n\t\t\t\t\t$elm->someval_facebook_friends_or_likes = $r[0]['friend_count'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"protected function __construct()\n\t{\n\t\t// Load config\n\t\t$this->_config = Kohana::$config->load('facebook');\n\t\t\n\t\tinclude Kohana::find_file('vendor', 'facebook/facebook');\t\t\n\t\t// Create Facebook object\n\t\t$this->_facebook = new Facebook(\n\t\t\tarray(\n\t\t\t\t'appId' => $this->_config->get('appId'),\n\t\t\t\t'secret' => $this->_config->get('secret'),\n\t\t\t\t'cookie' => $this->_config->get('cookie')\n\t\t\t)\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t$this->_me = $this->_facebook->api('/me');\n\t\t\t$this->_user = $this->_facebook->getUser();\n\t\t}\n\t\tcatch (FacebookApiException $e)\n\t\t{\n\t\t\t// Do nothing.\n\t\t}\n\t\t\n\t\t$this->login_url = '';\n\t}",
"protected function loadUser()\n {\n $sixreps = new Sixreps(Yii::app()->params['api_host']);\n\n try {\n list($body, $info) = $sixreps->get('/users/me', array(\n 'access_token' => Yii::app()->user->user_token,\n ));\n }\n catch (Exception $e) {}\n\n $this->_model = $body;\n\n return $this->_model;\n }"
] | [
"0.71528816",
"0.69624674",
"0.6865818",
"0.6812688",
"0.6799075",
"0.6566896",
"0.64577645",
"0.6433151",
"0.6370485",
"0.6350718",
"0.63437027",
"0.6332854",
"0.6318679",
"0.6311859",
"0.627526",
"0.62704456",
"0.62497324",
"0.6245908",
"0.6238108",
"0.62368137",
"0.62345886",
"0.6219616",
"0.62117875",
"0.615318",
"0.6132104",
"0.6115637",
"0.61129105",
"0.61118907",
"0.6108128",
"0.609815",
"0.6077715",
"0.6073138",
"0.60720474",
"0.60701865",
"0.60634834",
"0.60593414",
"0.603903",
"0.6034436",
"0.60298216",
"0.60143",
"0.60121787",
"0.60049635",
"0.6003948",
"0.60014236",
"0.5997491",
"0.59883875",
"0.59849113",
"0.59789413",
"0.5973938",
"0.5952599",
"0.5939993",
"0.59383714",
"0.59328514",
"0.59328514",
"0.59328514",
"0.59328514",
"0.59328514",
"0.59328514",
"0.59328514",
"0.592608",
"0.5925088",
"0.59210765",
"0.59069633",
"0.5890431",
"0.5889067",
"0.5878102",
"0.58773905",
"0.58693993",
"0.5862342",
"0.5859064",
"0.58548665",
"0.5854378",
"0.5854214",
"0.5849075",
"0.58486396",
"0.5845863",
"0.58409894",
"0.5834533",
"0.5828831",
"0.58213234",
"0.5819072",
"0.5813305",
"0.5811828",
"0.5805549",
"0.58050746",
"0.5793933",
"0.5788895",
"0.5788046",
"0.5787802",
"0.57875764",
"0.57844657",
"0.57802993",
"0.577632",
"0.5772238",
"0.5768542",
"0.5764791",
"0.57640827",
"0.5759601",
"0.57562006",
"0.5754166"
] | 0.75658464 | 0 |
/ Make a Mysql connection Requires SERVER, DBUSER, DBPASS | protected function __connect()
{
$link = mysqli_connect(SERVER,DBUSER,DBPASS);
if(!$link) return mysqli_error();
$this->link = $link;
mysqli_select_db($link, CSYBER_DB);
return $link;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setDatabaseConnection($host,$database,$user,$pass);",
"function connect($tns = TNS, $usr = DB_SERVER_USERNAME, $pwd = DB_SERVER_PASSWORD,$dbName = DB_NAME) \n { \n \n\t\t\t$this->setTns($tns);\n\t\t\t$this->setUser($usr);\n\t\t\t$this->setPass($pwd);\n $this->setDb($dbName);\n \n\t\t\tif($this->conn = mysql_connect($this->tnsName ,$this->user, $this->pass)) \n {\n if(!mysql_select_db($this->dbName))\n {\n $this->connectionStatus = false;\n return;\n }\n\t\t\t\t$this->connectionStatus = true;\n\t\t\t}\n\t\t}",
"public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}",
"private function connectMysql() {\r\n\t\tif (!($tmp = mysql_connect($this -> host, $this -> user, $this -> pass))) {\r\n\t\t\tif ($this -> logger) {\r\n\t\t\t\tLogger::sqlError(mysql_error());\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception('Connection impossible : ' . mysql_error());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this -> link = &$tmp;\r\n\r\n\t\t// Select the db\r\n\t\tif (!mysql_select_db($this -> base, $this -> link)) {\r\n\t\t\tif ($this -> logger) {\r\n\t\t\t\tLogger::sqlError(mysql_error($this -> link));\r\n\t\t\t\treturn;\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Exception('Impossible to select the database : ' . mysql_error($this -> link));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function connect_mysql($params){\n if (!$params) throw new Exception('Params error');\n if (!$this->handler = mysql_connect($params['host'],$params['login'],$params['password'])) throw new Exception('Error connectind to database server');\n if ($this->handler) {\n if (!mysql_select_db($params['db'], $this->handler)) throw new Exception('Error selecting database');\n }\n }",
"public function connect() {\r\n\t\t$this->conn = mysql_connect ( $this->HOST, $this->USERNAME, $this->PASSWORD, /* new_link */ true );\r\n\t\tif (!$this->conn) {\r\n\t\t\tdie ( 'Error connecting to mysql server.' );\r\n\t\t}\r\n\t\t\r\n\t\tif ($this->DATABASE) {\r\n\t\t\t$this->select_db();\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->conn;\r\n\t}",
"public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }",
"public function connect($host, $database, $user, $password);",
"function connect()\n\t{\n\t\t$this->link = mysql_connect( $this->hostname, $this->username, $this->password );\n\t\t\n\t\tif( $this->link === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to connect to database.');\t\n\t\t\t\n\t\t$db_selected = mysql_select_db( $this->database, $this->link );\n\t\t\n\t\tif( $db_selected === FALSE )\n\t\t\tthrow new Exception('MySQLDatabase: Failed to select database: '.$this->database );\t\n\t}",
"function dbConnect () {\n\t$con = mysql_connect($this -> host, $this -> user, $this -> pass);\n mysql_select_db($this->dbname,$con);\n\t}",
"private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }",
"public function db_connect(){\n $db_username = $this->db['username'];\n $db_password = $this->db['password'];\n $db_host = $this->db['host'];\n\n // Start Connection\n $mysql = mysqli_connect($db_host,$db_username,$db_password);\n (!$mysql ? die(\"ERROR: \" . mysqli_error($this->mysql)) : TRUE);\n // Return MySQL Resource\n return $mysql;\n }",
"function connect()\n\t{\n\t\t$this->conn = mysql_connect($this->host, $this->user, $this->password) or $this->error(mysql_error(), __LINE__, __FILE__);\n\t\t$this->serverVersion = explode('.', preg_replace('/^(\\d+)\\.(\\d+)\\.(\\d+)(.*?)$/', '\\1.\\2.\\3', mysql_get_server_info()));\n\t\t$this->select_db();\n\t}",
"public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }",
"function pdo_connect_mysql($host, $dbname, $username = null, $password = null, array $driver_options = array())\n {\n return pdo_connect(\"mysql:host={$host};dbname={$dbname}\", $username, $password, $driver_options);\n }",
"function connect()\n\t{\n\t\tglobal $connection;\n\n\t\t$connection = mysql_connect(HOST, USER, PASS)\n\t\t\tor die(\"Cannot connect to $host as $user:\" . mysql_error());\n \n\t\tmysql_select_db(DBNAME)\n\t\t\tor die (\"Cannot open $dbName:\" . mysql_error());\n\n\t}",
"public function sql_connect($host, $user, $passwd) {\n $this->con = mysql_connect($host, $user, $passwd);\n if (!$this->con) {\n echo _SERERR;\n exit(-1);\n }\n\n }",
"function cacti_db_connect($options)\n{\n $dbh = mysql_connect($options['server'], $options['username'],\n $options['password']);\n \n if (!$dbh) {\n trigger_error(\"Failed to connect to MySQL server '{$options['server']}' as '{$options['username']}'\",\n E_USER_ERROR);\n }\n \n mysql_select_db('cacti', $dbh);\n \n return $dbh;\n}",
"function createConnect()\r\n\t\t{\r\n\t\t$this->conn=mysql_pconnect($this->host,$this->user,$this->password);\r\n\t\tif(!is_resource($this->conn))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to connect to the SQL Server.\";\r\n\t\t\t}\r\n\t\t$d = mysql_select_db($this->dbname, $this->conn);\r\n\t\tif(!is_resource($d))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to Use database \".$this->dbname.\".\";\r\n\t\t\t}\r\n\t\t}",
"private function _newConnection($host, $dbname, $username, $passwd, $options = NULL) \n\t{\n\t\t// setting default options if not provided\n\t\t$options || $options = array (\n\t\t\t\\PDO::MYSQL_ATTR_FOUND_ROWS => TRUE\n\t\t);\n\t\n\t\ttry {\n\t\t\t// connect to the database\n\t\t\t$this->_connection = new \\PDO ( 'mysql:host=' . $host . ';dbname=' . $dbname, $username, $passwd, $options );\n\t\t\t\t\n\t\t\t// set the error codes\n\t\t\t$this->_connection->setAttribute ( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION );\n\t\t} catch ( PDOException $e ) {\n\t\t\ttrigger_error ( 'Error connecting to host: ' . $e->getMessage (), E_USER_ERROR );\n\t\t}\n\t}",
"function connect(){\n\n\t\t$conn = mysql_connect(DB_HOST , DB_USER , DB_PASS) ;\n\t\tif(!$conn){\n\t\t\tdie('could not connect to :'.mysql_error()) ;\n\t\t}\n\n\t\terror_log('conn- databsae: $conn') ;\n\n\t\t// select a database\n\t\t$database = mysql_select_db(DB_NAME, $conn );\n\n\t\tif (!$database) {\n\t\t\t\tdie('Could not use database '.DB_NAME .mysql_error() );\n\t\t}\n\t\telse {\n\t\t\treturn $conn ;\n\t\t}\n\n\t}",
"public function connectdb()\n {\n $this->db = mysql_connect($this->host,$this->port, $this->user, $this->pass)\n if (!$db)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n mysql_select_db($this->database, $this->db);\n }",
"public function mysql($host, $dbname, $username = null, $password = null)\n {\n return $this->connect(\"mysql:host={$host}; dbname={$dbname}\", $username, $password);\n }",
"function connect() // this function connects to mysql database\n\t{\n \t\t// this step can verify host, users, and password are correct before the connection; otherwise, \n \t\t//connection will be failed if one of them is incorrect \n\t\tmysql_connect(DB_HOST,DB_USER,DB_PASS) or die('could not connect to database'. mysql_error());\n\n\t\tmysql_select_db(DB_NAME);\n\t}",
"function connect(){\n $conn = mysql_connect($this->dbhost, $this->dbuser, $this->dbpass) or die ('Erro ao conectar na base de dados');\n mysql_select_db($this->dbname);\n return $conn;\n }",
"private function conect(){\r\n\t\tglobal $HOST;\r\n\t\tglobal $BASEDEDATOS;\r\n\t\tglobal $USUARIO;\r\n\t\tglobal $PASS;\r\n\t\t$this->myconn = mysql_connect($HOST,$USUARIO,$PASS);\r\n\t\tif (! $this->myconn){\r\n\t\t\techo \"Error al intentar conectarse con el servidor MySQL\";\r\n\t\texit(); \r\n\t\t}\r\n\r\n\t\tif (! @mysql_select_db($BASEDEDATOS,$this->myconn)){\r\n\t\t\techo \"No se pudo conectar correctamente con la Base de datos\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t}",
"function connectDB(){\n\t\tif(!$this->conId=mysql_connect($this->host,$this->user,$this->password)){\n trigger_error('Error connecting to the server '.mysql_error());\n exit();\n\t\t}\n\t\tif(!mysql_select_db($this->database,$this->conId)){\n\t\t\t trigger_error('Error selecting database '.mysql_error());\n\t\t\t exit();\n\t\t}\n\t}",
"function connect_and_select_db($server, $username, $pwd, $dbname)\n{\n\t$conn = mysql_connect($server, $username, $pwd);\n\n\tif (!$conn) {\n\t echo \"Unable to connect to DB: \" . mysql_error();\n \t exit;\n\t}\n\n\t// Select the database\n\t$dbh = mysql_select_db($dbname);\n\tif (!$dbh){\n \t\techo \"Unable to select \".$dbname.\": \" . mysql_error();\n\t\texit;\n\t}\n}",
"function connect_and_select_db($server, $username, $pwd, $dbname)\n{\n\t$conn = mysql_connect($server, $username, $pwd);\n\n\tif (!$conn) {\n\t echo \"Unable to connect to DB: \" . mysql_error();\n \t exit;\n\t}\n\n\t// Select the database\n\t$dbh = mysql_select_db($dbname);\n\tif (!$dbh){\n \t\techo \"Unable to select \".$dbname.\": \" . mysql_error();\n\t\texit;\n\t}\n}",
"function connect_and_select_db($server, $username, $pwd, $dbname)\n{\n\t$conn = mysql_connect($server, $username, $pwd);\n\n\tif (!$conn) {\n\t echo \"Unable to connect to DB: \" . mysql_error();\n \t exit;\n\t}\n\n\t// Select the database\n\t$dbh = mysql_select_db($dbname);\n\tif (!$dbh){\n \t\techo \"Unable to select \".$dbname.\": \" . mysql_error();\n\t\texit;\n\t}\n}",
"function connectMySQL($dbHost = 'localhost', $dbUser = 'root', $dbPass = '', $dbDatabase = 'Main') {\r\n\t\tmysql_connect($dbHost, $dbUser, $dbPass);\r\n\t\tmysql_select_db($dbDatabase);\r\n\t}",
"private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }",
"abstract public function OpenConnection( $user, $pass, $ip, $port, $db, $options );",
"function connect(\n\t\t$dbname)\n\t{\n\t\trequire 'config.php';\n\n\t\t$servername = $configs['db_servername'];\n\t\t$username = $configs['db_username'];\n\t\t$password = $configs['db_password'];\n\n\t\t// Create connection\n\t\t$this->connection = new mysqli($servername, $username, $password, $dbname);\n\n\t\t// Check connection\n\t\tif ($this->connection->connect_error) {\n\t\t\tdie(\"Connection failed: \" . $this->connection->connect_error);\n\t\t}\n\t}",
"function conectar2 ($servidor, $usuario, $pass, $base) {\n\t\t\t\t\t$db_con = mysql_connect ($servidor,$usuario,$pass);\n\t\t\t\t\tif (!$db_con) return false; \n\t\t\t\t\tif (!mysql_select_db ($base, $db_con)) return false;\n\t\t\t\t\tif (!mysql_query(\"SET NAMES 'utf8'\")) return false;\n\t\t\t\t\treturn $db_con; \n\t\t\t\t}",
"private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public function connect() {\r\n\t$this->oMySql = new mysqli($this->server, $this->user, $this->pass, $this->database);\r\n\r\n\tif ($this->oMySql->connect_error) {\r\n\t $this->oops(\"Could not connect to server: {$this->server}.\");\r\n\t //die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);\r\n\t}\r\n\r\n\t// Store connected status\r\n\t$this->bIsConnected = true;\r\n\r\n\t// Unset the data so it can't be dumped\r\n\t$this->server = '';\r\n\t$this->user = '';\r\n\t$this->pass = '';\r\n\t$this->database = '';\r\n }",
"protected function connect()\n\t{\n\t\t$strDSN = 'mysql:';\n\t\t$strDSN .= 'dbname=' . $GLOBALS['TL_CONFIG']['dbDatabase'] . ';';\n\t\t$strDSN .= 'host=' . $GLOBALS['TL_CONFIG']['dbHost'] . ';';\n\t\t$strDSN .= 'port=' . $GLOBALS['TL_CONFIG']['dbPort'] . ';';\n\t\t$strDSN .= 'charset=' . $GLOBALS['TL_CONFIG']['dbCharset'] . ';'; // supported only in PHP 5.3.6+\n\n\t\t$arrOptions = array(\n\t\t\tPDO::ATTR_PERSISTENT => $GLOBALS['TL_CONFIG']['dbPconnect'],\n\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => 'SET sql_mode=\\'\\'; SET NAMES ' . $GLOBALS['TL_CONFIG']['dbCharset'],\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t);\n\n\t\t$this->resConnection = new PDO($strDSN, $GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], $arrOptions);\n\t}",
"private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }",
"protected function connectDB () {\n $host=$this->Parameters['db_host'];\n $username=$this->Parameters['db_username'];\n\t\t$password=$this->Parameters['db_userpassword'];\n\t\t$dbname=$this->Parameters['db_name'];\n\t\t\n $this->Conn = new mysqli ($host,$username,$password,$dbname);\n if($this->Conn->connect_errno > 0){\n throw new Exception('Unable to connect to database [' . $this->Conn->connect_error . ']');\n }\n }",
"function Mysql($db=\"\", $host=\"\", $user=\"\", $pass=\"\")\n\t{\n\t\t//var $_db=$site[\"mysql\"][\"db\"];\n\t// hostname\n\t//var $_host=$site[\"mysql\"][\"host\"];\n\t// mysql username\n\t//var $_user=$site[\"mysql\"][\"user\"];\n\t// mysql password\n\t//var $_pass=$site[\"mysql\"][\"pass\"];\n // debug(\"db\",$db);\n\t\tif($db)\n\t\t{\n\t\t\t$this->_db=$db;\n\t\t}else{\n if(defined(\"MYSQLDB\")){\n $this->_db=MYSQLDB;\n }\n\t\t}\n // debug(\"host\",$host);\n\t\tif($host)\n\t\t{\n\t\t\t$this->_host=$host;\n\t\t}else{\n if(defined(\"MYSQLHOST\")){\n $this->_host=MYSQLHOST;\n }\n\t\t}\n // debug(\"user\",$user);\n\t\tif($user)\n\t\t{\n\t\t\t$this->_user=$user;\n\t\t}else{\n if(defined(\"MYSQLUSER\")){\n $this->_user=MYSQLUSER;\n }\n\t\t}\n // debug(\"pass\",$pass);\n\t\tif($pass)\n\t\t{\n\t\t\t$this->_pass=$pass;\n\t\t}else{\n if(defined(\"MYSQLPASS\")){\n $this->_pass=MYSQLPASS;\n }\n\t\t}\n\t\t$this->_link_id=mysql_connect($this->_host,$this->_user,$this->_pass);\n\t\t$this->_mysql_errno=mysql_errno();\n\t\tif(!$this->_mysql_errno)\n\t\t{\n\t\t\t// we succeeded in linking to the server so increment the error_code\n\t\t\t$this->_error_code++;\n // debug(\"errcode\",$this->_error_code);\n\t\t\tif(mysql_select_db($this->_db,$this->_link_id))\n\t\t\t{\n\t\t\t\t// we succeeded in opening the database so increment the error_code again\n\t\t\t\t$this->_error_code++;\n // debug(\"errcode\",$this->_error_code);\n\t\t\t}\n\t\t}\n $this->querylog=array();\n\t}",
"public function connect($servername, $username, $password, $db) {\n\n\t\t$this->dbName = $db;\n\t\t// Create connection\n\t\t$this->db = new mysqli($servername, $username, $password, $db);\n\n\t\t// Check connection\n\t\tif ($this->db->connect_error) {\n\t\t die(\"Connection failed: \" . $this->db->connect_error);\n\t\t}\n\t}",
"public static function connToDB()\n {\n\t if(!defined('DB_SERVER')) define('DB_SERVER', '127.0.0.1');\n\t if(!defined('DB_USERNAME')) define('DB_USERNAME', 'root');\n\t if(!defined('DB_PASSWORD')) define('DB_PASSWORD', 'root');\n\t if(!defined('DB_NAME')) define('DB_NAME', 'NAA');\n\n\t /* Attempt to connect to MySQL database */\n\t $link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD);\n\t /*if(!$link)\n\t {\n\t\t $server_error = 'Server error. Please try again sometime. CON';\n\t\t header( \"Location: /sitedown.php\" );\n\t\t exit ;\n\t }*/\n\n\t $select_db = mysqli_select_db($link,DB_NAME);\n\t /*if(!$select_db)\n\t {\n\t\t $server_error = 'Server error. Please try again sometime. DB';\n\t\t header( \"Location: /sitedown.php\" );\n\t\t exit ;\n\t }*/\n }",
"function conectar2 ($servidor, $usuario, $pass, $base) {\n\t\t\t\t$db_con = mysql_connect ($servidor,$usuario,$pass);\n\t\t\t\tif (!$db_con) return false; \n\t\t\t\tif (!mysql_select_db ($base, $db_con)) return false;\n\t\t\t\tif (!mysql_query(\"SET NAMES 'utf8'\")) return false;\n\t\t\t\treturn $db_con; \n\t\t\t}",
"public function connect($host, $user, $password, $dbname)\n {\n $this->conn = new \\PDO(\"mysql:host=$host;dbname=$dbname\",$user,$password);\n\n }",
"private function connect(){\n $cred = parse_ini_file(dirname(__FILE__) . \"/../db_key.ini\");\n\n try{\n\t\t $conn = new PDO(\"mysql:host=$cred[servername];dbname=$cred[dbname]\", $cred['username'], $cred['password']);\n\n\t\t // set the PDO error mode to exception\n\t\t $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t return $conn;\n }\n\t\tcatch(PDOException $e){\n\t\t \techo \"Connection failed: \" . $e->getMessage();\n }\n\t\treturn null;\n\t}",
"private function mysqlConnect($dbname){\n\t\ttry { \n\t \t$this->dbh = new \\PDO(\n\t \t\t'mysql:host=' . $this->config[$dbname]['host'] . ';dbname=' . $this->config[$dbname]['db'],\n\t \t\t $this->config[$dbname]['user'], \n\t \t\t $this->config[$dbname]['pass']\n\t \t); \n\t } \n\t catch(\\PDOException $e) { \n\t echo $e->getMessage(); \n\t }\n\t}",
"private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }",
"public function open_conn(){\n \n \n $this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS);\n \n if(!$this->connection){\n die(\"Database Connection Failed because: \" . mysql_error());\n }else{\n $db_select = mysql_select_db(DB_NAME,$this->connection);\n if(!$db_select){\n die(\"Database Connection Failed because: \" .mysql_error());\n }\n }\n }",
"private function connect($host, $username, $password){\n\t\t\n\t\t//create connection\n\t\t$this->conn = @mysql_connect($host, $username, $password);\n\t\tif(!$this->conn){\n\t\t\t$this->error(\"Failure on connection.\");\n\t\t}\n\t\t\n\t}",
"function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}",
"public function connect()\n\t\t{\tif (! isset($this->link))\n\t\t\t{\ttry\n\t\t\t\t{\tif (! $this->link = mysql_connect($this->host, $this->user, $this->pass))\n\t\t\t\t\t\tthrow new Exception(\"Cannot connect to \" . $this->host);\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\techo $e->getMessage();\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\t$this->disconnect();\n\t\t\t\t$this->connect();\n\t\t\t}\n\t\t}",
"private function func_connect() {\n $this -> lnk = mysql_connect($this -> host, $this -> user, $this -> password, true) OR die('Could not connect to the database - Why: '.mysql_error());\n mysql_select_db($this -> database) OR die('Could not find database: '.mysql_error());\n }",
"function connect($host,$user,$password) {\n\t\t\n\t$connection = mysql_connect($host,$user,$password);\n\tif (!$connection) {\n\t\tdie(\"database connection error \" . mysql_error());\n\t};\n\t\n\treturn $connection;\n}",
"function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }",
"function connect(){\n if (!mysql_connect($this->host, $this->user, $this->password)) {\n throw new Exception(\"Error : not connected to the server. \");\n }\n\n \n //selected databse\n if (!mysql_select_db($this->database)) {\n throw new Exception(\"Error :not database selected. \");\n }\n \n }",
"function set_mysql_conn($open=True){\n\tif ($open){\n\t\ttry {\n\t\t$GLOBALS['conn'] = new mysqli(HOST, USER, PASSWORD, DBNAME);\n\t\t} catch (mysqli_sql_exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t} else {\n\t\t$GLOBALS['conn']->close();\n\t}\n}",
"private function openConnection()\n\t{\n if (!($this->link = mysql_connect($this->host, $this->user, $this->pass))){\n throw new DatabaseExceptions(302);\n }\n\n $db_selected = mysql_select_db($this->db, $this->link);\n if (!$db_selected) {\n throw new DatabaseExceptions(303);\n }\n\n\t}",
"static function connect($db_host, $db_login, $db_passwd, $db_name) {\n\t\tmysql_connect($db_host, $db_login, $db_passwd) or die (\"MySQL Error: \" . mysql_error()); \n\t\tmysql_query(\"set names utf8\") or die (\"<br>Invalid query: \" . mysql_error());\n\t\tmysql_select_db($db_name) or die (\"<br>Invalid query: \" . mysql_error());\n\t}",
"private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}",
"function connect( $hostname = null, $username = null, $password = null, $database = null ){\r\n\t\tif( !$hostname && !$username && !$database ){\r\n\t\t\trequire \"conf.db.php\";\r\n\t\t\t$hostname=$db['default']['hostname'];\r\n\t\t\t$username=$db['default']['username'];\r\n\t\t\t$password=$db['default']['password'];\r\n\t\t\t$database=$db['default']['database'];\r\n\t\t}\r\n\r\n\t\tif( $this->link = mysql::$link_array[$this->link_name] = mysql_connect( $hostname, $username, $password ) or die( mysql_error() ) )\r\n\t \treturn mysql_select_db( $database ) or die ( mysql_error() );\r\n\t}",
"public function connect () {\r\n\t\t//We should try to check if the resource is already allocated.\r\n\t\tif (($this->con = mysql_connect ($this->host, $this->login, $this->password)) != -1) return true;\r\n\t\telse return $this->_error (2, \"db: Cannot connect to the database.\");\r\n\t}",
"abstract protected function make_connection($host, $uid, $pwd);",
"private function _connect() {\n $this->_oConnection = new mysqli($this->_sServerName, $this->_sUsername, $this->_sPassword, $this->_sDbName);\n\n if ($this->_oConnection->connect_error) {\n die(\"Connection failed\");\n }\n }",
"function connect() {\n trigger_before( 'connect', $this, $this );\n $this->conn = mysql_connect($this->host,$this->user,$this->pass,$this->opt1,$this->opt2);\n if (!$this->conn) {\n $this->db_open = false;\n trigger_error(\"Sorry, the database connection failed. Please check your database connection settings.\".@mysql_error($this->conn), E_USER_ERROR );\n } else {\n $this->db_open = mysql_select_db($this->dbname);\n if (!$this->db_open)\n trigger_error(@mysql_error($this->conn), E_USER_ERROR );\n }\n return $this->db_open;\n }",
"public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }",
"function getConnection($dbname,$dbpass){\r\t\tmysql_connect(\"localhost\",$dbname,$dbpass) or\r die(\"Could not connect: \" . mysql_error());\r //change to your database name\r\t\tmysql_select_db($dbname) or \r\t\t die(\"Could not select database: \" . mysql_error());\r\t}",
"function db_connect() {\r\n $conn = new mysqli('localhost','shadow_admin', 'passwd', 'shadow');\r\n if (!$conn) {\r\n throw new Exception ('Could not connect to database server.');\r\n } else {\r\n $result = $conn->query(\"set names utf8\");\r\n\t\t\t$conn->autocommit(TRUE);\r\n return $conn;\r\n }\r\n }",
"public function connect($db_server, $db_user, $db_passwd, $db_name) {\n $this->db_user = $db_user;\n $this->db_passwd_md5 = md5($db_passwd);\n\n $this->mysqli = new mysqli($db_server, $db_user, $db_passwd, $db_name);\n if ($this->mysqli->connect_errno) {\n $this->connError = array($this->mysqli->connect_errno, $this->mysqli->connect_error);\n return false;\n }\n return true;\n }",
"function good_connect($host, $user, $pwd, $db)\n{\n\t$link = @mysql_connect($host, $user, $pwd);\n\tif (!$link) {\n\t\tdie('Can\\'t connect to database server (check $host, $user, $pwd)');\n\t\terror_log('Can\\'t connect to database server (check $host, $user, $pwd)');\n\t}\n\t\n\t$has_db = mysql_select_db($db);\n\tif (!$has_db)\n\t{\n\t\tdie('Can\\'t select database (check $db)');\n\t\terror_log('Can\\'t select database (check $db)');\n\t}\n return $link;\n}",
"private function _connect()\n\t{\n\t\t// persistent connection can lessen server load\n\t\tif ($this->_persistent === true)\n\t\t{\n\t\t\t$this->_connection = mysql_pconnect($this->_host.':'.$this->_port,\n\t\t\t\t$this->_user, $this->_password);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_connection = mysql_connect($this->_host.':'.$this->_port,\n\t\t\t\t$this->_user, $this->_password);\n\t\t}\n\n\t\t// verify that the connection is active\n\t\tif ($this->_connection == false ||\n\t\t\tis_resource($this->_connection) === false\n\t\t)\n\t\t{\n\t\t\tthrow new DatabaseException('',\n\t\t\t\tDatabaseException::CONNECTION_FAILED\n\t\t\t);\n\t\t}\n\n\t\t// only try to connect if there is a database given (with mysql\n\t\t// you don't need a database given\n\t\tif (!empty($this->_database))\n\t\t{\n\t\t\t// try to connect to the database\n\t\t\tif (mysql_select_db($this->_database, $this->_connection) === false)\n\t\t\t{\n\t\t\t\tthrow new DatabaseException('Error ('.\n\t\t\t\t\tmysql_errno($this->_connection).') '.\n\t\t\t\t\tmysql_error($this->_connection));\n\t\t\t}\n\t\t}\n\t}",
"private function connect()\n {\n global $config, $conn;\n if (!isset($conn))\n {\n try\n {\n $conn = new PDO('mysql:host=' . $config['mysql_hostname'] . ';dbname=' . $config['mysql_database'] . ';', $config['mysql_user'], $config['mysql_password']);\n $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch (PDOException $e)\n {\n error_log($e->getMessage());\n print 'We were unable to connect to the database. Please check your error logs.';\n die();\n }\n }\n }",
"function connect_to_server()\n \t{\n \t\trequire(\"connection_credentials.php\");\n\t\t\t// Connecting to server\n\t \t\t$conn = new mysqli($servername, $username, $password, $dbname);\n\t \t\tif ($conn->connect_error) {\n\t \t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t \t\t}\n\t \t\treturn $conn;\n \t}",
"protected function connect() {\n\n $this->dbc = new mysqli( $this->hostname, $this->username, $this->password, $this->database );\n if ($this->dbc->connect_errno) {\n die( \"Failed to connect to MySQL: \" . $this->dbc->connect_error );\n }\n // set the charset\n $this->dbc->set_charset ( 'utf-8' ); \n }",
"private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }",
"protected function doConnect() {\n \n mysqli_report(MYSQLI_REPORT_OFF);\n \n $host = $this->uri['host'];\n $port = isset($this->uri['port'])?$this->uri['port']:null;\n $user = isset($this->uri['user'])?$this->uri['user']:'root';\n $password = isset($this->uri['pass'])?$this->uri['pass']:'';\n $db = str_replace('/', '',$this->uri['path']) ;\n if(!empty($this->uri['query'])){\n parse_str($this->uri['query'],$args);\n }\n else {\n $args = array();\n }\n Doggy_Log_Helper::debug(\"Connect to mysql [host:$host port:$port user:$user passwd:$password ]\",__METHOD__);\n\n $mysqli = new mysqli($host,$user,$password,$db,$port);\n \n if (mysqli_connect_errno()) {\n Doggy_Log_Helper::error(\"Cannot connect to database[host:$host port:$port user:$user passwd:$password ],Error:\".mysqli_connect_error());\n throw new Doggy_Dba_Exception(\"Cannot connect to database.\");\n }\n \n if(isset($args['charset'])){\n $charset = $args['charset'];\n \n Doggy_Log_Helper::debug(\"Set charset :$charset\",__METHOD__);\n \n if (!$mysqli->set_charset($charset)) {\n self::error(\"Cannot set mysql charset:[$charset]\",__METHOD__);\n throw new Doggy_Dba_Exception(\"Cannot set mysql charset[$charset]\");\n }\n }\n $this->mysqli=$mysqli;\n return true;\n }",
"function conexion($serv, $usuario, $pass, $bd){\r\n\tif (!($link=mysql_connect(\"$serv\",\"$usuario\",\"$pass\"))){\r\n\t\tdie(\"Error conectando a la base de datos.\");\r\n\t}\r\n\tif (!$link=mysql_select_db(\"$bd\",$link)){ \r\n\t\tdie(\"Error seleccionando la base de datos.\");\r\n\t}\r\n\t return($link);\r\n\t\r\n }",
"private function connect($user, $password, $database, $host)\n {\n $this->linkIdentifier = mysql_connect($host, $user, $password) or die(\"Keine Verbindung m�glich: \" . mysql_error());\n mysql_select_db($database, $this->linkIdentifier);\n }",
"function Dbase_connect() {\n\tglobal $db, $db_host, $db_user, $db_password;\n\t$db=mysql_connect( $db_host, $db_user, $db_password );\n}",
"public function connect()\r\n\t{\r\n\t\t$conn_string = \"DATABASE=\".$this->dbname.\";HOSTNAME=\".$this->host.\";PORT=\".$this->port.\";PROTOCOL=TCPIP;UID=\".$this->user.\";PWD=\".$this->pwd.\";\";\r\n\t\t$this->conn = db2_connect($conn_string, '', '');\r\n\t\t\r\n\t\tif( !$this->conn ) \r\n\t\t\ttrigger_error( db2_conn_errormsg(), E_USER_ERROR );\r\n\t\t\r\n\t\treturn $this->conn;\r\n\t}",
"function dbConnect()\n{\n global $debug, $dbServer, $dbUsername, $dbPassword, $dbDatabase;\n // connect to the server\n $dbConn = new mysqli($dbServer, $dbUsername, $dbPassword, $dbDatabase);\n // check is connection was successful\n if ($dbConn->connect_errno) {\n echo \"Failed to connect to MySQL: \" . $dbConn->connect_error;\n exit();\n }\n \n // return the connection object\n return $dbConn;\n}",
"function connect()\r\n {\r\n if(!$this->link = mysql_connect($this->host, $this->user, $this->pass))\r\n {\r\n $this->error_msg = \"Could not connect to the database on $this->host\";\r\n return 0;\r\n }\r\n if(!mysql_select_db($this->db_name, $this->link))\r\n {\r\n $this->error_msg = \"Could not select the $this->db_name database\";\r\n return 0;\r\n }\r\n return $this->link;\r\n }",
"function mysql_con ($database, $login = '', $password = '', $host = '') {\n\t\t$this->con = false;\n\t\t$this->host = $host;\n\t\t$this->database = $database;\n\t\t$this->login = $login;\n\t\t$this->password = $password;\n\t}",
"function mysql () {\n\t/* public: connection parameters */\n\t\t$this->connect();\n\t}",
"function connect($usr,$pw,$db,$host) { \n global $link;\n try { \n $link = new mysqli($host,$usr,$pw,$db); \n $connected = true; \n } catch (mysqli_sql_exception $e) { \n throw $e; \n } \n}",
"function connect($server, $username, $password, $databseName, $showerror=true)\t\t\t\r\n\t{\t\r\n\t\t$this->link = new Database(DATABASE_NAME);\t\t\t\r\n\t}",
"public function mysql_connect(){\n\n\n //hostgator\n $host = getenv('g_host_var');\n $usuario = getenv('g_user_var');\n $senha = getenv('g_pwd_var');\n $database = getenv('g_database_var');\n\n\n $con = mysqli_connect($host, $usuario, $senha, $database);\n\n mysqli_set_charset($con, 'utf8');\n \n if ($con->connect_error) {\n die(\"Connection failed: \" . $con->connect_error);\n }\n\n if(mysqli_connect_errno()){\n echo \"Erro ao tentar se conectar: \".mysqli_connect_error();\n }\n\n return $con;\n }",
"function connect($host, $user, $password, $dbname)\r\n {\r\n $conn = mysqli_connect($host, $user, $password, $dbname);\r\n $this->conn = $conn;\r\n }",
"function mysqlConn(){\r\n\t($GLOBALS[\"___mysqli_ston\"] = mysqli_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS));\r\n\t((bool)mysqli_query($GLOBALS[\"___mysqli_ston\"], \"USE \" . constant('MYSQL_DB')));\r\n\tcheckMySQL();\r\n}",
"public function connect(){\n\n // test if we have an open connection\n if(!$this->con){\n\n // try to open a connection to our mysql database\n try{\n\n // construct our connection\n $this->con = mysqli_connect($this->host, $this->user, $this->pass, $this->database, $this->port);\n\n // catch any exceptions\n }catch(Exception $ex){\n\n // kill the processing of our script and display the exception\n die($ex->getMessage());\n }\n }\n\n // return our connection object\n return $this->con;\n }",
"function db()\n\t{\n\t\tglobal $dbhost, $dbuser, $dbpass, $dbname;\n\t\t$this->db_server_link = @mysql_connect($dbhost, $dbuser, $dbpass);\n\t\tmysql_select_db($dbname, $this->db_server_link) ;\n\t}",
"public function connect($host = null, $user = null, $pass = null, $db)\n {\n if (!is_callable(\"mysqli_connect\")) {\n die(\"Es necesario instalar php5-mysql\");\n }\n\n $this->conexion = $this->mysqliConverter->convert($this->doctrineConnection);\n\n if (null !== $user || null !== $pass || null !== $host) {\n $user = $user ? $user : get_cfg_var(self::MYSQL_USER_KEY);\n $pass = $pass ? $pass : get_cfg_var(self::MYSQL_PASS_KEY);\n $host = $host ? $host : get_cfg_var(self::MYSQL_HOST_KEY);\n\n $this->conexion = mysqli_init();\n mysqli_options($this->conexion, MYSQLI_OPT_LOCAL_INFILE, true);\n mysqli_real_connect($this->conexion, $host, $user, $pass, $db);\n\n if (!$this->conexion) {\n no_cache_die(self::ON_SERVER_ERROR);\n }\n }\n\n // Por ahora parece que la conexion es normal\n self::$readonly = false;\n\n // Si hay definido un servidor maestro vamos a conectar para escritura\n if( $masterHost = trim( get_cfg_var(self::MASTER_PREFIX . \"host\") ) ){\n $masterUser = trim( get_cfg_var(self::MASTER_PREFIX . \"user\") );\n $masterPass = trim( get_cfg_var(self::MASTER_PREFIX . \"password\") );\n\n if( $masterUser && $masterPass ){\n $this->master = mysqli_connect($masterHost, $masterUser, $masterPass, $db);\n }\n\n if( !$this->master ){\n self::$readonly = true;\n }\n }\n\n // self::$readonly = true; // testing\n\n return true;\n }",
"function db_connect($host,$user,$pass,$database){\n\t\t$this->db = new mysqli($host, $user, $pass, $database);\n\n\t\tif($this->db->connect_errno > 0){\n\t\t\tdie('Unable to connect to database [' . $this->db->connect_error . ']');\n\t\t}\n\t}",
"private function connect()\n {\n $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->database_name);\n if ($this->db->connect_error) {\n die(\"Connect failed: \". $this->db->connect_error);\n exit();\n }\n }",
"private function db_connect() {\n\n\t\t$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : TRUE;\n\t\t$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;\n\n\t\t// Connect to database.\n\t\tif ( DEBUG_MODE ) {\n\t\t\t$this->dbcon = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t} else {\n\t\t\t$this->dbcon = @mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t}\n\n\t\tif ( mysqli_connect_errno () ) {\n\t\t\t/* ===== Bail ===== */\n\t\t\tif (DEBUG_DISPLAY) {\n\t\t\t\techo (\"Failed to connect to MySQL: \" . mysqli_connect_error() . '<br />');\n\t\t\t}\n\t\t}\n\n\t\t// Set charset.\n\t\tmysqli_set_charset ( $this->dbcon, $this->dbcharset );\n\n\t\t// Set collate.\n\t\t// mysqli_query ( $this->dbcon, \"COLLATE {$this->dbcollate}\" );\n\n\t\t// Set the database as ready for queries.\n\t\t$this->ready = TRUE;\n\t}",
"function newMySQLDatabase($server, $user, $passwd, $dbname, $port = null) {\n //I really feel like default arguments shouldn't work this way, but StackOverflow says it's fine.\n if($port === null) { //If no port was specified: \n //Set up the connection without the port.\n $dbConnection = new mysqli($server, $user, $passwd);\n }\n else { //If a port was specified \n //Then use it.\n $dbConnection = new mysqli($server, $user, $passwd, \"\", $port);\n }\n //Test the connection\n if($dbConnection->connect_error) { //If the connection fails: \n //Print the error and the rest of the function is not run.\n echo \"Connection failed: \" . $dbConnection->connect_error;\n }\n else { //If the connection goes smoothly:\n //Create the database\n if ($dbConnection->query(\"CREATE DATABASE \" . $dbname) === TRUE) {\n echo \"Database created successfully.\";\n } \n else { //Otherwise, print the error.\n //TODO: Log the error instead!\n echo \"Database could not be created: \" . $dbConnection->error;\n }\n //Close the connection.\n $dbConnection->close();\n }\n }",
"function conectar($servidor,$usuario,$contras,$base){\n $link=mysql_connect($servidor,$usuario,$contras) or die (\"Can't connect to the Database Server\");\n $conect=mysql_select_db($base,$link) or die (\"Can't find the database\");\n return $conect;\n }",
"function connectDatabase() {\n mysql_pconnect(SERVER, USERNAME, PASSWORD)\n or die('Could not connect: ' . mysql_error());\n\n mysql_select_db(DATABASE_NAME)\n or die('Could not select: ' . mysql_error());\n}",
"function PConnect($server_name, $user_name, $password, $database_name)\n {\n $this->connexion_ressource=mysql_pconnect($server_name, $user_name, $password);//connect\n mysql_select_db($database_name, $this->connexion_ressource);//select the db\n mysql_query ('set name utf8', $this->connexion_ressource) ;\n }",
"function db_connect() {\n $servername = '127.0.0.1';\n $username = 'root';\n $password = 'password';\n $dbname = 'computer_parts';\n\n $result = new mysqli($servername, $username , $password, $dbname);\n if (!$result) {\n return false;\n }\n $result->autocommit(TRUE);\n return $result;\n}",
"function MySQL($options=array()){\n\t\t// validate incoming parameters\n\t\tif(count($options)<1){\n trigger_error('No connection parameters were provided');\n exit();\n }\n\t\tforeach($options as $parameter=>$value){\n if(!$parameter||!$value){\n trigger_error('Invalid connection parameter');\n exit();\n }\n $this->{$parameter}=$value;\n\t\t}\n\t\t// connect to MySQL\n\t\t$this->connectDB();\n\t}"
] | [
"0.76894444",
"0.74303997",
"0.74124664",
"0.7391588",
"0.7387866",
"0.73693866",
"0.7321737",
"0.72972643",
"0.7257231",
"0.7256519",
"0.7253002",
"0.7238532",
"0.7229031",
"0.71855456",
"0.7170953",
"0.7128949",
"0.70944834",
"0.70628506",
"0.7043666",
"0.70398617",
"0.70397776",
"0.7029994",
"0.7018317",
"0.6997876",
"0.69870603",
"0.6979883",
"0.6975942",
"0.6973848",
"0.6973848",
"0.6973848",
"0.6962789",
"0.6958724",
"0.69580245",
"0.6948313",
"0.69369066",
"0.6931944",
"0.6928847",
"0.6919237",
"0.6913344",
"0.6912839",
"0.68991745",
"0.68954825",
"0.68941635",
"0.68834543",
"0.6881618",
"0.6876847",
"0.6859981",
"0.6857717",
"0.6843998",
"0.68264455",
"0.68163925",
"0.68158406",
"0.68124336",
"0.6812325",
"0.6810644",
"0.68076724",
"0.6801819",
"0.6801389",
"0.67985666",
"0.67975354",
"0.67973167",
"0.6794995",
"0.6792762",
"0.67748606",
"0.6770568",
"0.67596",
"0.6758589",
"0.6757879",
"0.67573476",
"0.6757149",
"0.67541015",
"0.6751566",
"0.6744812",
"0.6744138",
"0.67439973",
"0.6742481",
"0.67348987",
"0.673312",
"0.6725732",
"0.6716629",
"0.67151684",
"0.67140937",
"0.67099637",
"0.6707924",
"0.6703142",
"0.6697999",
"0.6697759",
"0.6688578",
"0.66851",
"0.6683648",
"0.6683276",
"0.6682521",
"0.66801846",
"0.6677326",
"0.6671538",
"0.66689456",
"0.6667879",
"0.6659193",
"0.6653094",
"0.6651813",
"0.66495013"
] | 0.0 | -1 |
/ close Mysql connection | public function __disconnect()
{
return mysqli_close($this->link);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function mysqlclose() {\n // close connection\n $this->mySQLConnection->close();\n }",
"public function closeConnection() {\n mysql_close();\n }",
"public function close_connection() {\n mysql_close($this->link);\n }",
"public function closeConnection() {\r\n\t\tif(is_resource($this->connection)) {\r\n\t\t\t@mysql_close($this->connection);\r\n\t\t}\r\n\t}",
"function closeConnection() {\n return mysql_close();\n }",
"function closedbconnection() {\r\n\t\t\r\n\t\t\r\n #if ($this->dbconnection = TRUE) {\r\n mysql_close($this->dbconnection);\r\n #}\r\n \r\n }",
"public function close()\n\t{\n\t\t\n\t\t//disconnect db\n\t\tmysql_close($this->link);\n\t\t\n\t}",
"public function close_connection() {\n if($this->connection) {\n mysql_close($this->connection);\n $this->connection = \"\";\n }\n }",
"private function close_connection(){\n\t\t$this -> conn -> close();\n\t}",
"function close() {\n // closing db connection\n mysql_close();\n }",
"function conn_close() \n {\n\t\t\tmysql_close($this->conn);\n\t\t\tunset($this->conn);\n\t\t\t$this->connectionStatus = false;\n\t\t}",
"function close() {\n if ($this->is_valid())\n @mysql_close($this->connection);\n }",
"public function close_connection()\n {\n $this->db = null;\n }",
"public function db_close(){\n mysqli_close($this->mysql);\n }",
"function Close(){\n\n mysql_close($this->connection);\n\n }",
"function disconnect() {\n\t\tmysql_close();\n\t}",
"private function close_connection() \n\t\t{\n\t\t\t$this->conn->close();\n\t\t}",
"function close()\n\t{\n\t\tmysql_close($this->db_server_link);\n\t}",
"function close() {\n mysql_close($this->db);\n }",
"private function close_connection() {\n\t\t$this->conn->close();\n\t}",
"function close_db() {\n\t\tmysql_close($this -> dbc);\n\t}",
"private function closeConnection(){\n $this->db =null;\n }",
"public function close()\n\t \t{\n\t \t\t if($this->cnn)\n\t \t\t {\n\t \t\t \t mysqli_close($this->cnn);\n\t \t\t }\n\t \t}",
"private function deconnexion()\n\t\t{\n\t\t\tmysql_close($this->id);\n\t\t\t\n\t\t}",
"public function closeConn(){\n $this->conn->close();\n }",
"function Close() {\r\n if (!@mysql_close($this->link_id)) {\r\n $this->oops(\"Connection close failed.\");\r\n }\r\n }",
"function close()\n\t{\n\t\tmysql_close();\n\t}",
"function disconnect() {\n if ($this->isConntected()) {\n mysql_close($this->connectionId);\n }\n }",
"public function CloseConnection()\n {\n $this->db = null;\n }",
"function close_connection()\n\t{\n\t\t mysqli_close($this->db_connect);\n\t}",
"public function close_connection() {\n\t\tif(isset($this->connection)) {\n\t\t\tmysqli_close($this->connection);\n\t\t\tunset($this->connection);\n\t\t}\n\t}",
"function disconnect()\n {\n @mysql_close( $this->link_id() );\n }",
"public function close_db_connection(){\n\t\n\t\tif(!$this->persist_connection){\n\t\n\t\t\tif(!@mysql_close($this->connection)){\n\t\t\t\t\t\n\t\t\t\tthrow new Exception(\"Connection close failed :   \" . $this->server . \"\");\n\t\t\t\t\t\n\t\t\t}\n\t\n\t\t}else{\n\t\n\t\t\tthrow new Exception(\"Persistant connection can't be closed :   \" . $this->server . \" \");\n\t\t}\n\t}",
"public function __destruct() {\n mysql_close($this->conn);\n }",
"function close()\n {\n switch ($this->engine)\n {\n case \"mysql\":\n mysql_close($this->connection);\n break;\n }\n }",
"function __destruct() {\r\n\t\t\r\n\t\tif( $this->isOK() ) mysql_close();\r\n\t}",
"function __destruct() {\n mysql_close($this->db_conn);\n }",
"public function closeConnection(){\n\tif($this->getConnection())\n mysqli_close($this->conn);\n\n\n}",
"public function __destruct(){\n\t\t@mysql_close($this->conn);\n\t}",
"public function closeConnection()\n \t{\n \t\t$this->connection = null;\n \t}",
"function closeConnection() {\n\t\t$this->conn->close();\n\t}",
"public static function closeConnection(){\n //Check if instance exists\n if(isset(self::$instance)){\n //Closes connection\n self::$connection = null;\n //unset the instance, following connections will require re-connection to the DB.\n self::$instance = null;\n }\n }",
"protected function closeConnection(){\n if($this->con !=null){\n $this->con->close();\n $this->con=null;\n }\n\n }",
"function ssDbClose($dbConnection) {\n mysql_close($dbConnection);\n}",
"public function close(){\n \n if(isset($this->conexion))//Compruebo que haya alguna conexion\n { \n mysqli_close($this->conexion) or die (msql_error());//Si la hay, la cierro\n }\n }",
"public function shutdown()\r\n {\r\n if ($this->connection != null)\r\n {\r\n @mysql_close($this->connection);\r\n }\r\n }",
"function DBClose(\\Simplon\\Mysql\\Mysql $dbh) {\n $dbh->close();\n}",
"private function closeConnection(){\n\t\t\t$this->connessione->close();\n\t\t}",
"function __destruct() {\n\t\tmysql_close($this->connection);\n\t}",
"function DbClose() {\n mysqli_close($this->link);\n }",
"function __destruct() {\n //@, Error when no linked to db open. \n\t @mysql_close($this->con);\n\t \n\t}",
"public function __destruct() {\r\n @mysql_close($this->resource);\r\n }",
"public function close(){\n\t\t// close mysql connection\n\t\tmysqli_close ( $this->adapter);\n\t}",
"function close() { \n// closing db connection \nmysql_close(); \n}",
"public function conn_close(){\n $this->conn = null;\n }",
"public function close(){\n\n $this->conn::close();\n\n }",
"function closeDbConnection() {\n global $objDb;\n\n if (isset($objDb)) {\n @$objDb->Close();\n }\n }",
"public function disconnect()\n\t\t{\tif (isset($this->link))\n\t\t\t\t$mysql_close($this->link);\n\n\t\t\tunset($this->link);\n\t\t}",
"function __destruct()\n\t{\n\t\tmysql_close( $this->link );\t\n\t}",
"protected function closeConection()\n {\n $this->db->close();\n unset($this->db);\n unset($this->satz);\n }",
"function closeDB($connection){\n mysql_close($connection);\n}",
"function closedb(){\r\n\t\tif($this->socket)\r\n\t\t\t\r\n\t\t\tmysqli_close($this->socket);\r\n\t\t\t$this->connected = false;\r\n\t}",
"function closeDatabaseConnection($db_connection)\r\n\t{\r\n\t\tmysql_close($db_connection);\r\n\t}",
"function DbDisconnect() { \n \t\t$this->close = @mysql_close($this->linkId) or die (\"Error in disconnecting to server: \".mysql_error()); \n\t}",
"function destroy_connection(){\n\t\t//if($this->dbconn != null)\n\t\t//\t$this->dbconn->disconnect();\n\t\tunset($this->dbconn);\n\t}",
"public function closeConn()\n {\n $this->conn->close();\n }",
"public function closeConnection() {\n\t\t$this->conn = null;\n\t\tunset($this->conn);\n\t}",
"public function closeConnection() {\n\t\t$this->conn = null;\n\t\tunset($this->conn);\n\t}",
"function __destruct()\n {\n if($this->link)\n {\n mysql_close($this->link);\n }\n }",
"public function closeConnection ()\n {\n $this->_connection = null;\n }",
"function closeDB2($connection){\n mysql_close($connection);\n}",
"public static function closeConnection()\n {\n if (self::$conn != null)\n self::$conn->close();\n }",
"function disconnect()\r\n {\r\n if(!mysql_close($this->link))\r\n {\r\n $this->error_msg = \"Could not close the $this->db_name database\";\r\n return 0;\r\n }\r\n return 1;\r\n }",
"function Disconnect()\n {\n //SQL::CleanOverhead();\n mysql_close($this->LinkID);\n #$mysqli->close;\n }",
"public function closeConnection() {\n if ($this->conn) {\n $this->log('Closing Connection');\n fclose(self::getInstance()->getConnection());\n $this->conn = null;\n exit();\n }\n }",
"public function close(){\n $this->database->close();\n $this->connected=false;\n }",
"abstract protected function closeConnection();",
"public function close()\r\n\t{\r\n\t\tif($this->cn){mysqli_close($this->cn);}\r\n\t}",
"protected function closeConnection()\n\t{\n\t\t$this->connection->close();\n\t}",
"function close($link = 0) {\n @mysql_close($link ? $link : $this->link) or $this->error(\"Connection close failed.\");\n }",
"function sql_close()\n{\n global $ctx;\n $ctx['sqlconn']->close();\n}",
"function close()\n\t{\n\t\t@mysqli_close($this->dbLink);\n\t}",
"function __destruct() {\n\t\treturn @mysql_close($this->objConnect);\n\t}",
"function closeDb($conn) {\n\n\tmysql_close($conn);\n}",
"function database_close()\n {\n // DO DATABASE QUERY LOGGING\n if( $this->log_stats ) $this->database_log_stats();\n if( $this->log_stats ) $this->database_log_stats_cleanup();\n \n\t return mysql_close($this->database_connection);\n\t}",
"function deconnexion_DB() {\n\tmysql_close();\n}",
"public function closeConnection(){\n\t\tif($this->mConn != null){\n\t\t\t$this->mConn->close();\n\t\t\t$this->mConn = null;\n\t\t}\n\t}",
"function __destruct(){\n mysql_close();\n }",
"function close_connection($connection) {\n mysql_close($connection);\n }",
"public function closeDatabase(){\r\n\t\t\tmysqli_close($this->conn);\r\n\t\t}",
"public function closeCon(){\n if (!mysqli_query($this->conn,$this->sql))\n { die('Error: ' . mysqli_error($this->conn)); }\n mysqli_close($this->conn);\n }",
"function __destruct() {\n $this->closeConn();\n }",
"function close_mysql_connection(){\n global $mysqli;\n $mysqli->close();\n}",
"public function __destruct() {\n if ($this->_db !== null)\n mysql_close($this->_db);\n }",
"public function closeConnection() {\n\t\tif ($this->conn) {\n\t\t $this->conn->close();\n\t\t}\n\t}",
"public static function disconnect() {\n mysqli_close(self::$link);\n }",
"public function close()\n\t{\n\t\t$this->connection->close();\n\t}",
"public static function close_connexion() {\n self::$conn = null;\n }",
"function close()\n\t{\n\t\t$this->connection->close();\n\t}",
"public function close(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}",
"function close() {\r\n\t\t\tif ( $this->_conn != null ) {\r\n\t\t\t\t$this->_conn = null;\r\n\t\t\t\t@OCILogoff( $this->_conn );\r\n\t\t\t}\r\n\t\t}"
] | [
"0.8436954",
"0.8429658",
"0.8326266",
"0.82483447",
"0.8206574",
"0.81989187",
"0.8144409",
"0.8128904",
"0.81016225",
"0.8018417",
"0.8005272",
"0.7992214",
"0.7979116",
"0.7955021",
"0.7936696",
"0.79159075",
"0.79097605",
"0.7874996",
"0.7873269",
"0.78556246",
"0.7842211",
"0.7837041",
"0.7781921",
"0.7781289",
"0.7772965",
"0.7770857",
"0.776941",
"0.7765671",
"0.7744316",
"0.7713531",
"0.76926506",
"0.7691649",
"0.76856583",
"0.76700574",
"0.7647665",
"0.7634251",
"0.7632436",
"0.76198375",
"0.76191056",
"0.7618037",
"0.7609951",
"0.76084644",
"0.7608266",
"0.7605614",
"0.7598221",
"0.7589667",
"0.75761616",
"0.75618696",
"0.7557599",
"0.7549785",
"0.7547302",
"0.75383544",
"0.75359356",
"0.7534632",
"0.75206286",
"0.7518488",
"0.7499922",
"0.7499693",
"0.7481613",
"0.7477427",
"0.7474727",
"0.7473821",
"0.7465278",
"0.7458235",
"0.7456658",
"0.7451088",
"0.7447326",
"0.7447326",
"0.74340177",
"0.7432048",
"0.74306345",
"0.7427434",
"0.74232394",
"0.74202263",
"0.7412316",
"0.7411863",
"0.74094206",
"0.7406517",
"0.73971593",
"0.73945695",
"0.73915344",
"0.7389761",
"0.73895055",
"0.73807925",
"0.7379965",
"0.7379471",
"0.7377995",
"0.7368205",
"0.73660994",
"0.7356735",
"0.73490435",
"0.7348654",
"0.7346418",
"0.7344378",
"0.73392075",
"0.7321535",
"0.73074436",
"0.7303472",
"0.73031133",
"0.7298986",
"0.7297478"
] | 0.0 | -1 |
/ Output from $this | public function __Output()
{
if($this->errors != null) return $this->errors;
if($this->output == null)$this->output = array();
return $this->output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function printout() {\n print_a($this);\n }",
"public function __toString()\n {\n return $this->output();\n }",
"public function output() {}",
"public function __toString()\n {\n return $this->getOutput();\n }",
"function output(){\n\t\techo json_encode($this);\n\t}",
"public function output() {\n }",
"public function output()\n {\n // TODO: Implement output() method.\n }",
"public function __toString()\n {\n echo '<pre>';\n print_r($this);\n echo '</pre>';\n }",
"public function __toString(){ return $this->render(); }",
"public function toHtml() {\n\t\techo '<output '.$this->getAttributes().'/>';\n\t}",
"public static function output() {}",
"public function __toString() {\n\t\treturn $this->render();\n\t}",
"public function __toString()\n {\n ob_start();\n $this->output();\n\n return ob_get_clean();\n }",
"public function getOutput() {}",
"public function __toString() {\n\t\treturn $this->getPrint();\n\t}",
"public function print(){\n echo $this->output;\n }",
"public function __toString()\n {\n return $this->run( );\n }",
"public function render()\n {\n echo $this->__toString();\n\n }",
"public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}",
"public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}",
"public function get_output()\n {\n }",
"public function __toString()\r\n\t{\r\n\t\treturn $this->render();\r\n\t}",
"public function __toString()\r\n\t{\r\n\t\treturn $this->render();\r\n\t}",
"public function __toString()\r\n\t{\r\n\t\treturn $this->render();\r\n\t}",
"public function __toString () {\n\t\treturn $this->Render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render();\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render(TRUE);\n\t}",
"public function __toString()\n\t{\n\t\treturn $this->render(TRUE);\n\t}",
"public function dump()\n {\n var_dump($this); exit;\n }",
"public function __toString()\n {\n return $this->_render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function __toString()\n {\n return $this->render();\n }",
"public function output();",
"public function output();",
"public function output();",
"public function output();",
"public function output();",
"function output() {\n \n }",
"public function __toString()\n {\n return $this->render(true);\n }",
"public function print_out()\n {\n echo \"id: \" . $this->id . \"<br/>\";\n echo $this->rewrite;\n echo $this->extension;\n echo $this->stranglerPattern;\n echo $this->continuousEvolution;\n echo $this->split;\n echo $this->processStrategyOthers;\n echo $this->ddd;\n echo $this->functionalDecomposition;\n echo $this->existingStructure;\n echo $this->decompositionStrategyOthers;\n echo $this->SCA;\n echo $this->MDA;\n echo $this->WDA;\n echo $this->DMC;\n echo $this->techniqueOthers;\n echo $this->GR;\n echo $this->MO;\n echo $this->sourceCode;\n echo $this->useCase;\n echo $this->systemSpecification;\n echo $this->API;\n echo $this->inputOthers;\n echo $this->list;\n echo $this->archi;\n echo $this->outputOthers;\n echo $this->experiment;\n echo $this->example;\n echo $this->caseStudy;\n echo $this->noValidation;\n echo $this->maintainability;\n echo $this->performance;\n echo $this->reliability;\n echo $this->scalability;\n echo $this->security;\n echo $this->qualityOthers;\n echo $this->score;\n echo $this->matchScore;\n echo $this->misMatch . \"<br/>\";\n }",
"public function __toString() {\n\t\treturn self::$before . $this->render() . self::$after;\n\t}",
"public function getOutput()\n {\n $this->output = $output;\n }",
"function display(){\n\n\t\t\tview::$output = $this->output;\n\n\t\t}",
"function display()\n {\n view::$output = $this->output;\n }",
"public function __toString(){\n\t\treturn \"\".var_dump($this);\n\t}",
"function display()\n {\n\n view::$output = $this->output;\n }",
"public function getOutput();",
"public function getOutput();",
"public function __toString()\n {\n \treturn $this->get();\n }",
"protected function output() {\n\t\treturn $this->before() . $this->option( 'content' ) . $this->after();\n\t}",
"public function __toString() {\n\t\treturn $this->toString();\n\t}",
"public function __toString() {\n\t\treturn $this->toString();\n\t}",
"public function output() {\n\t\treturn $this->content;\n\t}",
"public function __toString()\n {\n return $this->apply();\n }",
"abstract public function getOutput();",
"function Dump()\n {\n echo \"<pre>\" . htmlspecialchars($this->ToString()) . \"</pre>\";\n }",
"public function __toString()\n {\n $result = $this->show();\n return $result ? $result : '';\n }",
"public function __tostring()\n\t{\n\t\treturn '<pre>' . print_r($this, true) . '</pre>';\n\t}",
"public function __toString() {\n return $this->assemble();\n }",
"public function __toString() {\n //(string)var_export($this);\n }",
"public function __toString()\n\t{\n\t\treturn \"This is the function that is called when you try to use print or echo or a variable that holds an instance of this class.\";\n\t}",
"public function __toString()\n {\n \tif ($this->result) {\n \t\treturn $this->result;\n \t}\n }",
"public function display ()\n {\n echo $this->as_text ();\n }",
"public function display(){\n return $this->string;\n }",
"public function __toString() {\r\n return $this->toString();\r\n }",
"function display() {\n\t\tforeach($this as $prop => $val) {\n\t\t\techo $val;\n\t\t}\n\t}",
"public function __toString()\n {\n return $this->toHtml();\n }",
"public function __toString()\n {\n return print_r($this, true);\n }",
"public function __toString()\n {\n return $this->adaptor->render();\n }",
"public function __toString() {\n // This is a neat way to get save the output of var_dump to a string \n // instead of printing it immediately\n ob_start();\n var_dump($this);\n $value = ob_get_contents();\n ob_end_clean();\n \n return $value;\n }",
"protected function _output($data) {}",
"function __toString(){\n\t\treturn $this->toString();\n\t}",
"public function getOutput()\n {\n return $this->output;\n }",
"function __toString() {\n\n\t\t\treturn $this->name . \" says \" . $this->sound . \" give me some \" . $this->favorite_food . \" my id is \" . $this->id . \" total animals = \" . Animal::$number_of_animals . \"</br> </br>\";\n\n\t\t}",
"public function __toString()\n {\n return $this->_;\n }",
"public function __toString()\n {\n return $this->_;\n }",
"public function __toString()\n {\n return $this->_;\n }",
"public function __toString()\n {\n return $this->make()->render();\n }",
"public function getOutput()\n {\n return $this->_output;\n }",
"public function __toString(): string\n {\n return $this->output() . PHP_EOL;\n }",
"public function __toString() {\n\t\treturn $this->getHtml();\n\t}"
] | [
"0.7495389",
"0.74621785",
"0.74504864",
"0.7404564",
"0.73557514",
"0.72831446",
"0.72106415",
"0.7077141",
"0.70692307",
"0.7067184",
"0.7051643",
"0.7041407",
"0.70394623",
"0.70286256",
"0.69915813",
"0.69852954",
"0.69828844",
"0.69794655",
"0.6977775",
"0.6977775",
"0.6967521",
"0.6962003",
"0.6962003",
"0.6962003",
"0.6960524",
"0.69393545",
"0.69393545",
"0.69393545",
"0.69393545",
"0.69393545",
"0.69393545",
"0.69393545",
"0.69393545",
"0.69393545",
"0.6925264",
"0.6925264",
"0.6907985",
"0.69029963",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.68893284",
"0.6861302",
"0.6861302",
"0.6861302",
"0.6861302",
"0.6861302",
"0.6826757",
"0.6822054",
"0.68100774",
"0.6808629",
"0.68004274",
"0.67860055",
"0.67572373",
"0.6752327",
"0.6749428",
"0.6744954",
"0.6744954",
"0.67413855",
"0.67392313",
"0.67390203",
"0.67390203",
"0.6735034",
"0.67302567",
"0.67175883",
"0.670553",
"0.6682787",
"0.6676272",
"0.6675245",
"0.666297",
"0.6661356",
"0.66554767",
"0.66544133",
"0.66533655",
"0.6653028",
"0.6651949",
"0.6650957",
"0.66322947",
"0.66316676",
"0.6625559",
"0.66240835",
"0.66174394",
"0.6615018",
"0.661304",
"0.66127586",
"0.66127586",
"0.66127586",
"0.6611492",
"0.66046894",
"0.66040725",
"0.6603538"
] | 0.0 | -1 |
/ Return false is user is not page admin of $pid | private function __isPageAdmin($pid)
{
$facebook = $this->fb;
$isAdmin = $facebook->api(array(
"method"=>"fql.query",
"query"=>"SELECT name FROM page WHERE page_id IN (SELECT page_id FROM page_admin WHERE uid=me()) AND page_id = $pid"
));
if(is_array($isAdmin)){if(count($isAdmin) == 0)$isAdmin = false;
else $isAdmin = true;}
else if($is_admin == false || $is_admin == null)$is_admin = false;
else $is_admin = true;
return $isAdmin;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function userIsPageAdmin() {\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageAdmin(Yawp::authUsername(), $this->area, $this->page);\n\t}",
"function isAdmin() {\n\t\t$me = $_SESSION[\"me\"];\n\t\t$check = mf(mq(\"select `id`,`url` from `[p]musicplayer` where `id`='{$me}' limit 1\"));\n\t\tif ($check[\"url\"] == \"admin\") {\n\t\t\treturn true;\n\t\t}\n\t}",
"function is_admin(){\r\n if (isset($_SESSION['admin']) && $_SESSION['admin']){\r\n return true;\r\n }\r\n return false;\r\n }",
"function isAdmin(){\n\tif(isset($_SESSION['type']) && $_SESSION['type']!='user')\n\t\treturn true;\n\telse\n\t\treturn false;\n\t}",
"function isAdminPage () {\n\t\tif ($this->getName () == 'admin') {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$parentPage = $this->getParentPage ();\n\t\t\tif ($parentPage !== null) {\n\t\t\t\treturn $parentPage->isAdminPage ();\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function publisher_userIsAdmin()\r\n{\r\n global $xoopsUser;\r\n $publisher = PublisherPublisher::getInstance();\r\n\r\n static $publisher_isAdmin;\r\n\r\n if (isset($publisher_isAdmin)) {\r\n return $publisher_isAdmin;\r\n }\r\n\r\n if (!$xoopsUser) {\r\n $publisher_isAdmin = false;\r\n } else {\r\n $publisher_isAdmin = $xoopsUser->isAdmin($publisher->getModule()->getVar('mid'));\r\n }\r\n\r\n return $publisher_isAdmin;\r\n}",
"function is_admin()\n {\n\tif(isset($_SESSION['ISADMIN']))\n\t {\n\t\treturn $this->check_session($_SESSION['ISADMIN']);\n\t }\n\t else\n\t {\n\t\t return false;\n\t }\n }",
"public function isAdmin()\n {\n if($this->u_r_id==null )\n {\n $this->u_r_id = array();\n $this->u_r_id[]=0;\n\n\n }\n foreach ($this->u_r_id as $int)\n {\n if($int==1)\n return true;\n }\n return false;\n }",
"function isAdmin() {\n\tif (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'admin' ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }",
"function is_admin() {\n\tif(\n\t\tisset($_SESSION['admin']->iduser) \n\t\t&& !empty($_SESSION['admin']->iduser) \n\t\t&& $_SESSION['admin']->type = 'admin'\n\t\t&& $_SESSION['active']->type = 1\n\t\t&& $_SESSION['confirmed']->type = 1\n\t) return TRUE;\n\t\t\t\n\treturn FALSE;\n}",
"public function is_admin($uid = false)\r\n {\r\n global $db;\r\n if (!$uid) {\r\n if (isset($_SESSION['UID'])) {\r\n $uid = $_SESSION['UID'];\r\n } else {\r\n\t\t\t\techo \"Not loggedin\";\r\n\t\t\t\tvar_dump($_SESSION);\r\n\t\t\t}\r\n }\r\n if ($uid != false) {\r\n\t\t\t$level = $this->level($uid);\r\n\t\t\tif ($level == 100) {\r\n\t\t\t\techo \"is admin\";\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\techo \"is not admin\";\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n } else {\r\n // Guest.\r\n\t\t\techo \"Quest\";\r\n return false;\r\n }\r\n }",
"function isUserAdmin() {\r\n $user = $_SESSION['user'];\r\n return checkAdminStatus($user);\r\n }",
"protected function isCurrentUserAdmin() {}",
"protected function isCurrentUserAdmin() {}",
"function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }",
"function is_user_admin()\n {\n }",
"public function is_admin()\n\t{\n\t\t$user = $this->get_current_user();\n\t\tif($user !== NULL)\n\t\t{\n\t\t\tif($user['auth'] == 255)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"static function getIsAdmin() {\n\t\t$user = ctrl_users::GetUserDetail();\n\t\tif($user['usergroupid'] == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"function isAdmin() {\n\tif (!isLoggedIn()) {\n\t\tredirectTo(\"index.php\");\n\t} else if($_SESSION[\"type\"] != \"executive\") {\n\t\tredirectTo(\"myhome.php\");\n\t} \n\treturn true;\n}",
"function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}",
"private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"function iAmAdmin(){\n $adminIDs = Array( 1, 2 );\n \n return in_array( $_SESSION['userid'], $adminIDs );\n }",
"function is_adminlink()\n{\n\tglobal $mdb2;\n\n\tif (isset($_SESSION['user_id'])) {\n\t\t$query = \"\n\t\t\tSELECT m.menu_id AS mid, m.menu_name AS mname\n\t\t\tFROM iShark_Menus m\n\t\t\tLEFT JOIN iShark_Modules mo ON mo.module_id = m.module_id\n\t\t\tLEFT JOIN iShark_Rights r ON r.module_id = mo.module_id\n\t\t\tLEFT JOIN iShark_Groups_Rights gr ON gr.right_id = r.right_id\n\t\t\tLEFT JOIN iShark_Groups g ON g.group_id = gr.group_id\n\t\t\tLEFT JOIN iShark_Groups_Users gu ON gu.group_id = g.group_id\n\t\t\tWHERE mo.is_active = 1 AND m.type = 'admin' AND gu.user_id = '\".$_SESSION['user_id'].\"'\n\t\t\tORDER BY sortorder\n\t\t\";\n\t\t$result = $mdb2->query($query);\n\t\tif ($result->numRows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function is_admin() {\n return $this->session->get(\"niveau_acces\") >= 2;\n }",
"function IsAdmin()\n{\n\treturn false;\n}",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"function checkUserIsAdmin()\n {\n $user_db = new SafeMySQL();\n\n $user_id = htmlentities($_SESSION[SES_NAME]['user_id'], ENT_QUOTES, 'UTF-8');\n\n if($user_db->getRow(\"SELECT user_id FROM app_users WHERE user_status = 'Active' AND user_id = ?s\",$user_id)){\n return true;\n } else {\n return false;\n }\n\n }",
"function adminCheck()\n {\n\n // define all the global variables\n global $user, $message, $settings, $translator;\n\n // check if the user is admin\n if ($user->isAdmin()) {\n return true;\n }\n\n // if not then print a custom error message\n $_SESSION['siteTemplateURL'] = $settings->getTemplatesURL();\n $message->customKill($translator->translateText(\"invalidPrivileges\"), $translator->translateText(\"invalidPrivilegesMSG\"), $settings->getTemplatesPath());\n return false;\n }",
"function user_can_access_admin_page()\n {\n }",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"function isAdmin(){\n\t\treturn (isset($this->params['admin']) && $this->params['admin']);\n\t}",
"public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }",
"protected function isAdmin()\n\t{\n\t\treturn is_admin();\n\t}",
"function is_admin()\n\t{\n\t\treturn strtolower($this->ci->session->userdata('DX_role_name')) == 'admin';\n\t}",
"public function isAdmin(){\r\n\t\tif(!isset($_SESSION)){\r\n\t\t\tsession_start();\r\n\t\t}\r\n\t\tif(isset($_SESSION['admin']) && $_SESSION['admin'] == true){\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}",
"static public function isAdmin(){\n if ( isset($_SESSION['admin']) && ($_SESSION['admin'] == 1)){\n return true;\n } else {\n return false;\n }\n }",
"function is_admin() {\r\n\tif ( !isset($_SESSION['sess_pseudo']) || $_SESSION['sess_admin']!=1 || !isset($_SESSION['sess_secure']) )\r\n\t\treturn false;\r\n\telse\r\n\t\treturn true;\r\n}",
"protected function isAdminUser() {}",
"function is_admin_logged_in()\n\t{\n\t\tif(isset($_SESSION['admin']['au_id']))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function is_admin() {\n if($this->is_logged_in() && $this->user_level == 'a') {\n return true;\n } else {\n // $session->message(\"Access denied.\");\n }\n }",
"function userAdmin(){\r\n if(userConnect() && $_SESSION['user']['privilege']==1) return TRUE; else return FALSE;\r\n }",
"function is_admin()\n{\n global $app;\n if (is_authenticated()) {\n $user = $app->auth->getUserData();\n return ($user['role'] === '1');\n } else {\n return false;\n }\n}",
"public static function isAdmin()\n {\n return auth()->check() && auth()->user()->panichd_admin;\n }",
"function is_admin()\r\n{\r\n if(is_auth() && $_SESSION['user']['statut'] == 1)\r\n {\r\n return true;\r\n }\r\n return false;\r\n}",
"public function is_admin()\n {\n $session = $this->session->userdata('user');\n if($session)\n {\n if($session['role'] == 'ADMIN')\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n $this->log_out();\n }\n }",
"public function isAdmin(){\n if($this->role==\"admin\"){\n return true;\n }\n return false;\n }",
"public function isAdmin()\n\t{\n\t\t$this->reply(true);\n\t}",
"public function memberIsAdmin()\n {\n return $_SESSION['__COMMENTIA__']['member_role'] === 'admin';\n }",
"public function isUserOnAdminArea()\n\t{\n\t\treturn is_admin();\n\t}",
"function isAdmin( $id = null ) {\n \n if ( !isset( $id ) ) {\n \n $id = $_SESSION['signed_in_user_id'];\n \n }\n \n $userRole = DB::getRole( $id );\n \n if ( $userRole >= 3 ) {\n \n return TRUE;\n \n }\n \n return FALSE;\n \n }",
"function user_is_admin() {\n\tif(user_is_connect() && $_SESSION['membre']['statut'] == 2) {\n\t\t// si l'utilisateur est connecté et que son statut est égal à 2 alors il est admin\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"function userIsWikiAdmin() {\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->wikiAdmin(Yawp::authUsername());\n\t}",
"function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}",
"function isAdmin() {\n return !$this->isLoggedIn ? FALSE : ($this->member->adminID !== NULL ? TRUE : FALSE);\n }",
"function checkAdminLogin() \n{\n\tif(checkNotLogin())\n\t{\n\t\treturn false;\n\t}\n\t\n\t$user = $_SESSION['current_user'];\n\t\n\tif($user->isAdmin())\n\t{\n\t\treturn true;\n\t}\n\telse \n\t{\n\t\treturn false;\n\t}\n}",
"public function isAdmin()\n {\n $p = User::getUser();\n if($p)\n {\n if($p->canAccess('Edit products') === TRUE)\n {\n return TRUE;\n }\n }\n return FALSE;\n }",
"private function isAdmin() {\n\t\t$user = $this->userSession->getUser();\n\t\tif ($user !== null) {\n\t\t\treturn $this->groupManager->isAdmin($user->getUID());\n\t\t}\n\t\treturn false;\n\t}",
"function user_is_admin() {\n\tif(isset($_COOKIE[\"wss_username\"]))\t{\n\t\t$user = $_COOKIE['wss_username'];\n\t\t$code = $_COOKIE['wss_code'];\n\t\t$userid = intval($_COOKIE['wss_userid']);\n\t\t$code2 = preg_replace(\"/[^a-z,A-Z,0-9]/\", \"\", $code);\n\t\t\n\t\t$sql = mysql_query(\"SELECT * FROM wss_users WHERE id='$userid' AND password='$code2' AND admin='1'\");\n\t\t$login_check = mysql_num_rows($sql);\n\t\tif($login_check <= 0) {\n\t\t\treturn(FALSE);\n\t\t}\n\t\telse {\n\t\t\treturn(TRUE);\n\t\t}\n\t}\n\telse {\n\t\treturn(FALSE);\n\t}\n}",
"function _isUserAdmin(){\n\n $output = 0;\n $userId = $this->session->userdata('userId');\n $user = $this->User_model->getUserByUserId($userId);\n $userRoleId = $user->user_roles_id;\n $userRole = $this->Roles_model->getUserRoleById($userRoleId);\n if($userRole->role === 'admin'){\n $output = 1;\n }\n return $output;\n }",
"function userCanEditPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageEdit(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}",
"function checkAdmin()\n\t {\n\t \tif(!$this->checkLogin())\n\t \t{\n\t \t\treturn FALSE;\n\t \t}\n\t \treturn TRUE;\n\t }",
"function is_admin()\n {\n if(isLoggedIn())\n {\n $username = $_SESSION['username'];\n $result = query(\"select user_role from users where username = '{$username}'\");\n $row = fetchRecords($result);\n if($row['user_role'] == \"admin\")\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n return false;\n }",
"public function checkIsAdmin()\n {\n return $this->user_admin;\n }",
"public function isAdmin();",
"function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"public function is_on_admin_page(): bool {\n\t\treturn is_admin() && isset( $_GET['page'] ) && $_GET['page'] === self::ADMIN_PAGE_SLUG;\n\t}",
"private function userHasAccessToPages() {\n\t\t$configurationProxy = tx_oelib_configurationProxy::getInstance('realty');\n\n\t\t$objectsPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForRealtyObjectsAndImages'\n\t\t);\n\t\t$canWriteObjectsPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $objectsPid), 16\n\t\t);\n\n\t\t$auxiliaryPid = $configurationProxy->getAsInteger(\n\t\t\t'pidForAuxiliaryRecords'\n\t\t);\n\t\t$canWriteAuxiliaryPage = $GLOBALS['BE_USER']->doesUserHaveAccess(\n\t\t\tt3lib_BEfunc::getRecord('pages', $auxiliaryPid), 16\n\t\t);\n\n\t\tif (!$canWriteObjectsPage) {\n\t\t\t$this->storeErrorMessage('objects_pid', $objectsPid);\n\t\t}\n\t\tif (!$canWriteAuxiliaryPage) {\n\t\t\t$this->storeErrorMessage('auxiliary_pid', $auxiliaryPid);\n\t\t}\n\n\t\treturn $canWriteObjectsPage && $canWriteAuxiliaryPage;\n\t}",
"function isAdmin(){\n if(isset($_SESSION['admin'])){\n return true;\n }else{\n return false;\n }\n}",
"function userAdmin(){\n\tif(userConnecte() && $_SESSION['membre']['statut'] == 1){\n\t\treturn TRUE;\n\t}\n\telse{\n\t\treturn FALSE;\n\t}\n}",
"public function checkAdmin()\n {\n // there ..... need\n // END Check\n $auth = false;\n if($auth) {\n return true;\n }\n else{\n return false;\n }\n }",
"function has_admin()\n\t{\n\t\treturn false;\n\t}",
"function is_admin_logged_in()\n{\n global $current_user;\n return ($current_user != NULL && $current_user['un'] == 'admin');\n}",
"function isUserAdmin(){\n if($_SESSION['adminStatus'] == 1){\n return true;\n }else{\n return false;\n }\n}",
"function userAdmin(){\n\tif(userConnecte() && $_SESSION['membre']['statut'] == '1'){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}",
"function admin_check($redirect = \"index.php\")\n\t{\n\t\t// makes sure they are logged in:\n\t\trequire_login($redirect);\n\t\t\n\t\t// makes sure they are admin\n\t\t$sql = sprintf(\"SELECT admin FROM users WHERE uid=%d\", \n\t\t$_SESSION[\"uid\"]);\n\t\t\n\t\t// apologize if they are not.\n\t\t$admin = mysql_fetch_row(mysql_query($sql));\n\t\tif ($admin[0] == 0)\n\t\t\tapologize(\"You do not have administrator priveleges\");\n\t}",
"function is_admin_login()\r\n\t{\r\n\t\tif (!isset ($_SESSION[Seb_Adm_UsErId]))\r\n\t\t{\r\n\t\t\tprint '<script language=\"javascript\">window.location.href=\"index.php\"</script>';\r\n\t\t}\r\n\t}",
"public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }",
"function isAdmin($userId = null) {\ntry {\n\n if (!$conn = connectDB()) {\n return false;\n }\n\n // Default to current user\n if (!isset($userId)) {\n $userId = $_SESSION['userId'];\n }\n\n // Still not set? Error\n if (!isset($userId)) {\n return false;\n }\n\n $args = array($userId);\n $sql = <<<SQL\nSELECT *\nFROM WebUser\nWHERE userID=$1\n AND admin=true;\nSQL;\n\n $result = executeSQL($conn, $sql, $args);\n if (getResultCount($result) == 1) {\n closeDB($conn);\n return true;\n }\n\n closeDB($conn);\n return false;\n\n} catch (Exception $e) {\n error(\"isAdmin: {$e}\");\n closeDB($conn);\n return false;\n}\n}",
"public function isAdmin()\n {\n return ($this->username === \"admin\");\n }",
"function isAdmin() {\n return ($this->userType == 'admin');\n }",
"public function isAdmin() {\n\t\t$groupId = $this->Session->read('UserAuth.User.user_group_id');\n\t\tif($groupId==ADMIN_GROUP_ID) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function checkIsAdmin($id) {\n\t\tglobal $db;\n\t\t$db->type = 'site';\n\t\t$db->vars['id'] = $id;\n\t\t$user = $db->select(\"SELECT *\n\t\t\t\t\t\t\t\tFROM users AS u \n\t\t\t\t\t\t\t\tWHERE u.id=:id\");\n\t\t\n\t\treturn ($user[0]['level']>2) ? true : false ; \n\t}",
"function is_admin()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_admin();\n\t}",
"function is_admin()\n\t{\n\t\t$ci =& get_instance();\n\t\treturn $ci->auth_model->is_admin();\n\t}",
"function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}",
"protected function _login_admin()\n\t{\n\t\tif ( $this->auth->logged_in('login') AND $this->auth->get_user()->has_permission('admin_ui'))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"function isAdmin(){\n if($_SESSION['admin'] == 1){\n return true;\n }\n}",
"public function isAdmin()\n {\n return $this->group_id === 1;\n }",
"function admin_logged_in()\r\n{\r\n if (isset($_SESSION['admin_id']) && !empty($_SESSION['admin_id'])) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}",
"public function isUserAdmin()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'A');\n\t}",
"function get_is_admin ()\r\n {\r\n return $_SESSION[\"is_admin\"];\r\n }",
"public function accessibleByCurrentUser(){\n // return true if AYC user\n if(\\Auth::isSuperAdmin()) return true;\n\n // otherwise check if personally added to this\n $allowedPages = \\Auth::getAllowedPages();\n if(in_array($this->id, $allowedPages)) return true;\n\n // if not specifically added personally to this page\n // check the user group can access this page\n if($this->groupHasPermission(\\Auth::getUserLevel())) return true;\n\n // otherwise return false\n return false;\n\n }",
"protected function userIsAdmin ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n\n if($datosUsers->nombre==\"admin\")\n {\n return true;\n }\n else\n {\n return false;\n } \n }",
"function is_admin() {\n\tglobal $connection;\n\n\tif(isLoggedIn()) {\n\t\t$query = \"SELECT user_role FROM users WHERE user_id =\" . $_SESSION['user_id']. \"\";\n\t\t$result = mysqli_query($connection, $query);\n\t\tconfirm($result);\n\n\t\t$row = mysqli_fetch_array($result);\n\n\t\treturn $row['user_role'] === 'admin' ? true : false;\n\t}\n}",
"public function isAdmin() {}"
] | [
"0.7941143",
"0.76078725",
"0.738404",
"0.7307294",
"0.7306274",
"0.7297677",
"0.7277659",
"0.72546196",
"0.7251352",
"0.7248996",
"0.7237009",
"0.7236935",
"0.7236688",
"0.7236677",
"0.7234993",
"0.7229891",
"0.72162193",
"0.72070163",
"0.7195051",
"0.71944124",
"0.7192878",
"0.7192599",
"0.71804005",
"0.7178517",
"0.71776825",
"0.7173955",
"0.7171321",
"0.7170972",
"0.71467423",
"0.71450317",
"0.70996535",
"0.7089477",
"0.7089477",
"0.7088507",
"0.70766664",
"0.7066529",
"0.70562714",
"0.70456815",
"0.70344543",
"0.7025062",
"0.7023472",
"0.70188886",
"0.7012783",
"0.70078105",
"0.7006576",
"0.69957626",
"0.6977197",
"0.6962881",
"0.69585335",
"0.6956526",
"0.69525546",
"0.6950557",
"0.6946374",
"0.69406706",
"0.6940488",
"0.69325286",
"0.69310313",
"0.6921138",
"0.6913406",
"0.6907669",
"0.6900386",
"0.6892154",
"0.68912935",
"0.68884027",
"0.6882996",
"0.68820274",
"0.6880236",
"0.6874778",
"0.6871121",
"0.6871121",
"0.68662477",
"0.68631256",
"0.6835158",
"0.6833265",
"0.6830441",
"0.68263096",
"0.6824787",
"0.6819809",
"0.68170017",
"0.6814577",
"0.6810603",
"0.680347",
"0.68033123",
"0.68029106",
"0.6800149",
"0.6792623",
"0.67870927",
"0.67869145",
"0.67869145",
"0.67847085",
"0.67802125",
"0.67756045",
"0.67703915",
"0.6769944",
"0.6769712",
"0.67641354",
"0.6751042",
"0.67416143",
"0.674038",
"0.6740097"
] | 0.8259994 | 0 |
/ $this>__loadUser(); if(is_array($this>user))$userid = $this>user["id"]; else $userid = $this>userid; / | protected function __isAdmin()
{
$userid="1516860866";
return config::__isAdmin($userid);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __loadUser()\n {\n\t$facebook = $this->fb;\n\t$this->user = $facebook->api(\"/me\", \"GET\");\n\t$this->userid = $facebook->getUser();\n\treturn;\n }",
"abstract protected function getUserId() ;",
"function Load($userid=0, $load_permissions=true)\n\t{\n\t\t$userid = intval($userid);\n\n\t\tif ($userid <= 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$query = \"SELECT * FROM [|PREFIX|]users WHERE userid={$userid}\";\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = $this->Db->Fetch($result);\n\t\tif (empty($user)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->userid = $user['userid'];\n\t\t$this->groupid = $user['groupid'];\n\t\t$this->trialuser = IEM::ifsetor($user['trialuser'], '0');\n\t\t$this->username = $user['username'];\n\t\t$this->unique_token = isset($user['unique_token']) ? $user['unique_token'] : '';\n\t\t$this->status = ($user['status'] == 1) ? true : false;\n\t\t$this->admintype = $user['admintype'];\n\t\t$this->listadmintype = $user['listadmintype'];\n\t\t$this->templateadmintype = $user['templateadmintype'];\n\t\t$this->editownsettings = ($user['editownsettings'] == 1) ? true : false;\n\t\t$this->infotips = ($user['infotips'] == 1) ? true : false;\n\t\t$this->fullname = $user['fullname'];\n\t\t$this->emailaddress = $user['emailaddress'];\n\t\t$this->usertimezone = $user['usertimezone'];\n\t\t$this->textfooter = $user['textfooter'];\n\t\t$this->htmlfooter = $user['htmlfooter'];\n\n\t\t$this->smtpserver = $user['smtpserver'];\n\t\t$this->smtpusername = $user['smtpusername'];\n\t\t$this->smtppassword = base64_decode($user['smtppassword']);\n\t\t$this->smtpport = (int)$user['smtpport'];\n\t\tif ($this->smtpport <= 0) {\n\t\t\t$this->smtpport = 25;\n\t\t}\n\n\t\t$this->lastloggedin = (int)$user['lastloggedin'];\n\t\t$this->createdate = (int)$user['createdate'];\n\t\t$this->forgotpasscode = $user['forgotpasscode'];\n\n\n\t\tif (isset($user['usewysiwyg'])) {\n\t\t\t$wysiwyg = intval($user['usewysiwyg']);\n\t\t\tif ($wysiwyg == 0) {\n\t\t\t\t$this->usewysiwyg = 0;\n\t\t\t} else {\n\t\t\t\t$this->usewysiwyg = 1;\n\t\t\t\tif ($wysiwyg == 2) {\n\t\t\t\t\t$this->usexhtml = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($user['xmltoken']) && isset($user['xmlapi'])) {\n\t\t\tif ($user['xmlapi'] == 1) {\n\t\t\t\t$this->xmlapi = 1;\n\t\t\t}\n\n\t\t\tif ($user['xmltoken'] != null && $user['xmltoken'] != '') {\n\t\t\t\t$this->xmltoken = $user['xmltoken'];\n\t\t\t}\n\t\t}\n\n\t\t// The following options may have been added after an upgrade and may not yet exist.\n\n\t\t$this->eventactivitytype = IEM::ifsetor($user['eventactivitytype'], array());\n\t\t$this->user_language = IEM::ifsetor($user['user_language']);\n\t\t$this->enableactivitylog = IEM::ifsetor($user['enableactivitylog']);\n\t\t$this->gettingstarted = IEM::ifsetor($user['gettingstarted']);\n\t\t$this->segmentadmintype = IEM::ifsetor($user['segmentadmintype']);\n\n\t\t// Only set the google details if they are available.\n\t\tif (isset($user['googlecalendarusername'])) {\n\t\t\t$this->googlecalendarusername = $user['googlecalendarusername'];\n\t\t\t$this->googlecalendarpassword = $user['googlecalendarpassword'];\n\t\t}\n\n\t\tif (isset($user['credit_warning_percentage'])) {\n\t\t\t$this->credit_warning_percentage = $user['credit_warning_percentage'];\n\t\t\t$this->credit_warning_fixed = $user['credit_warning_fixed'];\n\t\t\t$this->credit_warning_time = $user['credit_warning_time'];\n\t\t}\n\n\n\t\t// Loading user admin notification settings\n\n\t\t$this->adminnotify_email = IEM::ifsetor($user['adminnotify_email'], '');\n\t\t$this->adminnotify_send_flag = IEM::ifsetor($user['adminnotify_send_flag'], 0);\n\t\t$this->adminnotify_send_threshold = IEM::ifsetor($user['adminnotify_send_threshold'], 0);\n\t $this->adminnotify_send_emailtext = IEM::ifsetor($user['adminnotify_send_emailtext'], '');\n\t $this->adminnotify_import_flag = IEM::ifsetor($user['adminnotify_import_flag'], 0);\n\t $this->adminnotify_import_threshold = IEM::ifsetor($user['adminnotify_import_threshold'], 0);\n\t $this->adminnotify_import_emailtext = IEM::ifsetor($user['adminnotify_import_emailtext'], '');\n\n\t\tif ($load_permissions) {\n\t\t\t$this->LoadPermissions($userid);\n\t\t}\n\n\t\tif ($user['settings'] != '') {\n\t\t\t$this->settings = unserialize($user['settings']);\n\t\t}\n\n\t\tif (is_null($this->segmentadmintype)) {\n\t\t\t$this->segmentadmintype = $this->AdminType();\n\t\t}\n\n\t\treturn true;\n\t}",
"function get_user_id(){\n return $this->user_id;\n }",
"public function loadFromId(){\r\n\t\t$id = $this -> getUserId();\r\n\t\tif(is_numeric($id))\r\n\t\t\t$this -> loadFromQuery(\"select * from UserTab where UserId=\".$id);\r\n\t }",
"protected function getUserId() {}",
"protected function getUserId() {}",
"public function loadUserDetail($id) {\n \t$_user = new class_User();\n \n \t$user = $_user->getUserDetail($id);\n \n \treturn $user;\n }",
"function loaded_user(string $id): bool { return isset($this->users[$id]); }",
"function get_userid() {\n return $this->userid;\n }",
"public function getUserById($id) {\n\t\t\n\t}",
"abstract public function fetchUserById($id);",
"protected function loadUser($id = null) {\n if ($this->_model === null) {\n if ($id !== null)\n $this->_model = Users::model()->findByPk($id);\n }\n //to check role after - PDQuang\n// if(!isset($this->_model))\n// $this->_model = new Users;\n// close 2 rows above by Nguyen Dung\n return $this->_model;\n }",
"function get_id($user_id){\n\t\t$this->id = $user_id;\n\t}",
"function get_user () {\n\t\treturn $this->user_id;\n\t}",
"function get_userdata($user_id)\n {\n }",
"function getUser($user, $id) {\n return $user->readByID($id);\n}",
"public function getId_user(){\n return $this->id_user;\n }",
"function load( $id )\r\n\t{\r\n\r\n\t\t$sql = \"SELECT * FROM user_profiles WHERE user_id = $id\";\r\n\t\t$row = $this->database->query_firstrow( $sql );\r\n\t\r\n\t\t$this->id = $row['id'];\r\n\t\t$this->user_id = $row['user_id'];\r\n\t\t$this->username = $row['username'];\r\n\t\t$this->gender = $row['gender'];\r\n\t\t$this->dob = $row['dob'];\r\n\t\t$this->country_id = $row['country_id'];\r\n\t\t$this->picture = $row['picture'];\r\n\t\t$this->link = $row['link'];\r\n\t\t$this->phone = $row['phone'];\r\n\t\t$this->likes = $row['likes'];\r\n\t\t$this->dislikes = $row['dislikes'];\r\n\t\t$this->hobbies = $row['hobbies'];\r\n\t\t$this->is_active = $row['is_active'];\r\n\t\t$this->created_on = $row['created_on'];\r\n\t\t$this->last_modified_on = $row['last_modified_on'];\r\n\t}",
"function userid() {\n return $_SESSION['user']['id'];\n}",
"function fetch_user_by_id($id) {\n if(!cache_isset('taxi_!uid_'.$id)) {\n if(cache_isset('taxi_uid_'.$id)) {\n return cache_get('taxi_uid_'.$id);\n } else {\n global $DB;\n connect_db();\n $result=$DB->users->findOne(['id'=>$id]);\n if(is_array($result)) {\n cache_set('taxi_uid_'.$id,$result);\n } else {\n cache_set('taxi_!uid_'.$id,true)\n }\n return $result;\n }\n }\n}",
"abstract protected function getUser();",
"function getUsername($user_id){\n $this->load( array( \"id=?\", $user_id ));\n return $this->query[0];\n }",
"function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }",
"public function load_current_user()\n\t{\n\t\t$userid = $this->CI->session->userdata('userid');\n\t\tif($userid)\n\t\t{\n\t\t\t$userdata = $this->CI->user_model->get_by_id($userid);\n\t\t\tif($userdata !== NULL)\n\t\t\t{\n\t\t\t\t$this->set_current_user($userdata);\n\t\t\t}\n\t\t}\n\t}",
"public function load() {\n\t\tglobal $config;\n\t\n\t\tif($this->exists()){ // User exists\n\t\t\tif(!empty($this->data['id']))\n\t\t\t\t$where = 'id = '.$this->data['id'];\n\t\t\telseif(!empty($this->data['fbid']))\n\t\t\t\t$where = 'fbid = '.$this->data['fbid'];\n\t\t\t\t\n\t\t\t$result = $config['database']->query(\"\n\t\t\t\tSELECT *\n\t\t\t\tFROM nuusers\n\t\t\t\tWHERE $where\n\t\t\t\tLIMIT 1\n\t\t\t\");\n\t\t\t$row = $result->fetch_assoc();\n\t\t\t\n\t\t\tforeach($row as $key => $val){\n\t\t\t\tif($key == 'options'){\n\t\t\t\t\t$this->data['options'] = json_decode($val, true);\n\t\t\t\t}else if(is_string($val)){\n\t\t\t\t\tif(!get_magic_quotes_gpc())\n\t\t\t\t\t\t$this->data[$key] = stripslashes($val);\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t}else{\n\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(empty($this->data['photo'])){\n\t\t\t\tglobal $config;\n\t\t\t\t\n\t\t\t\tif($this->data['faculty'])\n\t\t\t\t\t$this->data['photo'] = $config['imagesurl'].'/faculty.jpg';\n\t\t\t\telse\n\t\t\t\t\t$this->data['photo'] = $config['imagesurl'].'/anonymous.gif';\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->data['level'] = $this->loadLevel();\n\t\t\t$this->data['levelProgress'] = $this->loadLevelProgress();\n\t\t\t$this->data['rank'] = $this->loadRank();\n\t\t\t$this->data['achievements'] = $this->loadAchievements();\n\t\t\t$this->data['post_counts'] = $this->loadPostCounts();\n\t\t\t\n\t\t\treturn $result;\n\t\t}else{ // User does not exists\n\t\t\tif($this->data['fbid']){ // New user from facebook\n\t\t\t\tglobal $fbme;\n\t\t\t\t\n\t\t\t\t$y = substr($fbme['birthday'],6);\n\t\t\t\t$m = substr($fbme['birthday'],0,2);\n\t\t\t\t$d = substr($fbme['birthday'],3,2);\n\t\t\t\t$bday = $y.'-'.$m.'-'.$d;\n\t\t\t\t\n\t\t\t\t$create = $this->create(array(\n\t\t\t\t\t'first_name' => $fbme['first_name'],\n\t\t\t\t\t'last_name' => $fbme['last_name'],\n\t\t\t\t\t'email' => $fbme['email'],\n\t\t\t\t\t'birthday' => $bday,\n\t\t\t\t\t'gender' => $fbme['gender']\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\treturn $create;\n\t\t\t}else{ // Invalid user id\n\t\t\t\t$this->data['id'] = null;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function getUser() {\n return user_load($this->uid);\n }",
"public function load($userId = 0)\n{\n $userId=7;\n $username='tarun';\n $password='abcdefg';\n\t\n //Load the user factory\n $this->load->library(\"UserFactory\");\n //Create a data array so we can pass information to the view\n \n $this->userfactory->setUser($username, $password);\n \n\n\n}",
"public function LoadUser($userId)\r\n {\r\n $queryUser = \"SELECT * FROM users WHERE user_id=:user_id\";\r\n $user = $this->sqlDataBase->prepare($queryUser);\r\n $user->execute(array(':user_id'=>$userId));\r\n $userInfo = $user->fetch(PDO::FETCH_ASSOC);\r\n $this->userId = $userId;\r\n $this->userName = $userInfo['user_name'];\r\n $this->userRole = $userInfo['user_role'];\r\n $this->authKey = $userInfo['auth_key'];\r\n }",
"public function loaduser($userid = false, $newdata = false){\n if(!$userid){$userid = read(\"id\");}//$info[\"user_id\"]\n $user = first(\"SELECT * FROM users WHERE id = \" . $userid, true, \"HomeController.loaduser\");\n if($newdata) {//attempt to update user profile\n if (!isset($newdata[\"phone\"])) {$newdata[\"phone\"] = $user[\"phone\"];}\n if ($user[\"name\"] != $newdata[\"name\"] || $user[\"phone\"] != $newdata[\"phone\"]) {\n $user[\"name\"] = $newdata[\"name\"];\n $user[\"phone\"] = $newdata[\"phone\"];\n insertdb(\"users\", array(\"id\" => $userid, \"name\" => $newdata[\"name\"], \"phone\" => $newdata[\"phone\"]));\n }\n }\n return $user;\n }",
"function getUser()\n {\n if (empty($this->user_id))\n return $this->_user = null;\n if (empty($this->_user) || $this->_user->user_id != $this->user_id) {\n $this->_user = $this->getDi()->userTable->load($this->user_id);\n }\n return $this->_user;\n }",
"function getByID($id, $self) {\n\tif (!$id) errorThrower(104);\n\t// не светим баланс всяким\n\tif ($self) {\n\t\t$user = json_decode(get('user_'.$id.\"_self\", \"users\"), true);\n\t\tif (!$user) {\n\t\t\t$user = fetch(query(\"SELECT `id`, `login`, `firstname`, `middlename`, `lastname`, `email`, `phone`, `balance`, `role`, `bdate`, `registered_at` FROM users WHERE id=?\", \"i\", array($id), \"users_read\"));\n\t\t\tset(\"user_\".$id.\"_self\", json_encode($user[0], JSON_UNESCAPED_UNICODE), \"users\");\n\t\t\treturn $user[0];\n\t\t}\n\t\treturn $user;\n\t} else {\n\t\t$user = json_decode(get('user_'.$id, \"users\"), true);\n\t\tif (!$user) {\n\t\t\t$user = fetch(query(\"SELECT `id`, `login`, `firstname`, `middlename`, `lastname`, `email`, `phone`, `role`, `bdate`, `registered_at` FROM users WHERE id=?\", \"i\", array($id), \"users_read\"));\n\t\t\tset(\"user_\".$id, json_encode($user[0], JSON_UNESCAPED_UNICODE), \"users\");\n\t\t\treturn $user[0];\n\t\t}\n\t\treturn $user;\n\t}\n}",
"public function getUserId()\n {\n }",
"public function getUser($id);",
"public function getUser()\n{\nreturn $this->user;\n}",
"function loadFromId()\n {\n\t global $wgMemc;\n\t if ( $this->mId == 0 ) {\n\t\t $this->loadDefaults();\n\t\t return false;\n\t } \n\n\t # Try cache\n\t $key = wfMemcKey( 'cedar_user', 'id', $this->mId );\n\t $data = $wgMemc->get( $key );\n\t \n\t if ( !is_array( $data ) || $data['mVersion'] < MW_CEDAR_USER_VERSION ) {\n\t\t # Object is expired, load from DB\n\t\t $data = false;\n\t }\n\t \n\t if ( !$data ) {\n\t\t wfDebug( \"Cache miss for user {$this->mId}\\n\" );\n\t\t # Load from DB\n\t\t if ( !$this->loadFromDatabase() ) {\n\t\t\t # Can't load from ID, user is anonymous\n\t\t\t return false;\n\t\t }\n\n\t\t # Save to cache\n\t\t $data = array();\n\t\t foreach ( self::$mCacheVars as $name ) {\n\t\t\t $data[$name] = $this->$name;\n\t\t }\n\t\t $data['mVersion'] = MW_CEDAR_USER_VERSION;\n\t\t $wgMemc->set( $key, $data );\n\t } else {\n\t\t wfDebug( \"Got user {$this->mId} from cache\\n\" );\n\t\t # Restore from cache\n\t\t foreach ( self::$mCacheVars as $name ) {\n\t\t\t $this->$name = $data[$name];\n\t\t }\n\t }\n\t return true;\n }",
"public static function get_user_id(){\n return isset(\\Yii::$app->user->id)?\\Yii::$app->user->id:'';\n }",
"public function getUser($id = null);",
"function getUser(){\r\n\t\tif($this->_user===null){\r\n\t\t\t$this->_user=User::model()->findByPk($this->id);\r\n\t\t}\r\n\t\treturn $this->_user;\r\n \t}",
"function loadUser($userID)\n {\n\t$this->userData = $this->db->get_results(\"SELECT * FROM \".$this->usertable.\" WHERE \".$this->user_id.\" = '\".$this->escape($userID).\"' LIMIT 1\");\n if ( count($res) == 0 )\n \treturn false;\n $this->user_id = $userID;\n $_SESSION[$this->sessionVariable] = $this->userID;\n return true;\n }",
"function user_get()\n {\n $id = $this->get('id');\n if ($id == '') {\n $user = $this->db->get('auth_user')->result();\n } else {\n $this->db->where('id', $id);\n $user = $this->db->get('auth_user')->result();\n }\n $this->response($user, 200);\n }",
"public function loadFromId($id) {\n parent::loadFromId($id);\n if (array_key_exists('userid', $this->data) && $this->data['userid'] != '') {\n $this->data['last_login_datetime']=date('Y-m-d H:i:s');\n $this->update();\n }\n }",
"private function _fetch_user($id = FALSE) {\n // fetch data of user\n $this->load->model('user_model');\n $user_id = $id === FALSE ? $this->session->userdata('user')['id'] : $id;\n $where = array('id' => $user_id);\n $user = $this->user_model->fetch($where);\n return $user ? $user[0] : FALSE;\n }",
"function fetchUserAuthById($user_id){\n return fetchUserAuth('id', $user_id);\n}",
"abstract public function user();",
"function getUserById($userid)\n {\n $ar_res= array();\n\n }",
"public function loadUser()\r\n\t{\r\n\t\tif($this->_model===null)\r\n\t\t{\r\n\t\t\tif(Yii::app()->user->id)\r\n\t\t\t\t$this->_model=Yii::app()->controller->module->user();\r\n\t\t\tif($this->_model===null)\r\n\t\t\t\t$this->redirect(Yii::app()->controller->module->loginUrl);\r\n\t\t}\r\n\t\treturn $this->_model;\r\n\t}",
"public function getUserId(){\n return $this->UserId;\n }",
"public function getDetails()\n {\n if($user = $this->loadUser())\n \treturn $user;\n }",
"function initUser($user_id, $db){\n\t\t\n\t\t$sql_getAgent = \"SELECT * FROM agents WHERE id = '\".$user_id.\"'\";\n\t\t\n\t\t//$result = mysql_query($sql);\n\t\t$aResult = $db->query($sql_getAgent);\n\t\t//$user = mysql_fetch_array($result); \n\t\t$user = $aResult->fetch_array();\n\t\t\n\t\treturn $user;\n}",
"function getUserId()\n{\n return \\Auth::user()->id;\n}",
"function getUserID()\n{ \n return ($user = Auth::user())?$user->id : null;\n}",
"public function get_user_id();",
"private function getUserInstance($a_usr_id)\n\t{\t\t\n\t\tstatic $userObjectCache = array();\n\t\t\n\t\tif(isset($userObjectCache[$a_usr_id])) return $userObjectCache[$a_usr_id];\n\t\t\n\t\t$oUser = ilObjectFactory::getInstanceByObjId($a_usr_id, false);\n\t\tif(!is_object($oUser) || $oUser->getType() != 'usr')\n\t\t{\n\t\t\t$userObjectCache[$a_usr_id] = null;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$userObjectCache[$a_usr_id] = $oUser;\n\t\t}\t\t \n\t\t\n\t\treturn $userObjectCache[$a_usr_id];\n\t}",
"public function loadByUserId($uid)\n {\n $record =& $this->getTable();\n if ($record->load_by_user_id((int)$uid)) {\n $this->id = $record->id;\n $this->userId = $record->user_id;\n $this->profileId = $record->profile_id;\n $this->paymentId = $record->payment_id;\n $this->shippingId = $record->shipping_id;\n }\n }",
"public static function get_user($user_id);",
"function modeloUserGet ($userid){\n if ( isset($_SESSION['tusuarios'][$userid])){\n $db = AccesoDatos::getModelo();\n return $db->getUsuario ($userid);\n }\n return false;\n}",
"function current_user_profile($user_id = null)\n{\n if (is_null($user_id)) {\n $user_id = current_user_id();\n }\n\n// return \\base\\libs\\Redis::getUserProfile($user_id);\n}",
"public function user()\r\n {\r\n $user = (new \\Users\\Models\\Users)->load(array('_id'=>$this->user_id));\r\n \r\n return $user;\r\n }",
"function getUserById(){\n\t \n\t $sql = \"SELECT * FROM users WHERE User_id=\" . $User_id;\n\t $req = Database::getBdd()->prepare($sql);\n\t \n\t return $req->execute($sql);\n}",
"public function populate($data = array()) \n {\n// $this->id = $data['id'];\n $this->user_id = $data['user_id'];\n $this->logged_in_date_time = $data['logged_in_date_time'];\n }",
"public function me(){\n //check cookie for authentication\n $userAuthModel = new UserAuth();\n $user = $userAuthModel->checkAuth();\n \n if(!empty($user)){\n $data = array();\n\n //select user data from users table\n $userModel = new User();\n $where = array('id' => $user['user_id']);\n $result = $userModel->select($where);\n $data['user_info'] = $result[0];\n\n //select user's classes\n $studentModel = new Student();\n $where = $user['user_id'];\n $data['courses'] = $studentModel->courses($where);\n\n //add person_id\n $data['person_id'] = $data['user_info']['person_id'];\n\n $this->loadPage($this->user, \"user_profile\", $data);\n\n } else {\n $this->loadPage(false, \"login_user\");\n }\n \n }",
"public function getUserID(){\n return($this->userID);\n }",
"protected function loadUserData()\n {\n $this->userData = ($this->session->userData?:[]) + $this->userDataTemplate;\n }",
"public function getUserBean($user_id);",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"public function hasUserId(){\n return $this->_has(2);\n }",
"protected function load(){\r\n\t\r\n\t$qq1 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->tableName.\" WHERE \".$this->fieldName.\" = \".(int)$this->id);\r\n\t$this->profileData = count($qq1)>0 ? $qq1[0]: null; \r\n\t\r\n\tif($this->metaUse){\r\n\t\t$qq2 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->metaTypesTableName.\" WHERE active = 1 ORDER BY public_ord, id\");\r\n\t\t$this->metaData = count($qq2)>0 ? $qq2: array(); \r\n\t}\r\n}",
"function user()\n {\n return eZUser::fetch( $this->UserID );\n }",
"function callFromDb ($obj, $user) {\n $result = $obj->getUser($user);\n if(!empty($result)) {\n foreach ($result as $e) {\n $tmpUser = new user($e['user_id'], $e['password'], $e['name'], $e['permission']);\n }\n }\n return $tmpUser;\n}",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"public function getUserId();",
"private function _mysql_load($user)\n\t{\n\t\t$db = \\App::get('db');\n\n\t\tif (empty($user))\n\t\t{\n\t\t\t$this->setError('No user specified');\n\t\t\treturn false;\n\t\t}\n\n\t\t// zooley: Removed check for >= 0 because profiles without acounts have negative IDs\n\t\t//if (is_numeric($user) && $user >= 0)\n\t\tif (is_numeric($user))\n\t\t{\n\t\t\t$query = \"SELECT * FROM `#__xprofiles` WHERE uidNumber = \" . $db->quote(intval($user)) . \";\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"SELECT * FROM `#__xprofiles` WHERE username = \" . $db->quote($user) . \" AND uidNumber>0;\";\n\t\t}\n\n\t\t$db->setQuery($query);\n\n\t\t$result = $db->loadAssoc();\n\n\t\tif ($result === false)\n\t\t{\n\t\t\t$this->setError('Error retrieving data from xprofiles table: ' . $db->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\n\t\tif (empty($result))\n\t\t{\n\t\t\t$this->setError('No such user [' . $user . ']');\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->clear();\n\n\t\t$this->_params = new Registry($result['params']);\n\n\t\tforeach ($result as $property => $value)\n\t\t{\n\t\t\t$this->set($property, $value);\n\t\t}\n\n\t\t$classvars = get_class_vars(__CLASS__);\n\n\t\tforeach ($classvars as $property => $value)\n\t\t{\n\t\t\tif ('_auxv_' == substr($property, 0, 6) || '_auxs_' == substr($property, 0, 6))\n\t\t\t{\n\t\t\t\t$this->$property = false; // This property is loaded on demand\n\t\t\t}\n\t\t}\n\n\t\t$this->_params->merge($this->params);\n\n\t\treturn true;\n\t}",
"function getUserBasicInfo($id = null) {\n\t\tif( empty($id) || is_null($id) ){\n\t\t\treturn false;\n\t\t}\n\t\tApp::import('Model','User');\n\t\t$this->User = & new User();\n\t\t$userArr = $this->User->find('first',array('conditions'=>array(\"User .id\"=>$id),'fields' =>array( 'User.firstname','User.lastname','User.email')));\n\t\treturn $userArr;\n\t}",
"function load() {\n\t\tglobal $mysql;\n //if(!$this->exists()) return;\n \t$id \t\t= $mysql->escape($this->id);\n \t$tablename \t= $this->class_name();\n \t$this->data = $mysql->executeSql(\"SELECT * FROM \".$tablename.\" WHERE id=$id;\");\n \t$this->id\t= $this->data['id'];\n \tunset($this->data['id']);\n }",
"public function loadUser($user_id = false)\n {\n\n // Fire security to identify current user id\n if( ($user_id === false) && !($this->timber->security->getId()) ){\n $this->timber->security->isAuth();\n $this->timber->security->isAdmin();\n $this->timber->security->isStaff();\n $this->timber->security->isClient();\n }\n\n $this->user_id = ($user_id === false) ? $this->timber->security->getId() : $user_id;\n\n if( isset($this->user_notifications[$this->user_id]) ){\n return true;\n }\n\n $this->user_notifications[$this->user_id] = $this->timber->user_meta_model->getMetaByMultiple( array('me_key' => '_user_system_notifications', 'us_id' => $this->user_id) );\n if( (false === $this->user_notifications[$this->user_id]) || !(is_object($this->user_notifications[$this->user_id])) ){\n $this->user_notifications[$this->user_id] = array(\n 'us_id' => $this->user_id,\n 'me_id' => '',\n 'me_key' => '_user_system_notifications',\n 'me_value' => array(),\n );\n $this->user_notifications[$this->user_id]['me_id'] = $this->timber->user_meta_model->addMeta(array(\n 'us_id' => $this->user_id,\n 'me_key' => '_user_system_notifications',\n 'me_value' => serialize(array())\n ));\n return true;\n }\n\n $this->user_notifications[$this->user_id] = $this->user_notifications[$this->user_id]->as_array();\n $this->user_notifications[$this->user_id]['me_value'] = unserialize($this->user_notifications[$this->user_id]['me_value']);\n return true;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function getUser_id()\n {\n return $this->user_id;\n }",
"public function loadDataFromId(){\r\n\t\t\t$this -> loadFromId();\r\n\t }",
"public function getId()\n {\n return $this->user['id'];\n }",
"public function getIduser()\n {\n return $this->iduser;\n }",
"public function loadUser($anyId) {\n if(is_numeric($anyId)) { // its number - id\n if(strlen($anyId > 10))\n return $this->loadUserByGoogleId($anyId);\n else\n return $this->loadUserById($anyId);\n }\n else\n return $this->loadUserByUsername($anyId);\n }",
"public function get_user()\n {\n Session::_start();\n return (object) Session::_get(\"user\");\n\n }",
"function getUserUID()\n{\n return Auth::check()?Auth::user()->uid:null;\n}",
"function d4os_io_db_070_os_user_load($data = array()) {\n\n if (is_numeric($data)) {\n\n // get the user by uid\n $UUID = db_result(db_query(\"SELECT UUID FROM {d4os_ui_users} WHERE uid = %d\", array($data)));\n\n if (!$UUID) {\n return FALSE;\n }\n\n $query = \"SELECT * FROM {UserAccounts} AS ua\"\n . \" LEFT JOIN {auth} AS a ON a.UUID=ua.PrincipalID\"\n . \" LEFT JOIN {GridUser} AS gu ON gu.UserID=ua.PrincipalID\"\n . \" WHERE ua.PrincipalID='%s'\";\n\n d4os_io_db_070_set_active('os_robust');\n $user = db_fetch_object(db_query($query, $UUID));\n d4os_io_db_070_set_active('default');\n \n if ($user) {\n $user = _d4os_io_db_070_os_070_to_grid($user);\n d4os_io_db_070_users_add_extra_fields($user);\n return $user;\n }\n else {\n return FALSE;\n }\n }\n\n // get only inworld fields\n $user_fields = d4os_ui_users_get_grid_fields();\n\n // Dynamically compose a SQL query:\n $query = array();\n $values = array();\n\n // get the user by keys\n foreach ($data as $key => $value) {\n if (in_array($key, $user_fields)) {\n switch ($key) {\n case 'UUID':\n $query[]= \"ua.PrincipalID = '%s'\";\n $values[] = $value;\n break;\n case 'username':\n $query[]= \"ua.FirstName = '%s'\";\n $values[] = $value;\n break;\n case 'lastname':\n $query[]= \"ua.LastName = '%s'\";\n $values[] = $value;\n break;\n case 'email':\n $query[]= \"ua.Email = '%s'\";\n $values[] = $value;\n break;\n case 'created':\n $query[]= \"ua.Created = %d\";\n $values[] = $value;\n break;\n case 'godLevel':\n $query[]= \"ua.UserLevel = %d\";\n $values[] = $value;\n break;\n }\n }\n }\n $sql = \"SELECT * FROM {UserAccounts} AS ua\"\n . \" LEFT JOIN {auth} AS a ON a.UUID=ua.PrincipalID\"\n . \" LEFT JOIN {GridUser} AS gu ON gu.UserID=ua.PrincipalID\"\n . \" WHERE \". implode(' AND ', $query);\n\n d4os_io_db_070_set_active('os_robust');\n $user = db_fetch_object(db_query($sql, $values));\n d4os_io_db_070_set_active('default');\n \n if ($user) {\n $uid = db_result(db_query(\"SELECT uid FROM {d4os_ui_users} WHERE UUID = '%s'\", array($user->PrincipalID)));\n $user->uid = $uid;\n $user = _d4os_io_db_070_os_070_to_grid($user);\n d4os_io_db_070_users_add_extra_fields($user);\n return $user;\n }\n else {\n return FALSE;\n }\n}",
"function admin_get_user($id)\n{\n global $app;\n\n // parameter checking\n if (!is_numeric($id)) {\n $app->getLog()->warn('admin_get_user: invalid user id ' . $id);\n $app->halt(400, \"Bad parameter\");\n }\n\n $user = $app->bbs->user($id);\n $languages = $app->calibre->languages();\n foreach ($languages as $language) {\n $language->key = $language->lang_code;\n }\n $nl = new Language();\n $nl->lang_code = getMessageString('admin_no_selection');\n $nl->key = '';\n array_unshift($languages, $nl);\n $tags = $app->calibre->tags();\n foreach ($tags as $tag) {\n $tag->key = $tag->name;\n }\n $nt = new Tag();\n $nt->name = getMessageString('admin_no_selection');\n $nt->key = '';\n array_unshift($tags, $nt);\n $app->getLog()->debug('admin_get_user: ' . var_export($user, true));\n $app->render('admin_user.html', [\n 'page' => mkPage(getMessageString('admin_users'), 0, 3),\n 'user' => $user,\n 'languages' => $languages,\n 'tags' => $tags,\n 'isadmin' => is_admin()]);\n}",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function getUserID () {\n return $this->id;\n }",
"public function identity()\r\n {\r\n\t\t$storage = $this->get_storage();\r\n\r\n if ($storage->is_empty()) {\r\n return null;\r\n }\r\n if( is_null(self::$login_user) ){\r\n $u = $storage->read();\r\n\t\t\tself::$login_user = Model_User::instance()->user($u['uid']);\r\n \r\n global $VIEW_AUTH_USERID;\r\n $VIEW_AUTH_USERID = idtourl(self::$login_user['uid']);\r\n }\r\n return self::$login_user; \r\n }",
"public function getId_user()\n {\n return $this->id_user;\n }"
] | [
"0.70730823",
"0.7057665",
"0.6848961",
"0.6767192",
"0.6724182",
"0.6659601",
"0.6659601",
"0.65715355",
"0.6552522",
"0.6527756",
"0.6491501",
"0.64805853",
"0.6474262",
"0.64595574",
"0.6447331",
"0.6446228",
"0.64234024",
"0.6394827",
"0.6392333",
"0.6379503",
"0.63766325",
"0.636085",
"0.63416845",
"0.6338011",
"0.63191015",
"0.63130987",
"0.62887967",
"0.6276395",
"0.62761015",
"0.62598175",
"0.6250322",
"0.62318474",
"0.6228765",
"0.6222885",
"0.6163574",
"0.6154831",
"0.61452967",
"0.6139929",
"0.61381793",
"0.61380255",
"0.61214286",
"0.61144346",
"0.61140656",
"0.6112336",
"0.6106008",
"0.610112",
"0.6090614",
"0.6089167",
"0.60835105",
"0.60779405",
"0.60708654",
"0.60636276",
"0.6062698",
"0.6054836",
"0.6044853",
"0.60426104",
"0.6032156",
"0.6026388",
"0.6022918",
"0.6017912",
"0.60171443",
"0.60066265",
"0.5984678",
"0.5979507",
"0.5975375",
"0.5973198",
"0.5973198",
"0.5973198",
"0.5973198",
"0.5973198",
"0.5972665",
"0.59564",
"0.5949752",
"0.59490365",
"0.59490365",
"0.59490365",
"0.59490365",
"0.59490365",
"0.59490365",
"0.59490365",
"0.59490365",
"0.59490365",
"0.5942953",
"0.59406304",
"0.59256434",
"0.592199",
"0.59213674",
"0.5918388",
"0.5918388",
"0.5918352",
"0.59099674",
"0.59075296",
"0.5904127",
"0.59040207",
"0.590215",
"0.5897589",
"0.5895772",
"0.5890096",
"0.5889764",
"0.58891696",
"0.5882785"
] | 0.0 | -1 |
/ $this>group is in child class required $gid should be greater than or equal to $this>group | protected function __permissions($gid)
{
//echo "$gid compare :".$this->group;
if($gid < $this->group)return 0;
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSubgroup() {}",
"function getGroupParent($gid)\n {\n return null;\n }",
"public function changeGroupID($newGID){\n\n\t global $db;\n\n\t #see if user is guest, if so, exit without result.\n\t\tif($this->user == \"guest\"){\n\t\t\t$error = new notifySys($err['groupstatus'], true);\n\t\t\t$error->genericError();\n\t\t}else{\n\t\t\t$db->SQL = \"UPDATE ebb_group_users SET gid='$newGID' WHERE Username='\".$this->user.\"'\";\n\t\t\t$db->query();\n\t\t}\n\t}",
"private function validateGroup(){\n\n\t global $db;\n\t \n\t #see if this is a guest, if so, do some hard-coded checks.\n\t\tif($this->user == \"guest\"){\n\t\t if(($this->user == \"guest\") and ($this->gid == 0)){\n\t\t return(true);\n\t\t }else{\n\t\t return(false);\n\t\t }\n\t\t}else{\n\t\t\t$db->SQL = \"SELECT id FROM ebb_groups WHERE id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$validateGroup = $db->affectedRows();\n\n\t\t\tif($validateGroup == 1){\n\t\t\t return (true);\n\t\t\t}else{\n\t\t\t return(false);\n\t\t\t}\n\t\t}\n\t}",
"function is_group_at_risk( $class_id ) {\n\t$class_id = get_post_meta( $group_id, 'class', true );\n\n\treturn is_class_at_risk( $school_id );\n}",
"public function __construct() {\n\t\t$this->group = new Group();\n\t}",
"protected function group_cn($gid){ \n if ($gid===NULL){ return (false); }\n $r=false;\n \n $filter=\"(&(objectCategory=group)(samaccounttype=\". ADLDAP_SECURITY_GLOBAL_GROUP .\"))\";\n $fields=array(\"primarygrouptoken\",\"samaccountname\",\"distinguishedname\");\n $sr=ldap_search($this->_conn,$this->_base_dn,$filter,$fields);\n $entries = ldap_get_entries($this->_conn, $sr);\n \n for ($i=0; $i<$entries[\"count\"]; $i++){\n if ($entries[$i][\"primarygrouptoken\"][0]==$gid){\n $r=$entries[$i][\"distinguishedname\"][0];\n $i=$entries[\"count\"];\n }\n }\n\n return ($r);\n }",
"public function getGroupid()\n {\n return $this->groupid;\n }",
"public function setGroup($value) {\n$allowed = ['house', 'school', 'work', 'family'];\nif (!in_array($value, $allowed))\n throw new Exception('Please choose one of the valid groups');\n$this->group = $value;\nreturn $this;\n}",
"public abstract function getGroup();",
"private function supverisorGroupId(){\n return array('1');\n }",
"function db_delete_group($gid)\n{\n\tglobal $db_errno;\n\tglobal $db_errmsg;\n\n\tif ($gid == -1)\n\t{\n\t\t// Can't delete \"All\".\n\t\t$db_errno = 0;\t# XXX - Is this kosher?\n\t\t$db_errmsg = \"Can't delete group \\\"All\\\".\";\n\t\treturn FALSE;\n\t}\n\n\t$dbh = db_connect();\n\n\t/* Get info about existing feed */\n\t$old = db_get_group($gid);\n\tif ($old === NULL)\n\t\t// No such feed. I guess we can go home early.\n\t\treturn TRUE;\n\n\t// Move any members of this group to its parent.\n\t// \"IGNORE\" says to ignore records where the operation would\n\t// fail. Thus, if we have\n\t//\t\"New York Times\" in group \"News\"\n\t//\t\"New York Times\" in group \"Politics\"\n\t// \tgroup \"Politics\" in group \"News\"\n\t// we have a feed (New York Times) in both a group (Politics)\n\t// and its parent (News).\n\t//\n\t// If we now delete \"Politics\", we want to move all members of\n\t// Politics up one level. So normally we'd wind up with two\n\t// instances of \"New York Times in News\". \"IGNORE\" says to\n\t// skip those cases. We'll handle them separately, next.\n\t$query = sprintf(\"UPDATE IGNORE `group_members` SET parent=%d WHERE parent=%d\",\n\t\t\t $old['parent'],\n\t\t\t $gid);\n\t$result = $dbh->query($query);\n\tif (!$result)\n\t{\n\t\t$db_errno = $dbh->errno;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\t/* Delete any duplicates */\n\t$query = sprintf(\"DELETE FROM `group_members` WHERE parent=%d\",\n\t\t\t $gid);\n\t$result = $dbh->query($query);\n\tif (!$result)\n\t{\n\t\t$db_errno = $dbh->errno;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\n\t/* If this group has any child groups, move them up one level\n\t * as well, into the parent of $gid.\n\t */\n\t$query = sprintf(\"UPDATE `groups` SET parent=%d WHERE parent=%d\",\n\t\t\t $old['parent'],\n\t\t\t $gid);\n\t$result = $dbh->query($query);\n\tif (!$result)\n\t{\n\t\t$db_errno = $dbh->errno;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\n\t/* Delete this group from `groups` */\n\t$query = sprintf(\"DELETE FROM `groups` WHERE id=%d\",\n\t\t\t $gid);\n\t$result = $dbh->query($query);\n\tif (!$result)\n\t{\n\t\t$db_errno = $dbh->errno;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\n\treturn TRUE;\t\t// Success\n}",
"public function getGroup() {}",
"public function getGroup() {}",
"public function getGroup() {}",
"public function getGroup() {}",
"public function setGroupID($id)\n {\n if(is_int($id) === false || (integer) $id < 0) {\n throw new LedgerException(sprintf('AccountGroupID must be an integer > 0'));\n }\n \n $this->__set(self::FIELD_GROUP_ID,$id);\n }",
"function clsGrp($pName) {\n $this->name = $pName;\n if (function_exists('before_group_' . $pName)) $this->beforeEvent = true;\n if (function_exists('after_group_' . $pName)) $this->afterEvent = true;\n }",
"function __construct($groupName)\n {\n parent::__construct($groupName, NULL);\n }",
"private function getGroupID(){\n\n\t global $db;\n\t \n\t #set to 0, guest has no group setup.\n\t\tif($this->user == \"guest\"){\n\t\t $getGID = 0;\n\t\t return($getGID);\n\t\t}else{\n\t\t\t$db->SQL = \"SELECT gid FROM ebb_group_users WHERE Username='\".$this->user.\"' AND Status='Active' LIMIT 1\";\n\t\t\t$getGID = $db->fetchResults();\n\n\t\t\treturn($getGID['gid']);\n\t\t}\n\t}",
"public function testGroupSetterGetter(): void\n {\n $group = bin2hex(random_bytes(32));\n $this->component->setGroup($group);\n self::assertSame($group, $this->component->getGroup());\n }",
"function AbstractGroupPeer() {\n }",
"function getGroups() {\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }",
"public function getGroupId(){\n return $this->groupId;\n }",
"function alterGroup($groupinfo) {\n // make sure user is authorized to do this\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }",
"function &newGroup($name, $parent = GROUP_ROOT)\n {\n return PEAR::raiseError(_(\"Unsupported\"));\n }",
"function ValidateIsSubgroup ($parentgroupid, $groupid) {\n $path = REST_PATH . 'groups/' . $groupid . '.xml';\n\n // Call Rest API\n $result = CallRestApi($path);\n\n // Read the returned XML\n $xml = simplexml_load_string($result) or die(\"Error: Cannot create object\");\n \n $p = $xml->Group->ParentGroupId;\n\n if ($p == $parentgroupid) {\n \treturn 1;\n }\n \n return 0;\n}",
"function get_this_group($grp_id)\n{\n\t$db=new db_util();\n\t$query_string=\"SELECT * FROM vm_group WHERE v_group_id=$grp_id\";\n\t$result=$db->query($query_string);\n\treturn $result;\n}",
"function XMLGroupPeer() {\n global $g, $config;\n\n parent::AbstractGroupPeer();\n\n if (isset($config['system']['group'])) {\n $i = 0;\n\n foreach($config['system']['group'] as $groupent) {\n $this->group_index[$groupent['name']] = $i;\n $i++;\n }\n }\n }",
"function createGroup($groupinfo) {\n // make sure user is authorized to do this\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }",
"public function insert() {\r\n // Does the Group object already have an ID?\r\n if ( !is_null( $this->id ) ) trigger_error ( \"Group::insert(): Attempt to insert a Group object that already has its ID property set (to $this->id).\", E_USER_ERROR );\r\n\r\n // Insert the Group\r\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n $conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\r\n $sql = \"INSERT INTO \" . DB_PREFIX . \"groups ( title, dashboard, content, themes, files, settings, users, status ) VALUES ( :title, :dashboard, :content, :themes, :files, :settings, :users, :status )\";\r\n\r\n $st = $conn->prepare( $sql );\r\n $st->bindValue( \"title\", $this->title, PDO::PARAM_STR );\r\n $st->bindValue( \"dashboard\", $this->dashboard, PDO::PARAM_INT );\r\n $st->bindValue( \"content\", $this->content, PDO::PARAM_INT );\r\n $st->bindValue( \"themes\", $this->themes, PDO::PARAM_INT );\r\n $st->bindValue( \"files\", $this->files, PDO::PARAM_INT );\r\n $st->bindValue( \"settings\", $this->settings, PDO::PARAM_INT );\r\n $st->bindValue( \"users\", $this->users, PDO::PARAM_INT );\r\n $st->bindValue( \"status\", $this->status, PDO::PARAM_INT );\r\n $st->execute();\r\n \r\n $this->id = $conn->lastInsertId();\r\n \r\n $conn = null;\r\n \r\n }",
"public function getUsergroup() {}",
"public function testCreateGroupMember()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function __construct($id = null, $check_exists = false)\n\t{\n\t\tstatic::$table = strtolower(Config::get('sentry::sentry.table.groups'));\n\t\tstatic::$join_table = strtolower(Config::get('sentry::sentry.table.users_groups'));\n\t\t$db_instance = trim(Config::get('sentry::sentry.db_instance'));\n\t\t\n\t\tstatic::$group_identifier = strtolower(Config::get('sentry::sentry.identifiers.group_id'));\n\n\t\t// db_instance check\n\t\tif ( ! empty($db_instance) )\n\t\t{\n\t\t\tstatic::$db_instance = $db_instance;\n\t\t}\n\n\t\tif ($id === null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (is_numeric($id))\n\t\t{\n\t\t\tif ($id <= 0)\n\t\t\t{\n\t\t\t\tthrow new SentryGroupException(__('sentry::sentry.invalid_group_id'));\n\t\t\t}\n\t\t\t$field = 'id';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$field = 'name';\n\t\t}\n\n\t\t$group = DB::connection(static::$db_instance)\n\t\t ->table(static::$table)\n\t\t ->where($field, '=', $id)\n\t\t ->first();\n\n\t\t// if there was a result - update user\n\t\tif ($group !== null)\n\t\t{\n\t\t\tif ($check_exists)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$this->group = get_object_vars($group);\n\t\t}\n\t\t// group doesn't exist\n\t\telse\n\t\t{\n\t\t\tthrow new SentryGroupNotFoundException(__('sentry::sentry.group_not_found', array('group' => $id)));\n\t\t}\n\t}",
"function &getGroup($name)\n {\n return PEAR::raiseError(_(\"Unsupported\"));\n }",
"public function hasGroups(){\n return $this->_has(4);\n }",
"public function hasGroups(){\n return $this->_has(4);\n }",
"function group_id($group_id=null)\n {\n if (isset($group_id)) {\n $this->group_id = intval($group_id);\n }\n return $this->group_id;\n }",
"function setGroup( $group )\r\n {\r\n if ( is_a( $group, \"eZUserGroup\" ) )\r\n {\r\n $this->GroupID = $group->id();\r\n }\r\n else if ( is_numeric( $group ) )\r\n {\r\n $this->GroupID = $group;\r\n }\r\n }",
"public function __construct($username){\n\t\n\t global $lang;\n\t\n\t\t#see if user = guest.\n\t\tif($username == \"guest\"){\n\t\t\t$this->gid = 0;\n\t\t\t$this->user = \"guest\";\n\t\t}else{\n\t\t\t$this->user = $username;\n\n\t\t\t#run a check on system\n\t\t\tif($this->validateGroupStatus() == true){\n\t\t\t #get group ID.\n\t\t\t\t$this->gid = $this->getGroupID();\n\n\t\t\t\t#validate the group exists.\n\t\t\t\tif($this->validateGroup() == false){\n\t\t\t\t\t$error = new notifySys($lang['nogid'], true, true, __FILE__, __LINE__);\n\t\t\t\t\t$error->genericError();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t\t$error = new notifySys($lang['groupstatus'], true, true, __FILE__, __LINE__);\n\t\t\t\t\t$error->genericError();\n\t\t\t}\n\t\t}\n\t}",
"function group_cn($gid, $cache_only = FALSE, $local_group = FALSE){\n // http://support.microsoft.com/?kbid=321360\n // for some reason it's not possible to search on primarygrouptoken=XXX\n // if someone can show otherwise, I'd like to know about it :)\n // this way is resource intensive and generally a pain in the @#%^\n\t\t// Cache added 2014-07-21 by SysCo/al\n // Cache only added 2014-07-23 by SysCo/al\n $this->_warning_message = \"\";\n if ($gid==NULL){ return (false); }\n $r=false;\n $r_data = FALSE;\n\n\t\tif ($this->_cache_support) {\n if (\"\" != $this->get_cache_folder()) {\n if (file_exists($this->get_cache_folder().\"ldap_cgroup_\".md5($gid).\".cache\")) {\n if ((filemtime($this->get_cache_folder().\"ldap_cgroup_\".md5($gid).\".cache\") + $this->get_cache_timeout()) > time()) {\n if ($cache_handle = fopen($this->get_cache_folder().\"ldap_cgroup_\".md5($gid).\".cache\", \"rb\")) {\n $r = unserialize(fgets($cache_handle));\n $r_data = TRUE;\n fclose($cache_handle);\n touch($this->get_cache_folder().\"ldap_group_cn_$gid.cache\");\n }\n }\n }\n } elseif (isset($this->_cache_group_dn[$gid])) {\n \t\t\t$r = $this->_cache_group_dn[$gid];\n $r_data = TRUE;\n }\n }\n\t\tif (!$r_data) {\n if (!$cache_only) {\n if (2 == $this->_ldap_server_type) { // Generic LDAP\n // http://www.rainingpackets.com/ldap-posixgroup-groupofnames/\n $filter=\"(|(objectClass=posixGroup)(objectClass=groupofNames))\";\n $fields=array(\"gidnumber\",$this->_group_cn_identifier,\"distinguishedname\");\n } else { // Active Directory or legacy Active Directory\n if ($local_group) {\n $group_account_type = \"(|(samaccounttype=\".ADLDAP_SECURITY_LOCAL_GROUP.\")(samaccounttype=\". ADLDAP_SECURITY_GLOBAL_GROUP.\"))\";\n } else {\n $group_account_type = \"(samaccounttype=\".ADLDAP_SECURITY_GLOBAL_GROUP.\")\";\n }\n $filter=\"(&(objectCategory=group)\".$group_account_type.\")\";\n $fields=array(\"primarygrouptoken\",$this->_group_cn_identifier,\"distinguishedname\");\n }\n \n $pageSize = 1000;\n $page_cookie = '';\n do {\n if (function_exists('ldap_control_paged_result')) {\n ldap_control_paged_result($this->_conn, $pageSize, false, $page_cookie);\n }\n $sr = @ldap_search($this->_conn,$this->_base_dn,$filter,$fields);\n \n if ((!function_exists('ldap_control_paged_result')) && (4 == ldap_errno($this->_conn))) {\n $cr = @ldap_count_entries($this->_conn,$sr);\n $this->_warning_message = \"LDAP server cannot return more than $cr records.\";\n }\n \n $entries = $this->ldap_get_entries_raw($sr);\n \n for ($i=0; $i<$entries[\"count\"]; $i++) {\n // if (!isset($entries[$i][\"distinguishedname\"][0]))\n if (2 == $this->_ldap_server_type) { // We don't want the full distinguishedname for posixGroups, cn only\n // $entries[$i][\"distinguishedname\"][0] = ldap_get_dn($this->_conn, $entries[$i]);\n // We want to use the cn only\n $entries[$i][\"distinguishedname\"][0] = $entries[$i][$this->_group_cn_identifier][0];\n }\n if (!isset($entries[$i][\"primarygrouptoken\"][0])) {\n $entries[$i][\"primarygrouptoken\"][0] = (isset($entries[$i][\"gidnumber\"][0])?$entries[$i][\"gidnumber\"][0]:NULL);\n }\n\n if ($this->_cache_support) {\n if (NULL !== $entries[$i][\"primarygrouptoken\"][0]) {\n if (\"\" != $this->get_cache_folder()) {\n if (file_exists($this->get_cache_folder())) {\n if ($cache_handle = fopen($this->get_cache_folder().\"ldap_cgroup_\".md5($entries[$i][\"primarygrouptoken\"][0]).\".cache\", \"wb\")) {\n fwrite($cache_handle, serialize($entries[$i][\"distinguishedname\"][0]));\n fclose($cache_handle);\n @chmod($this->get_cache_folder().\"ldap_cgroup_\".md5($entries[$i][\"primarygrouptoken\"][0]).\".cache\", octdec($this->_linux_file_mode));\n }\n }\n } else {\n $this->_cache_group_dn[$entries[$i][\"primarygrouptoken\"][0]] = $entries[$i][\"distinguishedname\"][0];\n }\n }\n }\n if ($entries[$i][\"primarygrouptoken\"][0]==$gid){\n $r=$entries[$i][\"distinguishedname\"][0];\n $i=$entries[\"count\"];\n }\n }\n if (function_exists('ldap_control_paged_result_response'))\n {\n ldap_control_paged_result_response($this->_conn, $sr, $page_cookie);\n }\n }\n while($page_cookie !== null && $page_cookie != '');\n \n if (function_exists('ldap_control_paged_result'))\n {\n // Reset LDAP paged result\n ldap_control_paged_result($this->_conn, $pageSize, false);\n }\n \t\t}\n }\n return ($r);\n }",
"public function hasGroups(){\n return $this->_has(3);\n }",
"function getGroupName($gid)\n {\n return '';\n }",
"function group()\r\n {\r\n $group = false;\r\n\r\n if ( $this->GroupID > 0 )\r\n {\r\n $group = new eZUserGroup( $this->GroupID );\r\n }\r\n\r\n return $group;\r\n }",
"function getGroup()\n {\n return Factory::create('group', $this->_gid);\n }",
"function moderator()\r\n {\r\n $group = false;\r\n\r\n if ( $this->ModeratorID > 0 )\r\n {\r\n $group = new eZUserGroup( $this->ModeratorID );\r\n }\r\n\r\n return $group;\r\n }",
"public function usergroupConditionMatchesSingleGroupId() {}",
"public function usergroupConditionMatchesSingleGroupId() {}",
"function getGroupParents($gid)\n {\n return array();\n }",
"public function findGroups() {\n\t\t\n\t}",
"public function getGroup(): GroupInterface;",
"public function __construct(GroupInterface $group, SpaceInterface $space)\n {\n parent::__construct();\n $this->group = $group;\n $this->space = $space;\n }",
"public function testSetGetGroup()\n {\n $group = new Group();\n $groupGenre = (new GroupGenre())->setGroup($group);\n $this->assertEquals($group, $groupGenre->getGroup());\n }",
"function posix_getegid()\n{\n}",
"public function save()\n {\n // Do not save children, because they are fake objects\n if (false === $this->parent_target_group) {\n $pre_save_object = new self($this->target_group_id);\n\n $query = 'INSERT INTO ';\n if ($this->target_group_id > 0) {\n $query = 'UPDATE ';\n }\n $query .= rex::getTablePrefix().'d2u_courses_target_groups SET '\n .'`name` = \"'. addslashes($this->name) .'\", '\n .'picture = \"'. $this->picture .'\", '\n .'updatedate = CURRENT_TIMESTAMP ';\n if (rex_plugin::get('d2u_courses', 'kufer_sync')->isAvailable()) {\n $query .= ', kufer_categories = \"'. implode(PHP_EOL, $this->kufer_categories) .'\"'\n .', kufer_target_group_name = \"'. $this->kufer_target_group_name .'\"';\n }\n if ($this->target_group_id > 0) {\n $query .= ' WHERE target_group_id = '. $this->target_group_id;\n }\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n if (0 === $this->target_group_id) {\n $this->target_group_id = (int) $result->getLastId();\n }\n\n if ($this->priority !== $pre_save_object->priority) {\n $this->setPriority();\n }\n\n if (!$result->hasError() && $pre_save_object->name !== $this->name) {\n d2u_addon_backend_helper::generateUrlCache('target_group_id');\n d2u_addon_backend_helper::generateUrlCache('target_group_child_id');\n }\n\n return !$result->hasError();\n }\n\n return false;\n\n }",
"private function grouping_group_assigned($event) {\n global $DB;\n $groupid = $event->other['groupid'];\n $members = groups_get_members($groupid, 'userid');\n $group = groups_get_group($groupid, 'courseid');\n $courseid = $group->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n $coursemodinfo = get_fast_modinfo($courseid, -1);\n $cms = $coursemodinfo->get_cms();\n\n $insertcalls = array();\n $deletecalls = array();\n\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($members as $member) {\n $gmail = $this->get_google_authenticated_users_gmail($member->userid);\n if (has_capability('moodle/course:view', $coursecontext, $member->userid)) {\n // Manager; do nothing.\n } elseif (is_enrolled($coursecontext, $member->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $member->userid)) {\n // Teacher (enrolled) (active); do nothing.\n } elseif (is_enrolled($coursecontext, $member->userid, null, true)) {\n // Student (enrolled) (active); continue checks.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $member->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available && is_enrolled($coursecontext, $member->userid, '', true)) {\n // Course module and section are visible and available.\n // Insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } else {\n // User cannot access course module; delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($gmail);\n $permission = $this->service->permissions->get($fileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n }\n }\n // Course is not visible; do nothing.\n }\n // User is not enrolled in course; do nothing.\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }",
"public function hasGroups(){\n return $this->_has(1);\n }",
"public function isGroup()\n {\n return true;\n }",
"function is_group_ell( $group_id ) {\n\t$class_id = get_post_meta( $group_id, 'class', true );\n\n\treturn is_class_ell( $school_id );\n}",
"function update_group_members($gid) {\n global $db;\n $total_members = $this->total_members($gid);\n $db->update(tbl($this->gp_tbl), array(\"total_members\"), array($total_members), \" group_id='\" . $gid . \"'\");\n return true;\n }",
"public function insert(&$group) {\n\t\t/* As of PHP5.3.0, is_a()is no longer deprecated, so there is no reason to replace it */\n\t\tif (!is_a($group, 'icms_member_group_Object')) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$group->isDirty()) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!$group->cleanVars()) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ( $group->cleanVars as $k => $v) {\n\t\t\t${$k} = $v;\n\t\t}\n\t\tif ($group->isNew()) {\n\t\t\t$groupid = icms::$xoopsDB->genId('group_groupid_seq');\n\t\t\t$sql = sprintf(\"INSERT INTO %s (groupid, name, description, group_type)\n\t\t\t\tVALUES ('%u', %s, %s, %s)\",\n\t\t\t\ticms::$xoopsDB->prefix('groups'),\n\t\t\t\t(int) $groupid,\n\t\t\t\ticms::$xoopsDB->quoteString($name),\n\t\t\t\ticms::$xoopsDB->quoteString($description),\n\t\t\t\ticms::$xoopsDB->quoteString($group_type)\n\t\t\t);\n\t\t} else {\n\t\t\t$sql = sprintf(\n\t\t\t\t\"UPDATE %s SET name = %s, description = %s, group_type = %s WHERE groupid = '%u'\",\n\t\t\t\ticms::$xoopsDB->prefix('groups'),\n\t\t\t\ticms::$xoopsDB->quoteString($name),\n\t\t\t\ticms::$xoopsDB->quoteString($description),\n\t\t\t\ticms::$xoopsDB->quoteString($group_type),\n\t\t\t\t(int) $groupid\n\t\t\t);\n\t\t}\n\t\tif (!$result = icms::$xoopsDB->query($sql)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (empty($groupid)) {\n\t\t\t$groupid = icms::$xoopsDB->getInsertId();\n\t\t}\n\t\t$group->assignVar('groupid', $groupid);\n\t\treturn true;\n\t}",
"public function getExpectedGID()\r\n\t{\r\n\t\treturn $this->expectedGID;\r\n\t}",
"function getGroup() ;",
"public function testGroup(){\n //invalid value should not change its default value\n $this->CI->task->group = 5;//greater\n $this->assertNull($this->CI->task->group, 'test >= 5');\n \n //invalid value type should not change its default value\n $this->CI->task->group = 'text';\n $this->assertNull($this->CI->task->group, 'test non-integer');\n \n //valid value\n $this->CI->task->group = 4;\n $this->assertEquals(4, $this->CI->task->group);\n }",
"public function getGroup();",
"public function getGroup();",
"public function getGroup();",
"function validate_field_group($field_group)\n {\n }",
"function getLevel($gid)\n {\n return 0;\n }",
"function &getGroupById($cid)\n {\n return PEAR::raiseError(_(\"Unsupported\"));\n }",
"function db_get_group($gid)\n{\n\t$dbh = db_connect();\n\n\t$query = sprintf(\"SELECT * FROM `groups` WHERE id=%d\",\n\t\t\t $gid);\n\t$result = $dbh->query($query);\n\tif (!$result)\n\t{\n\t\tglobal $db_errno;\n\t\t$db_errno = $dbh->errno;\n\t\tglobal $db_errmsg;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\t$retval = $result->fetch_assoc();\n\n\t// Get the members as well.\n\t// In each group's entry, 'members' is an array listing the\n\t// IDs of members of that group. Positive IDs corresond to\n\t// feeds, and negative IDs correspond to groups.\n\t$query = sprintf(\"SELECT * FROM `group_members` WHERE parent=%d\",\n\t\t\t $gid);\n\t$result = $dbh->query($query);\n\tif (!$result)\n\t{\n\t\tglobal $db_errno;\n\t\t$db_errno = $dbh->errno;\n\t\tglobal $db_errmsg;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\n\twhile ($row = $result->fetch_assoc())\n\t{\n\t\t$retval['members'][] = $row['member'];\n\t}\n\treturn $retval;\n}",
"public function procAuthGroup($ar=NULL) {\n $p=new XParam($ar,array());\n $login=$p->get('logingroup');\n $password = $p->get('passwordgroup');\n // recherche si ce login est dans le groupe des CE : il ne peut pas passer par le login std\n $ors=selectQueryGetAll('SELECT * FROM '.self::$tableGROUPS.' WHERE logingrp=\"'.addslashes($login).'\" and passwordgrp=\"'.md5($password).'\"');\n if (count($ors) != 1){\n XShell::setNextData('messagegroup', XLabels::getSysLabel('xsession.login_not_accepted'));\n XLogs::notice(get_class(), 'Rejet user groupe ');\n return false;\n }\n setSessionVar('EPL_GROUP', $ors[0]);\n return true;\n }",
"final public function addItemGroupSupervisor() {\n if (!empty($this->target_object)) {\n foreach ($this->target_object as $val) {\n if ($val->fields['groups_id'] > 0) {\n $this->addForGroup(1, $val->fields['groups_id']);\n }\n }\n }\n }",
"function isUserInGroup($userId, $groupId) {\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }",
"function getNextGroupGid()\n\t{\n\t\tglobal $conf;\n\n\t\t$search='('.$conf->global->LDAP_KEY_GROUPS.'=*)';\n\t\t$result = $this->search($this->groups,$search);\n\t\tif($result)\n\t\t{\n\t\t\t$c = $result['count'];\n\t\t\t$gids = array();\n\t\t\tfor($i=0;$i<$c;$i++)\n\t\t\t{\n\t\t\t\t$gids[] = $result[$i]['gidnumber'][0];\n\t\t\t}\n\t\t\trsort($gids);\n\n\t\t\treturn $gids[0]+1;\n\t\t}\n\n\t\treturn 0;\n\t}",
"public function currentGroup();",
"function removeGroup($groupId) {\n // make sure user is authorized to do this\n die ('unimplemented: '.__CLASS__.'::'.__FUNCTION__.' ('.__LINE__.':'.__FILE__.')');\n }",
"function new_groups()\n {\n \n }",
"public function set_group($id_group){\n if ( is_int($id_group) ){\n $this->id_group = $id_group;\n }\n return $this;\n }",
"function leave_group($gid, $uid) {\n global $db;\n if (!$this->is_member($uid, $gid))\n e(lang(\"you_not_grp_mem\"));\n elseif ($this->is_owner($gid, $uid))\n e(lang(\"grp_owner_err2\"));\n else {\n $db->delete(tbl($this->gp_mem_tbl), array(\"userid\", \"group_id\"), array($uid, $gid));\n e(lang(\"grp_leave_succ_msg\"), \"m\");\n }\n }",
"function startGroup(&$group, $required, $error)\n {\n parent::startGroup($group, $required, $error);\n $this->_groupElementIdx = 1;\n }",
"public function testGetGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"function delete_group_members($gid) {\n global $db;\n $group = $this->get_group_details($gid);\n\n if (!$group)\n e(lang(\"grp_exist_error\"));\n elseif (userid() != $group['userid'] && !has_access('admin_access', true))\n e(lang(\"you_cant_del_grp_mems\"));\n else {\n $db->delete(tbl($this->gp_mem_tbl), array(\"group_id\"), array($gid));\n e(lang(\"mems_deleted\"), \"m\");\n }\n }",
"abstract public function getGroupName();",
"function setGroup($groupId) { \n\t\t$this->success = false;\n\t\tif (!$this->get('id')) {\n\t\t\n\t\t\t$this->throwError(\"Content not saved yet!\");\n\t\t\t$this->error_code = 500;\n\t\t\treturn;\n\t\t}\t\t\n\t\tif (!$this->POD->isAuthenticated()) { \n\t\t\t$this->throwError(\"Access denied\");\n\t\t\t$this->error_code = 401;\n\t\t\treturn;\n\t\t}\t\n\t\t\t\n\t\tif ($groupId == \"\" || !$groupId) { \n\t\t\t$group = $this->POD->getGroup(array('id'=>$this->get('groupId')));\t\n\t\t} else {\n\t\t\t$group = $this->POD->getGroup(array('id'=>$groupId));\n\t\t}\t\n\t\t\n\t\tif (!$group->success()) { \n\t\t\t$this->throwError($group->error());\n\t\t\t$this->error_code = $group->errorCode();\n\t\t\treturn;\t\t\n\t\t}\t\t\n\t\t$membership = $group->isMember($this->POD->currentUser());\n\t\tif ($group->success()) { \n\t\t\tif (!($membership == \"owner\" || $membership == \"manager\")) { \n\t\t\t\t$this->throwError(\"Access denied: Insufficient Group Privileges\");\n\t\t\t\treturn;\t\t\n\t\t\t}\n\t\t} else {\n\t\t\t$this->throwError(\"Couldn't check membership: \" . $group->error());\n\t\t\treturn;\n\t\t}\t\t\t\n\t\t$this->set('groupId',$groupId);\n\t\t\n\t\tif ($groupId == '') { \n\t\t\t$groupId = \"NULL\";\n\t\t} else {\n\t\t\t$groupId= \"'\" . mysql_real_escape_string($groupId) . \"'\";\n\t\t}\n\t\t$privacy = mysql_real_escape_string($this->get('privacy'));\n\t\t\n\t\t$sql = \"UPDATE content SET groupId=$groupId, privacy='$privacy', changeDate=NOW() where id=\" . $this->get('id');\n\t\t$this->POD->tolog($sql,2);\n\t\t$result = mysql_query($sql,$this->POD->DATABASE);\t\n\t\t$num = mysql_affected_rows($this->POD->DATABASE);\t\n\t\tif ($num < 1 || !$result) {\n\t\t\t$this->success = false;\n\t\t\t$this->throwError(\"SQL Error: Set group failed!\");\n\t\t\t$this->error_code = 500;\n\t\t\treturn null;\n\t\t} else {\n\t\t\t$this->success = true;\n\t\t\t$this->POD->cachestore($this);\n\t\t\treturn $this;\n\t\t}\n\n\t}",
"function db_update_group_info($gid, $fields)\n{\n\t$dbh = db_connect();\n\n\t/* Get info about existing feed */\n\t$old = db_get_group($gid);\n\tif ($old === NULL)\n\t\t// No such feed\n\t\treturn FALSE;\n\n\t$new = $old;\n\t$updates = array();\n\t$bind_fmt = \"\";\n\t$bind_values = array();\n\n\tforeach (array('parent', 'name') as $f)\n\t{\n\t\tif (array_key_exists($f, $fields))\n\t\t{\n\t\t\t$new[$f] = $fields[$f];\n\t\t}\n\t}\n\n\t$query = \"UPDATE `groups` SET parent=?, name=? WHERE id=?\";\n\t$stmt = $dbh->prepare($query);\n\t$result = $stmt->bind_param(\"isi\",\n\t\t$new['parent'],\n\t\t$new['name'],\n\t\t$gid);\n\tif (!$result)\n\t{\n\t\tglobal $db_errno;\n\t\t$db_errno = $dbh->errno;\n\t\tglobal $db_errmsg;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n\t$result = $stmt->execute();\n\t$stmt->close();\n\tif (!$result)\n\t{\n\t\tglobal $db_errno;\n\t\t$db_errno = $dbh->errno;\n\t\tglobal $db_errmsg;\n\t\t$db_errmsg = $dbh->error;\n\n\t\treturn NULL;\n\t}\n}",
"function user_getgroup()\n\t{\n\t\t$id = $this->user_getid();\n\t\t$perms = $this->DB->database_select('users', 'gid', array('uid' => $id), 1);\n\t\treturn ($perms === false) ? false : $perms['gid'];\n\t}",
"function delete_group($gid) {\n global $db;\n $group = $this->get_group_details($gid);\n if (!$group)\n e(lang(\"grp_exist_error\"));\n elseif (userid() != $group['userid'] && !has_access('admin_access', true))\n e(lang(\"you_cant_delete_this_grp\"));\n else {\n //Deleting Everything Related To This Group\n $this->delete_group_topics($gid);\n $this->delete_group_videos($gid);\n $this->delete_group_members($gid);\n $db->delete(tbl($this->gp_tbl), array(\"group_id\"), array($gid));\n $this->update_user_total_groups($group['userid']);\n e(lang(\"grp_deleted\"), \"m\");\n }\n }",
"abstract protected function _buildGroupBy( $group );",
"private function validateGroupStatus(){\n\t\n\t global $db;\n\t \n\t #see if this is guest, if so, do some hard-coded checks.\n\t\tif($this->user == \"guest\"){\n\t\t if(($this->user == \"guest\") and ($this->gid == 0)){\n\t\t return(true);\n\t\t }else{\n\t\t return(false);\n\t\t }\n\t\t}else{\n\t\t\t$db->SQL = \"SELECT gid FROM ebb_group_users WHERE Username='\".$this->user.\"' AND Status='Active' LIMIT 1\";\n\t\t\t$validateGroupStatus = $db->affectedRows();\n\n\t\t\tif($validateGroupStatus == 1){\n\t\t\t return (true);\n\t\t\t}else{\n\t\t\t return(false);\n\t\t\t}\n\t\t}\n\t}",
"function getGroupParentList($gid)\n {\n return array();\n }",
"public function getgroupId()\n {\n return $this->group_id;\n }",
"public function getGroupId()\n {\n return $this->group_id;\n }",
"public function getGroupId()\n {\n return $this->group_id;\n }",
"function isMemberOfThisGroup($groupId)\n{\n\t$_c_user_id = (isset($_COOKIE[$GLOBALS['c_id']]) ? $_COOKIE[$GLOBALS['c_id']] : 0);\n\n\tif ($_c_user_id != 0 && isUserLoggedIn()) {\n \n\t\t$db = new db_util();\n\n\t $sql = \"SELECT * \n\t FROM vm_member_list \n\t WHERE vm_member_id='$_c_user_id' \n\t AND vm_group_id = '$groupId'\";\n\n\t $result = $db->query($sql);\n\n\t if ($result !== false) {\n\t // if there any error in sql then it will false\n\t if ($result->num_rows > 0) {\n\t // if the sql execute successful then it give \n\t \n\t return true;\n\t }\n\t }\n }\n \n return false;\n}",
"protected function ensureGroup($group) {\n if (isset($this->groups[$group])) {\n return;\n }\n\n $this->groups[$group] = true;\n }",
"function group_create($data){\n $dval = $data['umd_val'];\n if(!isset($this->domains[$dval])) return 2;\n if(!in_array($dval,$this->quest_provider('d:group','create',TRUE,FALSE)))\n return 3;\n $tmp = $this->domains[$dval]->group_create($data);\n if($tmp>0) return $tmp;\n return $this->gdn_make($data['gname'],$dval);\n }",
"private function setGroup() {\n if (Request::has(\"include-group-read\") && Request::input(\"include-group-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-group-write\") && Request::input(\"include-group-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-group-execute\") && Request::input(\"include-group-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }",
"function isAdminOfThisGroup($groupId)\n{\n\t$_c_user_id = (isset($_COOKIE[$GLOBALS['c_id']]) ? $_COOKIE[$GLOBALS['c_id']] : 0);\n\n\tif ($_c_user_id != 0 && isUserLoggedIn($user_id)) {\n \n\t\t$db = new db_util();\n\n\t $sql = \"SELECT * \n\t FROM vm_group \n\t WHERE v_group_leader_id='$_c_user_id' \n\t AND v_group_id = '$groupId'\";\n\n\t $result = $db->query($sql);\n\n\t if ($result !== false) {\n\t // if there any error in sql then it will false\n\t if ($result->num_rows > 0) {\n\t // if the sql execute successful then it give \n\t \n\t return true;\n\t }\n\t }\n }\n \n return false;\n}",
"public function testCreateGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }"
] | [
"0.5919851",
"0.58706456",
"0.58545434",
"0.5833612",
"0.5686839",
"0.56829643",
"0.56289023",
"0.5550208",
"0.5543018",
"0.55278695",
"0.55241853",
"0.5519452",
"0.55039686",
"0.55039686",
"0.55039686",
"0.55039686",
"0.55032754",
"0.5494617",
"0.5487011",
"0.5460349",
"0.5454636",
"0.5447375",
"0.5428283",
"0.5417052",
"0.54053974",
"0.54000443",
"0.5369505",
"0.5365415",
"0.5364676",
"0.5363983",
"0.5361894",
"0.5356923",
"0.53467757",
"0.53405195",
"0.53283614",
"0.5302106",
"0.5302106",
"0.52939343",
"0.5284665",
"0.5253909",
"0.5248681",
"0.5246108",
"0.52429396",
"0.5241922",
"0.5236555",
"0.5206665",
"0.52061725",
"0.5204302",
"0.5196878",
"0.51842046",
"0.51742035",
"0.5173902",
"0.5173455",
"0.5167898",
"0.5162861",
"0.5152753",
"0.5141263",
"0.51410645",
"0.5137434",
"0.51340336",
"0.513147",
"0.51240414",
"0.5111463",
"0.5109955",
"0.5103312",
"0.5103312",
"0.5103312",
"0.50992966",
"0.50975716",
"0.5097099",
"0.5094405",
"0.5089636",
"0.50781417",
"0.5078029",
"0.50568604",
"0.50552607",
"0.505361",
"0.50504625",
"0.5046076",
"0.504392",
"0.5041264",
"0.5035965",
"0.5034547",
"0.5022677",
"0.50165665",
"0.5016243",
"0.501564",
"0.5013272",
"0.50131226",
"0.5009338",
"0.50090957",
"0.5007332",
"0.49986514",
"0.49986514",
"0.499618",
"0.49927878",
"0.49921244",
"0.49857336",
"0.49852255",
"0.4982874"
] | 0.65715706 | 0 |
printf(" arguments (%s).\n", implode(', ', $args)); | private function instruction($instruction, array $args) {
return function(...$input) use($instruction, $args) {
return call_user_func_array($instruction, array_merge($args, $input));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __toString()\n {\n return implode(' ', $this->args);\n }",
"protected function renderArguments($args) {\n $descriptions = array();\n if (is_array($args)) {\n foreach ($args as $arg) {\n $dumper = new SimpleDumper();\n $descriptions[] = $dumper->describeValue($arg);\n }\n }\n return implode(', ', $descriptions);\n }",
"function _r()\r\n{\r\n\t$args = func_get_args();\r\n\techo'<pre>';\r\n\tif (is_array($args)) {\r\n\t\tprint_r(arrayClean($args));\r\n\t} else {\r\n\t\tprint_r($args);\r\n\t}\r\n\techo'</pre>';\r\n}",
"protected function printf() {\n $args= func_get_args(); // PHP 5.2 workaround\n call_user_func_array('printf', $args ) ;\n printf(PHP_EOL);\n }",
"public function accept_multiple_params( $args ) {\n echo preg_replace( '/\\s{2,}|\\t|\\n|\\r/', '', var_export( $args, true ) );;\n }",
"function foo()\n{\n\t// returns an array of all passed arguments\n\t$args = func_get_args();\n\t \n\tforeach ($args as $k => $v)\n\t{\n\t\techo \"arg\".($k+1).\": $v\\n\";\n\t}\n}",
"private static function listArgs($_args) {\n\t\tif (!is_array($_args))\n\t\t\t$_args=array($_args);\n\t\t$_str='';\n\t\tforeach ($_args as $_key=>$_val)\n\t\t\tif ($_key!=='GLOBALS')\n\t\t\t\t$_str.=($_str?',':'').\n\t\t\t\t\t(is_array($_val) && is_int(key($_val))?\n\t\t\t\t\t\t// Numeric-indexed array\n\t\t\t\t\t\t('array('.self::listArgs($_val).')'):\n\t\t\t\t\t\t(is_object($_val)?\n\t\t\t\t\t\t\t// Convert closure/object to string\n\t\t\t\t\t\t\t(get_class($_val).'()'):\n\t\t\t\t\t\t\t// Remove whitespaces\n\t\t\t\t\t\t\tpreg_replace(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'/,\\s+(.+?=>)/','/\\s=>\\s/',\n\t\t\t\t\t\t\t\t\t'/\\s*\\(\\s+/','/,*\\s+\\)/','/\\s+/'\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tarray(',$1','=>','(',')',' '),\n\t\t\t\t\t\t\t\t\tstripslashes(var_export($_val,TRUE))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\treturn self::resolve($_str);\n\t}",
"function arg_array_to_str($arg_array){\r\n \r\n $arg_str = '';\r\n \r\n foreach($arg_array as $arg)\r\n {\r\n $arg_str .= \"$arg,\";\r\n }\r\n \r\n \r\n \r\n return substr($arg_str,0,-1); //eg 'x,y,z' -- substr() cuts off the trailing comma\r\n }",
"private function escape_args(array $args) {\n $query = \"\";\n foreach($args as $i => $arg) {\n if($i % 2) {\n $query .= $this->sqlesc($arg);\n } else {\n $query .= $arg;\n }\n }\n return $query;\n }",
"function training_menu_arguments($arg1 = NULL, $arg2 = NULL) {\n $output = '';\n if (!empty($arg1)) {\n $output .= t('Argument 1=%arg', array('%arg' => $arg1)) . '</br>';\n }\n if (!empty($arg2)) {\n $output .= t('Argument 2=%arg', array('%arg' => $arg2));\n }\n\n return $output;\n}",
"function more_args()\n\t{\n\t\tfor ($i=0; $i < func_num_args() ; $i++) { \n\t\t\techo \"第\".$i.\"个参数是\".func_get_arg($i).\"\\n\";\n\t\t}\n\t}",
"private function formatArgs(array $args): string\n {\n $result = [];\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf('object(%s)', $item[1]);\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf('array(%s)', \\is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('null' === $item[0]) {\n $formattedValue = 'null';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = strtolower(var_export($item[1], true));\n } elseif ('resource' === $item[0]) {\n $formattedValue = 'resource';\n } else {\n $formattedValue = str_replace(\"\\n\", '', $this->escapeXml(var_export($item[1], true)));\n }\n\n $result[] = \\is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $this->escapeXml($key), $formattedValue);\n }\n\n return implode(', ', $result);\n }",
"function ee() {\n\t\techo \"<pre>\";\n\t\t$args = func_get_args();\n\n\t\tforeach ( $args as $arg ) {\n\t\t\tprint_r( $arg );\n\t\t}\n\n\t\texit();\n\t}",
"private function Format($args){\n $message = array();\n if( $args ){\n foreach($args as $a){\n $argValue = '';\n if( $a['name'] ){\n $argValue += $a['name']+':';\n }\n if( is_object($a['value']) ){\n $argValue += $a['value']->toCSS();\n }else{\n $argValue += '???';\n }\n $message[] = $argValue;\n }\n }\n return implode(', ',$message);\n }",
"function dump() {\n $args = func_get_args();\n echo '<div style=\"background-color: pink; margin: 3px;\">';\n foreach($args as $arg) {\n echo \"<p><pre>\";\n var_dump($arg);\n echo \"</pre></p>\";\n }\n echo '</div>';\n return @$args[0];\n}",
"protected function formatArgs(array $args): string\n {\n $result = array();\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf('<em>object</em>(%s)', $this->formatClass($item[1]));\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf('<em>array</em>(%s)', is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('string' === $item[0]) {\n $formattedValue = sprintf(\"'%s'\", $this->escapeHtml($item[1]));\n } elseif ('null' === $item[0]) {\n $formattedValue = '<em>null</em>';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = '<em>'.strtolower(var_export($item[1], true)).'</em>';\n } elseif ('resource' === $item[0]) {\n $formattedValue = '<em>resource</em>';\n } else {\n $formattedValue = str_replace(\"\\n\", '', var_export($this->escapeHtml((string) $item[1]), true));\n }\n\n $result[] = is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $key, $formattedValue);\n }\n\n return implode(', ', $result);\n }",
"private function getArgumentString()\n {\n if (!is_null($this->getArguments()))\n {\n return $this->getArguments();\n }\n $strOut = \"\";\n if (count($this->getChildArguments())) {\n foreach ($this->getChildArguments() as $key => $argument) {\n $strOut .= ($key == 0 ? \"\": \" , \") . \"\\\"\" . $argument . \"\\\"\";\n }\n }\n return $strOut;\n }",
"function a() {\n\t\t$args = func_get_args();\n\t\treturn $args;\n\t}",
"private function formatArgs(array $args)\n {\n $result = array();\n foreach ($args as $key => $item) {\n if ('object' === $item[0]) {\n $formattedValue = sprintf(\"<em>object</em>(%s)\", $this->formatClass($item[1]));\n } elseif ('array' === $item[0]) {\n $formattedValue = sprintf(\"<em>array</em>(%s)\", is_array($item[1]) ? $this->formatArgs($item[1]) : $item[1]);\n } elseif ('string' === $item[0]) {\n $formattedValue = sprintf(\"'%s'\", self::utf8Htmlize($item[1]));\n } elseif ('null' === $item[0]) {\n $formattedValue = '<em>null</em>';\n } elseif ('boolean' === $item[0]) {\n $formattedValue = '<em>'.strtolower(var_export($item[1], true)).'</em>';\n } elseif ('resource' === $item[0]) {\n $formattedValue = '<em>resource</em>';\n } else {\n $formattedValue = str_replace(\"\\n\", '', var_export(self::utf8Htmlize((string) $item[1]), true));\n }\n\n $result[] = is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", $key, $formattedValue);\n }\n\n return implode(', ', $result);\n }",
"private function _create_args($args)\n {\n $formatted_args = array();\n\n foreach ($args as $k => $v)\n {\n $formatted_args[] = $k.'=\"'. $v .'\"';\n }\n\n return implode(' ', $formatted_args);\n }",
"public function getArgsAsString()\n {\n if (array_keys($this->arguments) === range(0, count($this->arguments) - 1)) {\n // sequential array means pass bare arguments, not option=value pairs.\n return implode(' ', $this->arguments);\n } else {\n // associative array means pass option=value pairs.\n $pairs = array();\n foreach ($this->arguments as $option => $value) {\n if ($value !== '') {\n $pairs[] = \"{$option}={$value}\";\n } else {\n $pairs[] = \"{$option}\";\n }\n }\n return implode(' ', $pairs);\n }\n }",
"function q_concat($arg)\n{\n\t$tmp = func_get_args();\n\treturn 'CONCAT('. implode(',', $tmp) .')';\n}",
"function console_text() {\n\t\t$args = func_get_args();\n\t\t$message = call_user_func_array('formatText', $args) . CRLF;\n\t\techo $message;\n\t\t//doLog($message);\n\t\tflush();\n\t}",
"function console() {\n\t\t$args = func_get_args();\n\t\t$message = '['.date('m/d,H:i:s').'] '.call_user_func_array('formatText', $args) . CRLF;\n\t\techo $message;\n\t\t//doLog($message);\n\t\tflush();\n\t}",
"function assocArgsToStr($assoc_args) {\n $return = '';\n\n foreach ($assoc_args as $key => $value) {\n if ($value === true) {\n $return .= \" --$key\";\n } else {\n $return .= \" --$key=\" . escapeshellarg($value);\n }\n }\n\n return $return;\n}",
"public function improvedEcho(array $args, $flip = false)\n {\n if ($flip) {\n $args = array_reverse($args);\n }\n return implode('', $args);\n }",
"private function getCommandLine($command_args) {\n return implode(\" \", $command_args);\n }",
"function console_text() {\n\n\t\t$args = func_get_args();\n\t\t$message = call_user_func_array('formatText', $args) . CRLF;\n\t\techo $message;\n\t\tdoLog($message);\n\t\tflush();\n\t}",
"function ddv(...$args) {\n\tdebug_raw('var_dump',true,$args);\n}",
"function console() {\n\n\t\t$args = func_get_args();\n\t\t$message = '[' . date('m/d,H:i:s') . '] ' . call_user_func_array('formatText', $args) . CRLF;\n\t\techo $message;\n\t\tdoLog($message);\n\t\tflush();\n\t}",
"function pq()\n{\n foreach (func_get_args() as $arg) {\n var_dump($arg);\n }\n}",
"protected static function concat( /*varags*/ ) {\n\t\t$args = array();\n\t\tforeach ( func_get_args() as $arg ) {\n\t\t\tif ( is_array( $arg ) ) {\n\t\t\t\t$args = array_merge( $args, $arg );\n\t\t\t} else {\n\t\t\t\t$args[] = $arg;\n\t\t\t}\n\t\t}\n\n\t\treturn implode( ' ', $args );\n\t}",
"function dump(/* plural args */)\n{\n echo '<pre style=\"background: #fff; color: #333; ' .\n 'border: 1px solid #ccc; margin: 5px; padding: 10px;\">';\n\n foreach (func_get_args() as $value) {\n var_dump($value);\n }\n\n echo '</pre>';\n}",
"public function get_args() {\n\t\tif (empty($this->args)) {\n\t\t\treturn '<p>'.__('No arguments supplied.', CCTM_TXTDOMAIN) .'</p>';\n\t\t}\n\t\t$output = '<ul class=\"summarize-posts-argument-list\">'.\"\\n\";\n\n\t\tforeach ($this->args as $k => $v) {\n\t\t\tif ( is_array($v) && !empty($v) ) {\n\t\t\t\t$output .= '<li class=\"summarize-posts-arg\"><strong>'.$k.'</strong>: Array\n\t\t\t\t('.implode(', ', $v).')</li>'.\"\\n\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ( $v === false ) {\n\t\t\t\t\t$v = 'false';\n\t\t\t\t}\n\t\t\t\telseif ( $v === true ) {\n\t\t\t\t\t$v = 'true';\n\t\t\t\t}\n\t\t\t\telseif ( empty($v) ) {\n\t\t\t\t\tcontinue; // skip empties\n//\t\t\t\t\t$v = '--';\n\t\t\t\t}\n\t\t\t\t$output .= '<li class=\"summarize-posts-arg\"><strong>'.$k.'</strong>: '.$v.'</li>'.\"\\n\";\n\t\t\t}\n\t\t}\n\t\t$output .= '</ul>'.\"\\n\";\n\t\treturn $output;\n\t}",
"#[CLI\\Command(name: 'improved:echo', aliases: ['c'])]\n #[CLI\\Argument(name: 'args', description: 'Any number of arguments separated by spaces.')]\n #[CLI\\Option(name: 'flip', description: 'Whether or not the second parameter should come first in the result.')]\n #[CLI\\Usage(name: 'bet alpha --flip', description: 'Concatenate \"alpha\" and \"bet\".')]\n public function improvedEcho(array $args, $flip = false)\n {\n if ($flip) {\n $args = array_reverse($args);\n }\n return implode(' ', $args);\n }",
"abstract public static function args();",
"function dv(...$args) {\n\tdebug_raw('var_dump',false,$args);\n}",
"public function getArgs();",
"public function getArgs();",
"protected static function makeArgStr($num_args) {\n $m_args = array();\n for ($i = 0; $i < $num_args; $i++) {\n $m_args[] = \"\\$args[$i]\";\n }\n return implode(', ', $m_args);\n }",
"function println(...$s): void\n{\n foreach ($s as $v) {\n print ($v . \"\\n\");\n }\n}",
"public function quote($arg) {\n if (is_array($arg)) {\n $Q_args = array();\n foreach ($arg as $item) {\n $Q_args[] = $this -> quote($item);\n }\n return \"(\".implode(\" , \",$Q_args).\")\";\n }\n else {\n return $this -> __call(__FUNCTION__,func_get_args());\n }\n }",
"static protected function formatArgs($args, $single = false, $format = 'html'){\r\n\t\t$result = array();\r\n\t\t$single and $args = array($args);\r\n\t\tforeach ($args as $key => $value){\r\n\t\t\tif (is_object($value)){\r\n\t\t\t\t$formattedValue = ($format == 'html' ? '<em>object</em>' : 'object').sprintf(\"('%s')\", get_class($value));\r\n\t\t\t}elseif (is_array($value)){\r\n\t\t\t\t$formattedValue = ($format == 'html' ? '<em>array</em>' : 'array').sprintf(\"(%s)\", self::formatArgs($value));\r\n\t\t\t}elseif (is_string($value)){\r\n\t\t\t\t$formattedValue = ($format == 'html' ? sprintf(\"'%s'\", self::escape($value)) : \"'$value'\");\r\n\t\t\t}elseif (null === $value){\r\n\t\t\t\t$formattedValue = ($format == 'html' ? '<em>null</em>' : 'null');\r\n\t\t\t}else{\r\n\t\t\t\t$formattedValue = $value;\r\n\t\t\t}\r\n\t\t\t$result[] = is_int($key) ? $formattedValue : sprintf(\"'%s' => %s\", self::escape($key), $formattedValue);\r\n\t\t}\r\n\t\treturn implode(', ', $result);\r\n\t}",
"function Concat()\n\t{\n\t\t$num_args = func_num_args();\n\t\tif ($num_args < 1) {\n\t\t\treturn func_get_arg(0);\n\t\t}\n\t\t$all_args = func_get_args();\n\t\t$returnstring = implode(' || ', $all_args);\n\t\treturn $returnstring;\n\t}",
"function args()\n{\n return dindex(dindex(debug_backtrace(), 1), 'args');\n}",
"public static function var_dumpp()\n {\n echo \"<pre>\";\n if(func_num_args()>0)\n foreach(func_get_args() as $argv)\n {\n var_dump($argv);\n }\n echo \"</pre>\";\n\n }",
"public function list_( $args, $assoc_args ) {\n\t\tWP_CLI::print_value( WP_CLI::get_runner()->aliases, $assoc_args );\n\t}",
"abstract protected function get_args();",
"public function args()\n {\n return [];\n }",
"private static function format_args($args) {\n foreach ($args as $key => $value) {\n if (method_exists(__CLASS__, 'format_arg_' . strtolower($key))) {\n $args[$key] = call_user_func(__CLASS__ . \"::format_arg_\" . strtolower($key), $value);\n }\n }\n return $args;\n }",
"function testeNomes($name, $middleName, $lastName) {\n \n // here we get the values of the parameters\n $nomes = func_get_args();\n \n var_dump($nomes);\n \n // and here we loop through the values and print each one\n foreach ($nomes as $nome) {\n echo $nome . PHP_EOL;\n }\n \n}",
"function h(/* as many as you want! */) {\n\n $count = func_num_args();\n\n switch($count) {\n\n case 0: return '';\n\n case 1:\n\n $arg = func_get_arg(0);\n\n if (is_array($arg)) {\n $result = array();\n _h_array($arg, $result);\n return $result;\n } else {\n return htmlspecialchars($arg, ENT_QUOTES, 'UTF-8');\n }\n\n }\n\n $result = array();\n for($i = 0; $i < $count; $i++) {\n $arg = func_get_arg($i);\n $result[] = htmlspecialchars($arg, ENT_QUOTES, 'UTF-8');\n }\n\n return implode('', $result);\n }",
"public function testCanOutputArgumentsWithValues()\n {\n $mainCommand = 'ls';\n $arguments = ['--human-readable yes', '--all ofcourse'];\n $command = $this->createInstance($mainCommand);\n foreach ($arguments as $_argument) {\n $command->addArgument($_argument);\n }\n $this->assertEquals(sprintf('%1$s %2$s', $mainCommand, implode(' ', $arguments)), (string) $command, 'Must be able to output the command and argument string correctly');\n }",
"function display($arr)\r\n {\r\n $str = implode($arr);\r\n echo $str.'<br />';\r\n\r\n }",
"function out($args = null)\n {\n static $out = \"\";\n !empty($out) or ($out = &$GLOBALS['$horus.output']);\n\n $args = func_get_args();\n\n // set [override - append]\n // get\n if ( ! empty($args) ) {\n if ( $args[sizeof($args) - 1] === true ) {\n array_pop($args);\n $out = implode('', $args);\n } else $out .= implode('', $args);\n } else return $out;\n }",
"function bank_shell_args($params){\n\t$res = \"\";\n\tif ($params AND is_array($params)){\n\t\tforeach ($params as $k => $v){\n\t\t\t$res .= \" \" . escapeshellcmd($k) . \"=\" . escapeshellcmd($v);\n\t\t}\n\t}\n\treturn $res;\n}",
"public static function p()\r\n\t{\r\n\t\t$consolePrint = false;\r\n\r\n\t\tif (!isset($_SERVER['HTTP_HOST']) || $_SERVER['HTTP_HOST'] == null) {\r\n\t\t\t$consolePrint = true;\r\n\t\t}\r\n\r\n\t\tif (!$consolePrint) {\r\n\t\t\techo '<pre>';\r\n\t\t}\r\n\t\t$args = func_get_args();\r\n\r\n\t\tforeach ($args as $var)\r\n\t\t{\r\n\t\t\tif ($var == null || $var == '') {\r\n\t\t\t\tvar_dump($var);\r\n\t\t\t} elseif (is_array($var) || is_object($var)) {\r\n\t\t\t\tprint_r($var);\r\n\t\t\t} else {\r\n\t\t\t\techo $var;\r\n\t\t\t}\r\n\t\t\tif (!$consolePrint) {\r\n\t\t\t\techo '<br>';\r\n\t\t\t} else {\r\n\t\t\t\techo \"\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!$consolePrint) {\r\n\t\t\techo '</pre>';\r\n\t\t}\r\n\t}",
"function _e_($value) {\n if (is_array($value)) {\n $value = sprintf('[%s]', implode(', ', $value));\n }\n echo \"$value\\n\";\n}",
"public function escape_args( $args )\n\t{\n\t\tif( $args != null )\n\t\t{\n\t\t\tif(is_array($args))//args is an array\n\t\t\t{\n\t\t\t\twhile( list($key, $value) = each($args))\n\t\t\t\t{\n\t\t\t\t\tif(is_string($args[$key]))\n\t\t\t\t\t\t$args[$key] = $this->db->escape_str(trim($args[$key]));\n\t\t\t\t}\n\t\t\t}else if(is_string($args))\n\t\t\t{\t\n\t\t\t\t$args = $this->db->escape_str(trim($args));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $args;\n\t}",
"public function output($args)\n {\n }",
"function qa(...$args): array\n{\n // When arguments are named.\n if (!is_list($args)) {\n return $args;\n }\n\n $ret = [];\n if ($argc = count($args)) {\n for ($i = 1; $i < $argc + 1; $i += 2) {\n $ret[$args[$i - 1]] = $args[$i];\n }\n }\n return $ret;\n}",
"function dd($arguments) {\n $arguments = func_get_args();\n if (PHP_SAPI != 'cli') {\n echo '<pre/>';\n }\n foreach ($arguments as $arg) {\n //echo json_encode($arg, JSON_PRETTY_PRINT);\n print_r($arg);\n }\n exit(1);\n}",
"public static function out() {\r\n\t\t\tdisplayCallerCode(1);\r\n\t\t\t$aData = func_get_args();\r\n\t\t\tvar_dump_list($aData);\r\n\t\t\tdie();\r\n\t\t}",
"public function dd(...$args)\n {\n foreach ($args as $x) {\n var_dump($x);\n }\n\n die(1);\n }",
"private function printArgs($node): string\n {\n return PrivatesCaller::callPrivateMethod(\n $this,\n 'pMaybeMultiline',\n $node->args,\n $node->getAttribute('trailingComma', false)\n );\n }",
"function prepare_args($args)\n {\n }",
"function training_menu_arguments_display($arg) {\n return '<div>' . $arg . '</div>';\n}",
"public function getArguments()\n {\n return sprintf(\n \"--%s %s \\\"%s\\\" %s %s %s %s\",\n $this->name,\n $this->getBoxOptionToString(),\n $this->message,\n $this->height,\n $this->width,\n $this->height - 8,\n $this->getListString()\n );\n }",
"public function testCanOutputArguments()\n {\n $mainCommand = 'ls';\n $arguments = ['--human-readable', '--all'];\n $command = $this->createInstance($mainCommand);\n foreach ($arguments as $_argument) {\n $command->addArgument($_argument);\n }\n $this->assertEquals(sprintf('%1$s %2$s', $mainCommand, implode(' ', $arguments)), (string) $command, 'Must be able to output the command and argument string correctly');\n }",
"function dump($arg){\r\n echo \"<pre>\";\r\n print_r($arg);\r\n echo \"</pre>\";\r\n}",
"public function args()\n {\n return $this->arguments->get();\n }",
"function getArguments() ;",
"public function args(){\n return $this->args;\n }",
"protected function formatArgsForExpression(array $arguments): string\n {\n $mapping = [];\n foreach ($arguments as $argument) {\n $mapping[] = sprintf('%s: \"%s\"', $argument->getName(), $argument->getType());\n }\n\n return sprintf('arguments({%s}, args)', implode(', ', $mapping));\n }",
"protected static function callstring($args) {\n $obj = array_shift($args);\n $method = array_shift($args);\n return sprintf(\"%s%s%s(%s)\",\n is_object($obj) ? get_class($obj) : $obj,\n is_object($obj) ? \"->\" : \"::\",\n $method,\n implode(\", \", array_map('static::valdebug', $args)));\n }",
"public function snakeCaseEcho(array $args, $flip_flag = false)\n {\n if ($flip_flag) {\n $args = array_reverse($args);\n }\n return implode('', $args);\n }",
"function foo() {\n\t\t$num_args = func_num_args();\n\t\techo \"Número de argumentos: $num_args<br />\\n\";\n\t\tif ($num_args >= 2) {\n\t\techo \"El segundo argumento es: \" . func_get_arg(1) . \"<br />\\n\";\n\t\t}\n\t}",
"function scaffold_dump() {\n\t$args = func_get_args();\n\tforeach ($args as $arg) {\n\t\tprintf(\"<pre>\\n%s\\n</pre>\\n\", print_r($arg, true));\n\t}\n}",
"protected function handleFunctionConcat(array $args)\n {\n $sql = 'CONCAT('.implode(', ', $args).')';\n return $sql;\n\n }",
"public function arguments(): array;",
"function printf($string)\n\t{\n\t\t$lang =& JFactory::getLanguage();\n\t\t$args = func_get_args();\n\t\tif (count($args) > 0) {\n\t\t\t$args[0] = $lang->_($args[0]);\n\t\t\treturn call_user_func_array('printf', $args);\n\t\t}\n\t\treturn '';\n\t}",
"function mdl_cmd_arguments(array $args)\n{\n return array_values(array_filter($args, function ($arg) {\n return substr($arg, 0, 1) !== '-' && substr($arg, 0, 2) !== '--';\n }));\n}",
"function test($par1, $par2){\n echo func_num_args() . '<br>'; // 3\n print_r(func_get_args()) . '<br>'; // Array ( [0] => Ceyhun [1] => Bahadır [2] => Çelik )\n echo func_get_arg(2); // Çelik\n }",
"function Seq() {\n $arr = func_get_args();\n return arrayToString(Sequence($arr));\n }",
"public function getArgs()\n {\n return $this->noramlizeArgs($this->_args);\n }",
"public static function debug() {\n $args = func_get_args();\n self::log(count($args) === 1 ? current($args) : $args);\n }",
"public function getArgs()\n {\n return $this->args;\n }",
"function a(){ \n return $arg_list = func_get_args(); \n \n }",
"protected function _print($message, $args = null)\n {\n if ($args === null) {\n echo $message;\n return;\n }\n echo call_user_func_array(\n 'sprintf',\n array_merge(\n [$message],\n is_array($args) ? $args : [$args]\n )\n );\n }",
"protected static function _formatArgs($args, $single = false, $format = 'html') {\n $result = array ();\n\n $single and $args = array($args);\n\n foreach ($args as $key => $value) {\n if (is_object($value)) {\n $formattedValue = ($format == 'html'? '<em>object</em>' : 'object') . sprintf(\"('%s')\", get_class ($value));\n } else if(is_array($value)) {\n $formattedValue = ($format == 'html'? '<em>array</em>' : 'array') . sprintf( \"(%s)\", self::_formatArgs($value));\n } else if(is_string($value)) {\n $formattedValue = ($format == 'html'? sprintf( \"'%s'\", self::_escape($value)) : \"'$value'\");\n } else if (null === $value) {\n $formattedValue = ($format == 'html'? '<em>null</em>' : 'null');\n } else {\n $formattedValue = $value;\n }\n\n $result[] = is_int($key)?\n $formattedValue : sprintf (\"'%s' => %s\", self::_escape($key), $formattedValue);\n }\n\n return implode(', ', $result );\n }",
"public function testOoCanOutputArgumentsWithValues()\n {\n $mainCommand = 'ls';\n $arguments = [new Command\\Argument('all', 'yes'), new Command\\Argument('list', 'of course')];\n $command = $this->createInstance($mainCommand);\n foreach ($arguments as $_argument) {\n $command->addArgument($_argument);\n }\n $this->assertEquals(sprintf('%1$s --all %2$s --list %3$s', $mainCommand, escapeshellarg('yes'), escapeshellarg('of course')), (string) $command, 'Must be able to output the command and argument string correctly');\n }",
"public function getArguments()\n {\n return sprintf(\n \"--%s %s \\\"%s\\\" %s %s %s\",\n $this->name,\n $this->getBoxOptionToString(),\n $this->message,\n $this->height,\n $this->width,\n $this->default\n );\n }",
"public function getArgumentNames() {}",
"function formatQAs() {\n $QAs = func_get_args();\n $outputArr = array();\n foreach( $QAs as $QA ) {\n array_push( $outputArr, formatQA($QA[0], $QA[1]) );\n }\n // put a few line breaks between each set of question/answer\n return implode( QASeparator(), $outputArr );\n}",
"function sum(...$numbers)\n {\n $tot = 0;\n echo \"Varargs sum of: \";\n\n foreach ($numbers as $n) {\n $tot += $n;\n echo \"$n \";\n }\n echo \"= \";\n return $tot;\n }",
"static public function Out(){\r\n\t\tif(func_num_args() == 1) return func_get_arg(0);\r\n\t\t\r\n\t\t$args = func_get_args();\r\n\t\t$str = array_shift($args);\r\n\t\treturn vsprintf($str, $args);\r\n\t}",
"function collapse_args($args) {\n\t\t\n\t\t$kv = array();\n\t\t\n\t\tforeach($args as $key => $value) {\n\t\t\t$kv[] = urlencode($key) . \"=\" . urlencode($value);\n\t\t}\n\t\t\n\t\treturn implode(\"&\", $kv);\n\t\t\n\t}",
"public function getArgs() : array\n {\n }",
"private function parse_args() {\n\t\t//exit;\t\t\n\t}",
"public function p() {\n $args = func_get_args();\n print htmlspecialchars(call_user_func_array(array($this, 'get'), $args));\n }",
"function p()\n {\n $bt = debug_backtrace();\n $caller = array_shift($bt);\n echo str_replace(base_path() . '/' , '', $caller['file']), ':', $caller['line'];\n array_map(function ($n, $x) {\n echo '<fieldset class=\"debug\"> <legend>' . ($n) . '</legend>';\n (new Dumper)->dump($x);\n echo '</fieldset>';\n }, range(1, func_num_args()), func_get_args());\n }"
] | [
"0.6809202",
"0.6784792",
"0.67495036",
"0.6603075",
"0.6470047",
"0.64230865",
"0.6404759",
"0.63878244",
"0.63869876",
"0.6361621",
"0.6309329",
"0.6304534",
"0.6299608",
"0.62658495",
"0.62380886",
"0.6226833",
"0.6223896",
"0.6211985",
"0.61981946",
"0.6195754",
"0.6175269",
"0.6127515",
"0.6115925",
"0.61045897",
"0.608046",
"0.60801256",
"0.60564196",
"0.60551727",
"0.6054078",
"0.6046627",
"0.60425454",
"0.6042364",
"0.60355395",
"0.60174763",
"0.60122633",
"0.59699583",
"0.5953827",
"0.5916451",
"0.5916451",
"0.59143555",
"0.5907605",
"0.58872265",
"0.5880967",
"0.5867066",
"0.5862277",
"0.58525133",
"0.5852053",
"0.5782498",
"0.57711786",
"0.57594156",
"0.5747543",
"0.5747205",
"0.57463735",
"0.5702372",
"0.56998646",
"0.5698571",
"0.568947",
"0.56809556",
"0.567072",
"0.56702733",
"0.56522685",
"0.56399846",
"0.56044436",
"0.5594126",
"0.55725616",
"0.5564384",
"0.5560429",
"0.55563396",
"0.5541725",
"0.5537236",
"0.5535934",
"0.5535728",
"0.55203134",
"0.55197346",
"0.55151474",
"0.550891",
"0.548831",
"0.5483609",
"0.5482416",
"0.5472267",
"0.54627234",
"0.54606026",
"0.54575235",
"0.54455376",
"0.54434484",
"0.54402983",
"0.5433743",
"0.5414218",
"0.5400706",
"0.5396557",
"0.5394466",
"0.53912556",
"0.53726494",
"0.536352",
"0.53524053",
"0.534198",
"0.532812",
"0.53231674",
"0.5321114",
"0.5304365",
"0.52937067"
] | 0.0 | -1 |
echo "Seek to $position."; | public function seek(int $position) {
$this->rewind();
while ($this->key() < $position) {
$this->next();
}
//echo "Position is: ", $this->key(), " instruction is: " . $this->getCurrentInstruction() . ".\n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _seek($position);",
"public function seek($position) {}",
"function getPosition() ;",
"public function seek()\r\n\t{\r\n\t}",
"function seek($pos) {\n fseek($this->handle, $pos, SEEK_CUR);\n }",
"function getPosition() {\n\t\t}",
"function seekToStart() : void;",
"public abstract function seek($offset);",
"abstract function incrementPosition();",
"public function getPosition(): string;",
"function seekTo(int $offset, int $whence = SEEK_SET) : void;",
"public function seek($offset, $whence = SEEK_SET)\n {\n }",
"public function seek($offset, $whence = SEEK_SET);",
"public function seek($position)\n {\n Mage::throwException(Mage::helper('importexport')->__('Not implemented yet'));\n }",
"public function getPosition() {}",
"public function getPosition() {}",
"function seek($position=0)\n\t{\n\t\t$result = @mysqli_data_seek($this->m_query_id, $position);\n\t\tif ($result) $this->m_row = $position;\n\t\telse $this->halt(\"seek($position) failed: result has \".$this->num_rows().\" rows\");\n\t}",
"public function seek($bookmark_name)\n {\n }",
"public function seek(int $offset): void;",
"public function getPosition();",
"public function getPosition();",
"public function getPosition();",
"public function seek($offset, $whence = stubSeekable::SET);",
"function set_position($newposition) {\n\t\t$this->position = $newposition;\n\t}",
"public function getPosition(){ }",
"public function position();",
"abstract public function Seek($index);",
"public function getPosition() {\n }",
"public function at(int $position);",
"public function seek(int $offset): void\n {\n $this->assertHandleIsOpen();\n\n Psl\\invariant($offset >= 0, '$offset must be a positive-int.');\n $this->offset = $offset;\n }",
"public function seek($index) {\n\t\t\tif ( $index<=$this->p ) {\n\t\t\t\t$this->p = $index; // just jump; don't update stream state (line, ...)\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// seek forward, consume until p hits index\n\t\t\twhile ( $this->p<$index ) {\n\t\t\t\t$this->consume();\n\t\t\t}\n\t\t}",
"public function seek($index);",
"public function seek($index);",
"function show($pos)\r\n\t{\r\n\t\techo $this->get($pos);\r\n\t}",
"public function seek($position)\n {\n $item = $this->dataStore->read($position);\n if (!isset($item) || empty($item)) {\n throw new \\InvalidArgumentException(\"Position not valid or not found.\");\n }\n $this->current = $item;\n }",
"public function SeekPosition()\r\n\t{\r\n\t\treturn $this->active_row;\r\n\t}",
"public function seek(int $offset, int $whence = SEEK_SET): void;",
"function setSeeking($newSeeking){\n $this->seeking = $newSeeking;\n }",
"public function seek($position)\n {\n if ( ! isset($this->data[$position]))\n {\n throw \\OutOfBoundsException('Out of bounds error !');\n }\n $this->position = $position;\n }",
"function seek($offset, $whence = SEEK_SET)\n {\n throw new \\RuntimeException('Stream is not seekable');\n }",
"public function get_position(){ return $this->_position;}",
"public function getCurrentPosition(): int;",
"function getPosition() { return $this->readText(); }",
"public function getPos() {}",
"public function getPos() {}",
"public function getPos() {}",
"public function getPos() {}",
"public function getPos() {}",
"function PrintCurrentLine($line) \n { \n echo \"\\nThe interpreter is currently in line \".$line.\" <br>\\n\"; \n }",
"function seek($pos = 0) \n \t{\n \t\t$status = @mysql_data_seek($this->Query_ID, $pos);\n \t\tif ($status)\n \t\t\t$this->row = $pos;\n \t\telse\n \t\t\tnew CException(sprintf(\"seek(%d) zawi�d�: wynik ma %d wiersz(y)\", $pos, $this->numRows()), __FILE__, __LINE__);\n\n \t\treturn;\n \t}",
"public function getNextPosition(): Position;",
"public function seek($position)\r\n\t{\r\n\t\t$this->i = $position;\r\n\t\treturn $this->elements[$this->i];\r\n\t}",
"public function show(Position $position)\n {\n\n }",
"public function advance();",
"public function seek($position): void {\n // by the block size and then store its location\n if (fseek($this->fileHandle, $position * $this->blockSize) === 0) {\n $this->position = $position;\n } else {\n // Otherwise mark the position invalid and throw an exception\n $this->isValid = false;\n throw new OutOfBoundsException(\"Position {$position} is out of bound\");\n }\n }",
"public function seek(int $offset, int $whence = \\SEEK_SET): bool;",
"function lightseek_move_yoast() {\n return 'low';\n}",
"function getOffset() ;",
"public function stream_seek($offset, $whence)\n { return true;\n }",
"function getPosition() { return $this->readText(); }",
"public function seekFromStart(int $offset): void;",
"public function getPos();",
"public function getPos();",
"public function seek($position)\n {\n fseek($this->resource, $position, SEEK_SET);\n if (!$this->valid()) {\n throw new \\OutOfRangeException('Seek out of file content. ');\n }\n }",
"function stream_tell() {\r\n\t\treturn $this->position;\r\n\t}",
"public function seek ( $position ) {\n\n if(!array_key_exists($position, $this->_collection))\n return;\n\n $this->rewind();\n\n while($position != $this->key())\n $this->next();\n\n return;\n }",
"function getPosition() {\n return sprintf(\"%010d\", $this->_position);\n }",
"function setPosition($value) {\n $this->_position = intval($value);\n }",
"public function incrementPosition()\n {\n ++$this->positionA;\n }",
"public function seek($offset, $whence = SEEK_SET)\n {\n return false;\n }",
"public function get_position()\n {\n\n if ( $file = fopen($this->path,\"r\") ) {\n\n $string_number = 0;\n $position = 0;\n while(($line = fgets($file,4096)) !== false && !$position) {\n\n $string_number++;\n if(strpos($line,$this->str) !== false) {\n\n $position = strpos($line,$this->str);\n }\n }\n echo 'номер строки: ' . $string_number . ', позиция: ' . ($position+1);\n\n } else {\n\n echo 'ничего не вышло';\n\n }\n\n }",
"public function getStartPosition()\n\t{\n\t\treturn -1;\n\t}",
"public function setPosition() {\n }",
"protected function _getNewPosition($position = 0)\n {\n if (intval($position) > 0) {\n while (isset($this->_links[$position])) {\n $position++;\n }\n } else {\n $position = 0;\n foreach ($this->_links as $k=>$v) {\n $position = $k;\n }\n $position += 10;\n }\n return $position;\n }",
"function seek($query, $row)\n\t{\n\t\tif(!is_object($query))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->seek_array[$query->guid] = array('offset' => PDO::FETCH_ORI_ABS, 'row' => $row);\n\t}",
"function seek($pos = 0) {\t\t\r\n\t\treturn $this->dbh->seek($pos);\t\t\t\t\r\n\t}",
"public function stream_tell() {}",
"function pos(){\n return ftell($this->handle);\n }",
"public function setNextPosition(Position $position): void;",
"public function setPosition($newposition) {\n\t\t$this->position = $newposition;\n\t}",
"public function seek($pos)\n\t{\n\t\t// verify that a query was run\n\t\tif (is_resource($this->_results) === false)\n\t\t{\n\t\t\tthrow new DatabaseException('',\n\t\t\t\tDatabaseException::QUERY_NOT_RUN);\n\t\t}\n\n\t\t// check connection\n\t\t$this->_checkConnection();\n\n\t\t// lookup the row and move to the record\n\t\tif (mysql_data_seek($this->_results, $pos) === false)\n\t\t{\n\t\t\tthrow new DatabaseException('Record not found',\n\t\t\t\tDatabaseException::RECORD_UNKNOWN);\n\t\t}\n\n\t\t// set postion\n\t\t$this->_row = $pos;\n\t}",
"public function tell();",
"public function tell();",
"public function seek($offset, $origin=self::ORIGIN_CURRENT) {\r\n\t\tstatic $originMapping=array(\r\n\t\t\tself::ORIGIN_BEGIN\t\t=> SEEK_SET,\r\n\t\t\tself::ORIGIN_CURRENT\t=> SEEK_CUR,\r\n\t\t\tself::ORIGIN_END\t\t=> SEEK_END\r\n\t\t);\r\n\t\t\r\n\t\tif(!isset($originMapping[$origin])) {\r\n\t\t\tthrow new Curly_Stream_Exception('Invalid origin value given');\r\n\t\t}\r\n\t\t\r\n\t\tif(fseek($this->_handle, $offset, $originMapping[$origin])!==0) {\r\n\t\t\tthrow new Curly_Stream_Exception('Failed to seek to the specified position');\r\n\t\t}\r\n\t}",
"function incrementFile() {\n \treturn $this->adjustPosition(1);\n }",
"public function show(Position $position)\n {\n //\n }",
"public function show(Position $position)\n {\n //\n }",
"public function show(Position $position)\n {\n //\n }",
"function dataSeek( $res, $row );",
"public function seek($offset, $whence = SEEK_SET)\n {\n if (!$this->seekable) {\n throw new RuntimeException('Could not seek this stream');\n }\n $res = fseek($this->stream, $offset, $whence);\n if ($res == -1) {\n throw new RuntimeException('Could not seek desired position');\n }\n }",
"public function setPosition($position);",
"public function getPosition()\n {\n return -1;\n }",
"public function savePosition() {}",
"function myfunction(){\n\techo(\"/tell $Username,\");\n}",
"function setPosition($s)\n\t{\n\t\t$this->Info['Position'] = $s;\n\t\tupdateTableByUser('Developer', 'Position', $s, $this->Username);\n\t}",
"public function getPosition() : int\n {\n $rtn = $this->data['position'];\n\n return $rtn;\n }",
"private function moveStringCursor($positionOffset, $byteStreamOffset)\n {\n }",
"function pawn($original_position, $new_position){\n\t\t//if($vector == 1 move ahead\n\t\t//X movement\n\t\t//Y movement\n\t\t//E2 to E4\n\t\t//E minus the E\n\t\t//4 minus 2\n\t\n\t}",
"public function tell()\n {\n }",
"public function seek($offset, $whence = SEEK_SET): void\n {\n if ($whence !== SEEK_SET || $offset < 0) {\n throw new \\RuntimeException(sprintf(\n 'Cannot seek to offset %s with whence %s',\n $offset,\n $whence\n ));\n }\n\n $offset += $this->offset;\n\n if ($this->limit !== -1) {\n if ($offset > $this->offset + $this->limit) {\n $offset = $this->offset + $this->limit;\n }\n }\n\n $this->stream->seek($offset);\n }"
] | [
"0.69970727",
"0.6882976",
"0.6651468",
"0.662084",
"0.6429879",
"0.6394026",
"0.6388049",
"0.63646036",
"0.62114614",
"0.61533815",
"0.6145796",
"0.612059",
"0.611997",
"0.60722834",
"0.60386914",
"0.60386914",
"0.5980192",
"0.5964229",
"0.59578747",
"0.5956098",
"0.5956098",
"0.5956098",
"0.59541196",
"0.59294325",
"0.5912229",
"0.5911095",
"0.58992434",
"0.5846675",
"0.58374894",
"0.58324903",
"0.57787734",
"0.5706576",
"0.5706576",
"0.5690832",
"0.5687185",
"0.56046534",
"0.5601581",
"0.558157",
"0.5579211",
"0.55613846",
"0.55565697",
"0.5551823",
"0.55379",
"0.55307597",
"0.55307597",
"0.55307597",
"0.55307597",
"0.55307597",
"0.5526899",
"0.55170083",
"0.5498386",
"0.54821837",
"0.547501",
"0.54689234",
"0.5459147",
"0.54471624",
"0.5445605",
"0.5443304",
"0.5433453",
"0.5428587",
"0.5421386",
"0.5416226",
"0.5416226",
"0.54152715",
"0.5404794",
"0.5397176",
"0.5394369",
"0.53759557",
"0.53729796",
"0.5316775",
"0.5312782",
"0.5310998",
"0.5296903",
"0.52865875",
"0.5285785",
"0.528517",
"0.5276302",
"0.52719575",
"0.5257439",
"0.52541006",
"0.52393717",
"0.52284145",
"0.52284145",
"0.52225494",
"0.52141976",
"0.52085",
"0.52085",
"0.52085",
"0.5205033",
"0.5196523",
"0.51908004",
"0.5176942",
"0.5171211",
"0.5162513",
"0.51591575",
"0.51481533",
"0.5147992",
"0.51467294",
"0.51461625",
"0.51438904"
] | 0.7033265 | 0 |
/ end tags Delete products form default wish list. | public function test(Customer $customer, $products, array $removedProductsIndex)
{
// Preconditions
$customer->persist();
$this->loginCustomer($customer);
$products = $this->createProducts($products);
$this->addToWishlist($products);
// Steps
$this->cmsIndex->getLinksBlock()->openLink("My Wish List");
$removeProducts = $this->removeProducts($products, $removedProductsIndex);
return ['products' => $removeProducts, 'customer' => $customer];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function product_delete()\n\t\t\t\t{\n\t\t\t\t}",
"public function removeAction() {\r\n\r\n //SET LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET WISHLIST AND PAGE ID \r\n $this->view->wishlist_id = $wishlist_id = $this->_getParam('wishlist_id');\r\n $product_id = $this->_getParam('product_id');\r\n\r\n if ($this->getRequest()->isPost()) {\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n try {\r\n\r\n //DELETE FROM DATABASE\r\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitestoreproduct')->delete(array('wishlist_id = ?' => $wishlist_id, 'product_id = ?' => $product_id));\r\n\r\n //DELETE ACTIVITY FEED\r\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $actionTableName = $actionTable->info('name');\r\n\r\n $action_id = $actionTable->select()\r\n ->setIntegrityCheck(false)\r\n ->from($actionTableName, 'action_id')\r\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\r\n ->where('engine4_activity_attachments.id = ?', $product_id)\r\n ->where($actionTableName . '.type = ?', \"sitestoreproduct_wishlist_add_listing\")\r\n ->where($actionTableName . '.subject_type = ?', 'user')\r\n ->where($actionTableName . '.object_type = ?', 'sitestoreproduct_wishlist')\r\n ->where($actionTableName . '.object_id = ?', $wishlist_id)\r\n ->query()\r\n ->fetchColumn();\r\n\r\n if (!empty($action_id)) {\r\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\r\n if (!empty($activity)) {\r\n $activity->delete();\r\n }\r\n }\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => 10,\r\n 'parentRefresh' => 10,\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('This product has been removed successfully from this wishlist!'))\r\n ));\r\n }\r\n $this->renderScript('wishlist/remove.tpl');\r\n }",
"public function actionRemoveProductFromWishlist()\n {\n // set wishlistId variable from params\n $wishlistId = craft()->request->getRequiredParam('wishlistId');\n $productId = craft()->request->getRequiredParam('productId');\n $redirectUrl = craft()->request->getRequiredParam('redirect');\n\n // Create a new wishlist with above title\n craft()->wishlist->removeProductFromWishlist($wishlistId, $productId);\n\n // Set Flash message\n craft()->userSession->setFlash('removeProductFromWishlistSuccess', 'Product has been removed from wishlist!');\n\n // Redirect to plugin index page\n $this->redirect($redirectUrl);\n }",
"public function deleteAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //ONLY LOGGED IN USER CAN CREATE\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //GET WISHLIST ID\r\n $this->view->wishlist_id = $wishlist_id = $this->_getParam('wishlist_id');\r\n\r\n $wishlist = Engine_Api::_()->getItem('sitestoreproduct_wishlist', $wishlist_id);\r\n\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewer_id = $viewer->getIdentity();\r\n $level_id = $viewer->level_id;\r\n\r\n if ($level_id != 1 && $wishlist->owner_id != $viewer_id) {\r\n return $this->_forward('requireauth', 'error', 'core');\r\n }\r\n\r\n if ($this->getRequest()->isPost()) {\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n try {\r\n\r\n //DELETE WISHLIST CONTENT\r\n $wishlist->delete();\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRedirect' => $this->_helper->url->url(array('action' => 'browse'), \"sitestoreproduct_wishlist_general\", true),\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your wishlist has been deleted successfully.'))\r\n ));\r\n } else {\r\n $this->renderScript('wishlist/delete.tpl');\r\n }\r\n }",
"public function DeleteWishList()\n\t{\n\t\tif ($this->checkLogin('U') == '') {\n\t\t\tredirect(base_url());\n\t\t} else {\n\t\t\t$product_id = $this->input->post('pid');\n\t\t\t$id = $this->input->post('wid');\n\t\t\t$condition = array('id' => $id);\n\t\t\t$this->data['WishListCat'] = $this->product_model->get_all_details(LISTS_DETAILS, $condition);\n\t\t\tif ($this->data['WishListCat']->row()->product_id != '') {\n\t\t\t\t$WishListCatArr = @explode(',', $this->data['WishListCat']->row()->product_id);\n\t\t\t\t$my_array = array_filter($WishListCatArr);\n\t\t\t\t$to_remove = (array)$product_id;\n\t\t\t\t$result = array_diff($my_array, $to_remove);\n\t\t\t\t$resultStr = implode(',', $result);\n\t\t\t\tif ($resultStr != '') {\n\t\t\t\t\t$this->product_model->updateWishlistRentals(array('product_id' => $resultStr), $condition);\n\t\t\t\t\t$res['result'] = '0';\n\t\t\t\t} else {\n\t\t\t\t\t$this->product_model->updateWishlistRentals(array('product_id' => $resultStr), $condition);\n\t\t\t\t\t$res['result'] = '1';\n\t\t\t\t}\n\t\t\t\t//print_r($result);die;\n\t\t\t}\n\t\t\t//$this->setErrorMessage('success','Wish list deleted successfully');\n\t\t\t/*echo '<script>window.history.go(-1);</script>';*/\n\t\t}\n\t\techo json_encode($res);\n\t}",
"public function delete()\n {\n // get request\n $request = $this->getRequest()->request;\n // get product ID from request\n $product_id = $request['a'];\n // get product ids from session\n $compareProducts = $this->View()->getSession('compare', $compareProducts)?$this->View()->getSession('compare', $compareProducts):array();\n\n if (in_array($product_id, $compareProducts)) {\n // unseting product from compare session\n $key = array_search($product_id, $compareProducts);\n unset($compareProducts[$key]);\n }\n\n $this->View()->setSession('compare', $compareProducts);\n\n if ($request['XHR']) {\n die(json_encode([\n 'success' => true,\n 'message' => $this->View()->translating('compare_item_deleted'),\n 'count' => count($compareProducts),\n ]));\n }\n\n Router::redirect('compare');\n }",
"public function deletewishlist($productId){\n\t\t$this->db->where('UserID', $this->session->userdata('userid'));\n\t\t$this->db->where('Product_Id', $productId);\n\t\t$this->db->delete('tbl_wishlist');\n\t}",
"public function delete_product() {\n\t\t$values=array(\"rstatus\"=>\"C\");\n\t\t$rowIndex = $_POST['row_index'];\n\t\t$where =array(\"id\"=>$_POST['product_id']);\n\t\tif($this->update(\"products\",$values,$where)) {\t\t\t\n\t\t\techo '{\"masterItemsList\":{\"updateFlag\":\"void\",\"rowIndex\":'.$rowIndex.'}}';\n\t\t}\n\t\telse\n\t\t\techo 'Error while deleting';\n\t}",
"public function delete_product(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$product_id = $this->uri->segment(4,0);\r\n\t\t\t$condition = array('id' => $product_id);\r\n\t\t\t$old_product_details = $this->product_model->get_all_details(PRODUCT,array('id'=>$product_id));\r\n\t\t\t$this->update_old_list_values($product_id,array(),$old_product_details);\r\n\t\t\t$this->update_user_product_count($old_product_details);\r\n\t\t\t$this->product_model->commonDelete(PRODUCT,$condition);\r\n\t\t\t$this->setErrorMessage('success','Product deleted successfully');\r\n\t\t\tredirect('admin/product/display_product_list');\r\n\t\t}\r\n\t}",
"public function delete_selected()\n\t{\n\t\t$where = $this->input->post('ids');\n\t\t$count = count($where);\n\t\t$vendor_id = $this->session->userdata('vendor_id');\n\n\t\tforeach ($where as $product_id)\n\t\t{\n\t\t\t$thumb_image = get_product($product_id, 'thumb_image'); //get thumb_image\n\t\t\t$images = unserialize(get_product($product_id, 'images'));\n\n\t\t\t//thumb image//\n\t\t\t$copy_thumb = str_replace('products', 'products/deleted', $thumb_image); //replace path\n\t\t\tcopy($thumb_image, $copy_thumb); //copy image\n\t\t\tunlink($thumb_image);\n\n\t\t\tforeach ($images as $image) //multiple images//\n\t\t\t{\n\t\t\t\t$copy_image = str_replace('products', 'products/deleted', $image); //replace path\n\t\t\t\tcopy($image, $copy_image); //copy image\n\t\t\t\tunlink($image);\n\t\t\t}\n\t\t}\n\n\t\t$deleted = $this->products->delete_many($where);\n\t\t$update = $this->vendors->update_total_product($vendor_id, 'total_products - '.$count);\n\n\t\tif ($deleted && $update)\n\t\t{\n\t\t\t$ids = implode(',', $where);\n\t\t\techo 'true';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'false';\n\t\t}\n\t}",
"function removeProductFromWishlist(Request $request) {\n\n $customerId = $request->request->get('customerId');\n $productIdToDelete = $request->request->get('productId');\n $wishlist = $this->getMetafieldCustomer($customerId,'wishlist-products');\n $wishlistDecoded = json_decode($wishlist, true);\n $productIds = '';\n if(count($wishlistDecoded['metafields']) !== 0) {\n if($wishlistDecoded['metafields'][0]['value'] !== \"\") {\n if(strpos($wishlistDecoded['metafields'][0]['value'], ',') !== false) {\n $productIdTab = explode(',' , $wishlistDecoded['metafields'][0]['value']);\n foreach ($productIdTab as $value) {\n if((string) $productIdToDelete !== (string) $value) {\n if($productIds == '') {\n $productIds .= $value;\n } else {\n $productIds .= ',' . $value;\n }\n }\n }\n }\n\n if($productIds === '') {\n $productIds = \"null\";\n }\n\n $data = [\n \"metafield\" => [\n \"id\" => $wishlistDecoded['metafields'][0]['id'],\n \"value\" => '' . $productIds . '',\n \"value_type\" => 'string',\n ]\n ];\n\n try {\n $client = HttpClient::create();\n $response = $client->request('PUT', shopifyApiurl . 'metafields/'.$wishlistDecoded['metafields'][0]['id'].'.json', ['json' => $data]);\n } catch (\\Exception $e) {\n var_dump($e);\n }\n }\n }\n\n return new Response('wishlist saved');\n }",
"public function testDelete() {\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $first_variation = ProductVariation::create([\n 'type' => 'default',\n 'sku' => $this->randomMachineName(),\n 'title' => $this->randomString(),\n 'status' => 1,\n ]);\n $first_variation->save();\n\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $second_variation = ProductVariation::create([\n 'type' => 'default',\n 'sku' => $this->randomMachineName(),\n 'title' => $this->randomString(),\n 'status' => 1,\n ]);\n $second_variation->save();\n\n /** @var \\Drupal\\commerce_wishlist\\Entity\\WishlistItemInterface $wishlist_item */\n $first_wishlist_item = WishlistItem::create([\n 'type' => 'commerce_product_variation',\n 'purchasable_entity' => $first_variation,\n ]);\n $first_wishlist_item->save();\n\n /** @var \\Drupal\\commerce_wishlist\\Entity\\WishlistItemInterface $wishlist_item */\n $second_wishlist_item = WishlistItem::create([\n 'type' => 'commerce_product_variation',\n 'purchasable_entity' => $second_variation,\n ]);\n $second_wishlist_item->save();\n\n $wishlist = Wishlist::create([\n 'type' => 'default',\n 'name' => 'My wishlist',\n 'wishlist_items' => [$first_wishlist_item, $second_wishlist_item],\n ]);\n $wishlist->save();\n\n $first_variation->delete();\n $this->container->get('cron')->run();\n\n // Confirm that the first wishlist item has been deleted.\n $first_wishlist_item = $this->reloadEntity($first_wishlist_item);\n $second_wishlist_item = $this->reloadEntity($second_wishlist_item);\n $this->assertEmpty($first_wishlist_item);\n $this->assertNotEmpty($second_wishlist_item);\n\n /** @var \\Drupal\\commerce_wishlist\\Entity\\WishlistInterface $wishlist */\n $wishlist = $this->reloadEntity($wishlist);\n $wishlist_items = $wishlist->getItems();\n $wishlist_item = reset($wishlist_items);\n $this->assertCount(1, $wishlist_items);\n $this->assertEquals($second_wishlist_item->id(), $wishlist_item->id());\n }",
"private function deleteOldProducts(): void\n {\n DB::table('products')\n ->whereIn('id', array_keys($this->databaseProducts))\n ->delete();\n }",
"function delete_product_item($id){\n $this->delete($id);\n }",
"public function actionDeleteKit(){\n if(Yii::$app->request->post('id') != null){\n ProductKit::deleteAll(['id' => Yii::$app->request->post('id')]);\n }\n die();\n }",
"function removeWishlist(Request $request) {\n\n $customerId = $request->request->get('customerId');\n $productId = $request->request->get('productId');\n\n $em = $this->getDoctrine()->getManager();\n $wishlist = $em->getRepository('App:Wishlist')->findOneBy(['customerId' => $customerId]);\n $wishlistExploded = explode(',', $wishlist->getProductIds());\n $productIds = [];\n foreach ($wishlistExploded as $product) {\n if($product !== $productId) {\n $productIds[] = $product;\n }\n }\n $wishlistImploded = implode(',', $productIds);\n $wishlist->setProductIds($wishlistImploded);\n $em->flush();\n\n return new Response('product removed from the wishlist');\n }",
"function uc_order_edit_products_remove($form, &$form_state) {\n $form_state['refresh_products'] = TRUE;\n\n $order_product_id = intval($form_state['triggering_element']['#return_value']);\n\n if (module_exists('uc_stock')) {\n // Replace stock immediately.\n $product = uc_order_product_load($order_product_id);\n uc_stock_adjust($product->model, $product->qty);\n }\n\n uc_order_product_delete($order_product_id);\n\n $order = $form_state['build_info']['args'][0];\n $matches = array();\n preg_match('/products\\[(\\d+)\\]/', $form_state['triggering_element']['#name'], $matches);\n $key = $matches[1];\n\n unset($order->products[$key]);\n $order->products = array_values($order->products);\n}",
"public function removeItems($products)\n {\n }",
"function remove_wish($product_id)\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_type_name_by_id('user', $user, 'wishlist') !== 'null') {\n $wished = json_decode($this->get_type_name_by_id('user', $user, 'wishlist'));\n } else {\n $wished = array();\n }\n $wished_new = array();\n foreach ($wished as $row) {\n if ($row !== $product_id) {\n $wished_new[] = $row;\n }\n }\n $this->db->where('user_id', $user);\n $this->db->update('user', array(\n 'wishlist' => json_encode($wished_new)\n ));\n }",
"function delete()\n {\n $product_id =(int) $this->getProductId();\n if(!$product_id){\n return false;\n }\n \n $vdo = vpdo::getVdo(DB_PREFIX . $this->wid);\n\n $vdo->exec('delete from word_relation where product_id = '. $product_id);\n $vdo->exec('delete from products where id = '. $product_id);\n $vdo->exec('delete from options_values where product_id = '. $product_id);\n return $product_id;\n }",
"public function delete() {\n if (!$this->customer->isLogged()) {\n die();\n }\n $product_id = $this->request->post['product_id'];\n $this->load->model('catalog/product');\n\n $this->model_catalog_product->deleteProduct($product_id);\n\n echo \"ok\";\n exit();\n\n }",
"public function delete_item_list($product_id){\n\t\t\tunset($_SESSION['terminal_list'][$product_id]);\n\t\t\treturn 'sucess';\n\t}",
"public function deleteListAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteList($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }",
"public function removeAll()\n {\n echo $this->_em->createQueryBuilder()->delete('Tdms\\Entity\\Product', 'p')->getQuery()->execute();\n }",
"private function deleteProduct()\n {\n echo PHP_EOL;\n \n try\n {\n $productToDelete = $this->productDao->getByEan(self::PRODUCT_TURKEY_EAN);\n $resultOfDelete = $this->productDao->delete($productToDelete); \n\n echo 'Product with id: ' . $productToDelete->id . ' was deleted ' .\n (($resultOfDelete) ? '' : 'un') .\n 'successfuly!' . PHP_EOL; \n }\n catch (Exception $e)\n {\n echo $e->getMessage();\n }\n }",
"public function delete()\n\t{\n\t\t$product_id = $this->input->post('product_id');\n\t\t$vendor_id = $this->session->userdata('vendor_id');\n\n\t\t$thumb_image = get_product($product_id, 'thumb_image'); //get thumb_image\n\t\t$images = unserialize(get_product($product_id, 'images')); //get multiple images\n\n\t\t$deleted = $this->products->delete($product_id);\n\n\t\tif ($deleted)\n\t\t{\n\t\t\t//thumb image//\n\t\t\t$copy_thumb = str_replace('products', 'products/deleted', $thumb_image); //replace path\n\t\t\tcopy($thumb_image, $copy_thumb); //copy image\n\t\t\tunlink($thumb_image);\n\n\t\t\tforeach ($images as $image) //multiple images//\n\t\t\t{\n\t\t\t\t$copy_image = str_replace('products', 'products/deleted', $image); //replace path\n\t\t\t\tcopy($image, $copy_image); //copy image\n\t\t\t\tunlink($image);\n\t\t\t}\n\n\t\t\t$this->vendors->update_total_product($vendor_id, 'total_products - 1');\n\t\t\techo 'true';\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 'false';\n\t\t}\n\t}",
"public function remove($product_id)\n {\n\n\n $id = $this->wlm->get_id_wishlist($product_id, $this->session->userdata('id'));\n\n $this->wlm->delete($id);\n redirect(\"retailer/products/detail_product/\" . $product_id);\n }",
"public function delete(){\n $this->product->id = $_GET['delete_id'];\n\n // delete the product\n if($this->product->delete()){\n echo \"<div class=\\\"alert alert-success alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">×</button>\";\n echo \"Object was deleted.\";\n echo \"</div>\";\n }\n\n // if unable to delete the product\n else{\n echo \"<div class=\\\"alert alert-danger alert-dismissable\\\">\";\n echo \"<button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\" aria-hidden=\\\"true\\\">×</button>\";\n echo \"Unable to delete object.\";\n echo \"</div>\";\n }\n }",
"function dokan_delete_product_handler() {\n if ( isset( $_GET['action'] ) && $_GET['action'] == 'dokan-delete-product' ) {\n $product_id = isset( $_GET['product_id'] ) ? intval( $_GET['product_id'] ) : 0;\n\n if ( !$product_id ) {\n wp_redirect( add_query_arg( array( 'message' => 'error' ), get_permalink() ) );\n return;\n }\n\n if ( !wp_verify_nonce( $_GET['_wpnonce'], 'dokan-delete-product' ) ) {\n wp_redirect( add_query_arg( array( 'message' => 'error' ), get_permalink() ) );\n return;\n }\n\n if ( !dokan_is_product_author( $product_id ) ) {\n wp_redirect( add_query_arg( array( 'message' => 'error' ), get_permalink() ) );\n return;\n }\n\n wp_delete_post( $product_id );\n wp_redirect( add_query_arg( array( 'message' => 'product_deleted' ), get_permalink() ) );\n exit;\n }\n}",
"function remove_wish($product_id)\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_field('user', $user, 'wishlist') !== 'null') {\n $wished = json_decode($this->get_field('user', $user, 'wishlist'));\n } else {\n $wished = array();\n }\n $wished_new = array();\n foreach ($wished as $row) {\n if ($row !== $product_id) {\n $wished_new[] = $row;\n }\n }\n $this->db->where('user_id', $user);\n $this->db->update('user', array(\n 'wishlist' => json_encode($wished_new)\n ));\n }",
"function deleteProduct()\n\t{\n\t\t$id=(int)$_GET['prodid'];\n\t\t\n\t\t$sql='delete from products_table where product_id ='.$id;\n\t\t\n\t\t$obj=new Bin_Query();\n\t\t\n\t\tif($obj->updateQuery($sql))\n\t\t{\t\n\t\t\treturn '<div class=\"success_msgbox\">Product Deleted Successfully</div>';\t\n\t\t}\t\n\t}",
"public function destroy(Product $product) //Eliminar\n {\n //\n }",
"function item_delete()\n {\n $key = $this->get('id');\n $this->supplies->delete($key);\n $this->response(array('ok'), 200);\n }",
"function delete($product)\n {\n if (array_key_exists($product->id, $this->items)) {\n $storeProductDelete = $this->items[$product->id];\n //giam tien\n $this->totalPrice -= $storeProductDelete['price'];\n //giam so luong\n $this->totalQuantity -= $storeProductDelete['quantity'];\n // xoa phan tu o vi tri $product->id\n unset($this->items[$product->id]);\n }\n }",
"function delete_follow_up_product($id)\n {\n return $this->db->delete('follow_up_product',array('id'=>$id));\n }",
"public function destroy(WasteProduct $wasteProduct)\n {\n //\n }",
"protected function _delete()\n {\n $photoTable = Engine_Api::_()->getItemTable('socialstore_product_photo');\n $photoSelect = $photoTable->select()->where('album_id = ?', $this->getIdentity());\n foreach( $photoTable->fetchAll($photoSelect) as $productPhoto ) {\n $productPhoto->delete();\n }\n\n parent::_delete();\n }",
"public function delete() {\n\t\t$cart = D('ShoppingCart');\n\t\t$ret = true;\n\t\t// get good_id to delete from the POSTed array\n\t\tforeach ($_POST['good_ids'] as $good_id) {\n\t\t\t// delete each good\n\t\t\t$ret &= $cart->where('user_id = '.$this->_session('uid').' AND good_id = '.$good_id)->delete();\n\t\t}\n\t\t// return hint, show index page\n\t\t// echo 1;\n\t\t$this->redirect('ShoppingCart/index');\n\t}",
"public function destroy(Wishlist $wishlist)\n {\n //\n }",
"public function destroy(Wishlist $wishlist)\n {\n //\n }",
"public function actionDeleteProduct()\n\t{\n\t\t$model = OrderProduct::model()->findByPk($_POST['product_id']);\n\t\tif($model)\n\t\t\t$model->delete();\n\t}",
"public function delete_user_product(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$product_id = $this->uri->segment(4,0);\r\n\t\t\t$condition = array('seller_product_id' => $product_id);\r\n\t\t\t$old_product_details = $this->product_model->get_all_details(USER_PRODUCTS,array('seller_product_id'=>$product_id));\r\n\t\t\t$this->update_user_created_lists($product_id);\r\n\t\t\t$this->update_user_likes($product_id);\r\n\t\t\t$this->update_user_product_count($old_product_details);\r\n\t\t\t$this->product_model->commonDelete(USER_PRODUCTS,$condition);\r\n\t\t\t$this->product_model->commonDelete(USER_ACTIVITY,array('activity_id'=>$product_id));\r\n\t\t\t$this->product_model->commonDelete(NOTIFICATIONS,array('activity_id'=>$product_id));\r\n\t\t\t$this->product_model->commonDelete(PRODUCT_COMMENTS,array('product_id'=>$product_id));\r\n\t\t\t$this->setErrorMessage('success','Product deleted successfully');\r\n\t\t\tredirect('admin/product/display_user_product_list');\r\n\t\t}\r\n\t}",
"public function deleteProduct(Product $product);",
"public function deleteUnpublished()\n {\n /**\n * @var OrderProduct[] $products\n */\n $products = $this->products;\n foreach ($products as $product) {\n $product->delete();\n }\n \n $this->delete();\n }",
"public function destroy(Products $products)\n {\n\n\n }",
"public function DeleteAction()\n {\n\n \t//Supprime le mouvement\n \t$sm_id = $this->getRequest()->getParam('sm_id');\n \t$sm = mage::getModel('Purchase/StockMovement')->load($sm_id);\n \t$product_id = $sm->getsm_product_id();\n \t$sm->delete();\n \t\t\n \t//Met a jour le stock du produit\n \tmage::getModel('Purchase/StockMovement')->ComputeProductStock($product_id);\n \t\n \t//Redirige sur la fiche produit\n \t$this->_redirect('Purchase/Products/Edit/product_id/'.$product_id);\n \t\n }",
"function product_category_delete(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\tmysql_q(\"DELETE FROM product_category WHERE id='\".add_slash($_r['id']).\"'\");\n\n\t\tredirect(\"product_category.htm\", \"\");\n\t}",
"function MyShop_DeleteProduct($args) {\n global $_TABLES;\n\n $sql = \"DELETE FROM {$_TABLES['myshop_product']} WHERE productid = '{$args['productid']}'\";\n DB_query($sql);\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}",
"private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }",
"public function deleteProductAction()\n {\n $id = $_GET['id'];\n $productManager = new ProductManager();\n $productManager->deleteProduct($id);\n header('Location: index.php?section=admin&page=adminproducts');\n }",
"public function removeAction() {\n\n // Validate request methods\n $this->validateRequestMethod('POST');\n\n //GET DIARY ID AND SUBJECT\n if (Engine_Api::_()->core()->hasSubject())\n $wishlist = Engine_Api::_()->core()->getSubject('sitereview_wishlist');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n if (isset($wishlist_id) && !empty($wishlist_id)) {\n $subject = $wishlist = Engine_Api::_()->getItem('sitereview_wishlist', $wishlist_id);\n Engine_Api::_()->core()->setSubject($wishlist);\n } else {\n $this->respondWithError('no_record');\n }\n\n\n if (empty($wishlist))\n $this->respondWithError('no_record');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET EVENT ID AND EVENT\n $listing_id = $this->_getParam('listing_id');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n if (empty($sitereview) && !isset($sitereview))\n $this->respondWithError('no_record');\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE FROM DATABASE\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->delete(array('wishlist_id = ?' => $wishlist_id, 'listing_id = ?' => $listing_id));\n\n try {\n //DELETE ACTIVITY FEED\n //SQL ERROR TO BE CORRECTED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_listing')\n ->where($actionTableName . '.object_id = ?', $listing_id)\n //->where($actionTableName . '.params like(?)', '{\"child_id\":' . $wishlist_id . '}')\n ->query()\n ->fetchColumn();\n } catch (Exception $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }",
"public function destroy(List_Extra_Siswa $list_Extra_Siswa)\n {\n //\n }",
"public function remove()\n\t{\n\t\t$item = ORM::factory('cart_item', $this->input->post('id'));\n\t\t$this->cart->remove_product($item);\n\t\t\n\t\turl::redirect('cart');\n\t}",
"function destroy()\n\t{\n\t\t$id = getParameter('id');\n\t\t$this->model->product->destroy($id);\n\t\tredirect('product/index');\n\t}",
"public function EliminarProductos()\n{\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" select codproducto from detalleventas where codproducto = ? \";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute( array(base64_decode($_GET[\"codproducto\"])) );\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\n\t\t\t$sql = \" delete from productos where codproducto = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codproducto);\n\t\t\t$codproducto = base64_decode($_GET[\"codproducto\"]);\n\t\t\t$stmt->execute();\n\n\t\t\t$sql = \" delete from kardexproductos where codproducto = ? \";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(1,$codproducto);\n\t\t\t$codproducto = base64_decode($_GET[\"codproducto\"]);\n\t\t\t$stmt->execute();\n\n\t\t\theader(\"Location: productos?mesage=1\");\n\t\t\texit;\n\n\t\t}else {\n\n\t\t\theader(\"Location: productos?mesage=2\");\n\t\t\texit;\n\t\t}\n\n\t} else {\n\n\t\theader(\"Location: productos?mesage=3\");\n\t\texit;\n\t}\t\n}",
"public function delete()\n\t{\n\t\t$res = $this->getDB()->delete('quotes',['quote_id'=>$this->getId()]);\n\n\t\t// Check to see if the query ran properly.\n\t\tif(!$res)\n\t\t{\n\t\t\tthrow new Exception('The product was not deleted from the quote/order.');\n\t\t}\n\t}",
"public function deleteShitty($id) {\n\n $brandsDeleted = array();\n $productsDeleted = array();\n\n foreach ($id as $productId) {\n $product = $this->_Product->find('first', array(\n 'conditions' => array('Product.id' => $productId),\n 'fields' => array('id', 'brand_id'),\n 'contain' => array(\n 'Brand',\n 'Image' => array('id', 'product_id')\n ),\n 'cache' => false\n ));\n\n if (!empty($product)) {\n $brandId = $product['Product']['brand_id'];\n $productsFromBrand = $this->_Product->find('count', array(\n 'conditions' => array('Product.brand_id' => $brandId),\n 'cache' => false\n ));\n\n # Delete brand\n if ($productsFromBrand < 2) {\n $this->addTaskDeleteS3Folder(Configure::read('Brand.Images.Amazon.bucket'), $brandId);\n $this->_Task->add(\n 'brands/task_delete.json', \n array('data' => array('brand_id' => $brandId)), \n 'DELETE'\n );\n\n $brandsDeleted[] = $brandId;\n }\n\n # Delete product\n $this->addTaskDeleteS3Folder(Configure::read('Product.Images.Amazon.bucket'), $productId);\n $this->_Task->add(\n 'products/task_delete.json',\n array('data' => array('product_id' => $productId)), \n 'DELETE'\n );\n\n $productsDeleted[] = $productId;\n }\n }\n\n sort($brandsDeleted);\n sort($productsDeleted);\n\n return array('brandsDeleted' => array_unique($brandsDeleted), 'productsDeleted' => array_unique($productsDeleted));\n }",
"function deleteItemCart($nomeItem){\n try {\n $db = new PDO(\"mysql:dbname=shop;host=localhost\", \"root\", \"\");\n $nomeItem_protected = $db->quote($nomeItem);\n $idCarr = $_SESSION[\"logged\"][\"idcarrello\"];\n $sql = \"DELETE FROM Contiene WHERE idWishlist = '$idCarr' AND nomeProd = $nomeItem_protected \";\n $stmt = $db->prepare($sql);\n $stmt->execute();\n $db = null;\n }catch (PDOException $err){}\n }",
"public function delete($id){\n\t\t$this->db->where('id', $id)\n\t\t\t\t ->delete('products');\n\t}",
"function removeAllProducts() {\n ini_set('max_execution_time', 0);\n try {\n $productsContent = [];\n $client = HttpClient::create();\n $productsRequest = $client->request('GET', shopifyApiurl . 'products.json?limit=250&fields=id');\n $productsContent[] = json_decode($productsRequest->getContent(), true);\n $client = HttpClient::create();\n $countRequest = $client->request('GET', shopifyApiurl . 'products/count.json');\n $countContent = json_decode($countRequest->getContent(), true);\n $count = $countContent['count'];\n\n if(array_key_exists('link', $productsRequest->getHeaders())) {\n $paginationLink = $productsRequest->getHeaders()['link'];\n $occurence = floor(($count / 250));\n for($i = 1; $i <= $occurence; $i++) {\n $result = $this->paginationRequestProducts($paginationLink);\n if ($result != false) {\n $productsContent[] = json_decode($result->getContent(), true);\n $paginationLink = $result->getHeaders()['link'];\n }\n }\n }\n foreach ($productsContent as $productId) {\n foreach ($productId['products'] as $id) {\n $client = HttpClient::create();\n $productsDelete = $client->request('DELETE', shopifyApiurl . 'products/'.$id['id'].'.json');\n }\n }\n\n } catch (\\Exception $e) {\n var_dump($e);\n }\n\n return new Response('finish');\n }",
"public function actionProductDelete()\n\t{\n\t\t$data=$_POST;\n\t\t\n\t\tif(isset($data['id'])){\n\t\t\ttry{\n\t\t\t\t$id = $data['id'];\n\t\t\t\t$logFIle = 'product/delete/'.$id;\n\t\t\t\tData::createLog('Requested Data: '.json_encode($data),$logFIle,'a');\n\t\t\t\t\n\t\t $product = Data::sqlRecords('SELECT sku,type FROM `jet_product` WHERE id=\"' . $id . '\" ', 'one');\n\t\t if(!$product)\n\t\t \treturn;\n\n\t\t $walmartConfig = Data::sqlRecords(\"SELECT `consumer_id`,`secret_key`,`consumer_channel_type_id` FROM `walmart_configuration` WHERE merchant_id='\".$data['merchant_id'].\"'\",'one','select');\n\t\t if (isset($product) && !empty($product)) {\n\t\t if ($product['type'] == 'variants') {\n\t\t $skus = Data::sqlRecords('SELECT option_sku FROM `jet_product_variants` WHERE product_id=\"' . $id .'\" ', null, 'all');\n\t\t if (!is_array($skus) || (is_array($skus) && !count($skus)))\n\t\t $skus = [];\n\n\t\t } else {\n\t\t $skus[0]['option_sku'] = $product['sku'];\n\t\t }\n\n\t\t \n\t\t $result = [];\n\t\t foreach ($skus as $sku) {\n\n\t\t $walmartApi = new Walmartapi($walmartConfig['consumer_id'],$walmartConfig['secret_key']);\n\t\t $feed_data = $walmartApi->retireProduct($sku['option_sku']);\n\t\t \n\t\t if(isset($feed_data['ItemRetireResponse']))\n\t\t {\n\t\t $result['success'][] = '<b>'.$feed_data['ItemRetireResponse']['sku'].' : </b>'.$feed_data['ItemRetireResponse']['message'];\n\t\t }\n\t\t elseif (isset($feed_data['errors']['error']))\n\t\t {\n\t\t if(isset($feed_data['errors']['error']['code']) && $feed_data['errors']['error']['code'] == \"CONTENT_NOT_FOUND.GMP_ITEM_INGESTOR_API\" && $feed_data['errors']['error']['field'] == \"sku\")\n\t\t {\n\t\t $result['error'][] = $sku['option_sku'].' : Product not Uploaded on Walmart.';\n\t\t }\n\t\t else\n\t\t {\n\t\t $result['error'][] = $sku['option_sku'].' : '.$feed_data['errors']['error']['description'];\n\t\t }\n\t\t } \n\t\t }\n\t\t \n\t\t }\n\t\t Data::createLog('Result : '.json_encode($result),$logFIle,'a');\n\t\t }\n\t\t catch(Exception $e){\n\t\t \tData::createLog('Exception : '.$e->getMessage(),$logFIle,'a');\n\t\t }\n\t }\n\t\tdie;\n\t}",
"public function deleteAction()\n {\n \t$id = (int) $this->params()->fromRoute('id', 0);\n \tif (!$id) {\n \t\treturn $this->redirect()->toRoute('order');\n \t}\n \t// Retrieve the current user\n \t$current_user = Functions::getUser($this);\n \t \n \t// Retrieve the allowed routes\n \t$allowedRoutes = Functions::getAllowedRoutes($this);\n\n \t// Retrieve the user's instance\n \t$instance_id = Functions::getInstanceId($this);\n \t\n \t// Retrieve the order product row\n \t$orderProduct = $this->getOrderProductTable()->get($id);\n \t \n \t// Retrieve the order\n \t$order = $this->getOrderTable()->get($orderProduct->order_id);\n\n \t// Retrieve the product\n \t$product = $this->getProductTable()->get($orderProduct->product_id);\n \t \n \t// Retrieve the user validation from the post\n \t$request = $this->getRequest();\n \tif ($request->isPost()) {\n \t\t$del = $request->getPost('del', 'No');\n \n\t\t\t// And delete the entity from the database in the \"yes\" case\n \t\tif ($del == $this->getServiceLocator()->get('translator')->translate('Yes')) {\n \t\t\t$id = (int) $request->getPost('id');\n \t\t\t$this->getOrderProductTable()->delete($id);\n \t\t}\n \n \t\t// Redirect to the index\n \t\treturn $this->redirect()->toRoute('orderProduct/index', array('id' => $order->id));\n \t}\n \n \treturn array(\n \t\t'current_user' => $current_user,\n \t\t'allowedRoutes' => $allowedRoutes,\n \t\t'title' => 'Order',\n \t\t'id' => $id,\n \t\t'order' => $order,\n \t\t'product' => $product\n \t);\n }",
"public function deleteProcuct($productModel) {\n\n }",
"public function remove_from_basket_post() {\n\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $retailer_id = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $store_id = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n\n $result = $this -> basketmodel -> remove_from_basket($product_id, $user_id);\n \n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailer_id,$store_id);\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['basket_count'] = $basket_count;\n $retArr['message'] = \"Product removed successfully from basket\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Failed to remove product from basket\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n }",
"public function delete(){\n foreach ( $this->playeractiveitems as $playeractiveitem ){\n $playeractiveitem->delete();\n }\n parent::delete();\n }",
"public function deleted(Product $producto)\n {\n //\n }",
"static public function ctrDeleteProduct(){\n\n\t\t\t\t\n\n\t\t\tif(isset($_GET[\"idProducto\"])){\n\n\t\t\t\t\t$tabla =\"productos\";\n\t\t\t\t\t$datos = $_GET[\"idProducto\"];\n\n\t\t\t\t\tif($_GET[\"imagen\"] != \"\" && $_GET[\"imagen\"] != \"views/img/products/default/productos.png\"){\n\n\t\t\t\t\t\tunlink($_GET[\"imagen\"]);\n\t\t\t\t\t\trmdir('views/img/products'.$_GET[\"codigo\"]);\n\n\t\t\t\t\t}\n\n\t\t\t\t\t$respuesta = ModelProducts::mdlDeleteProduct($tabla, $datos);\n\n\t\t\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\ttype: \"success\",\n\t\t\t\t\t\t\ttitle: \"El producto ha sido borrado correctamente\",\n\t\t\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\t\t\tconfirmButtonText: \"Cerrar\"\n\t\t\t\t\t\t\t}).then(function(result){\n\t\t\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\t\t\twindow.location = \"productos\";\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t})\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}\t\n\t\t\t}\t\t\n\t\t}",
"function deleteProduct()\r\n{\r\n\tif (isset($_GET['productId']) && (int)$_GET['productId'] > 0) {\r\n\t\t$productId = (int)$_GET['productId'];\r\n\t} else {\r\n\t\theader('Location: index.php');\r\n\t}\r\n\t\r\n\t// remove any references to this product from\r\n\t// tbl_order_item and tbl_cart\r\n\t/*\r\n\t$sql = \"DELETE FROM tbl_order_item\r\n\t WHERE pd_id = $productId\";\r\n\t\r\n\tdbQuery($sql);\r\n\t\t\t\r\n\t$sql = \"DELETE FROM tbl_cart\r\n\t WHERE pd_id = $productId\";\t\r\n\t\r\n\tdbQuery($sql);\r\n\t*/\r\n\t\r\n\t// get the image name and thumbnail\r\n\t$sql = \"SELECT pd_image, pd_thumbnail\r\n\t FROM tbl_product\r\n\t\t\tWHERE pd_id = $productId\";\r\n\t\t\t\r\n\t$result = dbQuery($sql);\r\n\t$row = dbFetchAssoc($result);\r\n\t\r\n\t// remove the product image and thumbnail\r\n\tif ($row['pd_image']) {\r\n\t\tunlink(SRV_ROOT . 'images/product/' . $row['pd_image']);\r\n\t\tunlink(SRV_ROOT . 'images/product/' . $row['pd_thumbnail']);\r\n\t}\r\n\t\r\n\t// remove the product from database;\r\n\t$sql = \"DELETE FROM tbl_product \r\n\t WHERE pd_id = $productId\";\r\n\tdbQuery($sql);\r\n\t\r\n\theader('Location: index.php?catId=' . $_GET['catId']);\r\n}",
"public function clearProducts()\n\t{\n\t\t$sql=\"SET FOREIGN_KEY_CHECKS = 0\";\n\t\t$this->exec_stmt($sql);\n\t\t$tables=array(\"catalog_product_bundle_option\",\n\t\t\t\t\t \"catalog_product_bundle_option_value\",\n\t\t\t\t\t \"catalog_product_bundle_selection\",\n\t\t\t\t\t \"catalog_product_entity_datetime\",\n\t\t\t\t\t \"catalog_product_entity_decimal\",\n\t\t\t\t\t \"catalog_product_entity_gallery\",\n\t\t\t\t\t \"catalog_product_entity_int\",\n\t\t\t\t\t \"catalog_product_entity_media_gallery\",\n\t\t\t\t\t \"catalog_product_entity_media_gallery_value\",\n\t\t\t\t\t \"catalog_product_entity_text\",\n\t\t\t\t\t \"catalog_product_entity_tier_price\",\n\t\t\t\t\t \"catalog_product_entity_varchar\",\n\t\t\t\t\t \"catalog_product_entity\",\n\t\t\t\t\t \"catalog_product_option\",\n\t\t\t\t\t \"catalog_product_option_price\",\n\t\t\t\t\t \"catalog_product_option_title\",\n\t\t\t\t\t \"catalog_product_option_type_price\",\n\t\t\t\t\t \"catalog_product_option_type_title\",\n\t\t\t\t\t \"catalog_product_option_type_value\",\t\t\n\t\t\t\t\t \"catalog_product_super_attribute_label\",\n\t\t\t\t\t \"catalog_product_super_attribute_pricing\",\n\t\t\t\t\t \"catalog_product_super_attribute\",\n\t\t\t\t\t \"catalog_product_super_link\",\n\t\t\t\t\t \"catalog_product_relation\",\n\t\t\t\t\t \"catalog_product_enabled_index\",\n\t\t\t\t\t \"catalog_product_website\",\n\t\t\t\t\t \"catalog_category_product_index\",\n\t\t\t\t\t \"catalog_category_product\",\n\t\t\t\t\t \"cataloginventory_stock_item\",\n\t\t\t\t\t \"cataloginventory_stock_status\");\n\n\n\t\tforeach($tables as $table)\n\t\t{\n\t\t\t$this->exec_stmt(\"TRUNCATE TABLE `\".$this->tablename($table).\"`\");\n\t\t}\n\n\t\t$sql=\"SET FOREIGN_KEY_CHECKS = 1\";\n\n\t\t$this->exec_stmt($sql);\n\t}",
"public function delete_product()\n {\n\t $product_id = (int)$this->uri->segment(4);\n\t //dump($product_id);\n\t \n\t $query = $this->Product_model->delete_product($product_id);\n\t if($query){\n\t\t \n\t\t redirect('admin/Dashboard/product');\n\t\t \n\t } else {\n\t\t\t \n\t\t echo 'error';\n\t\t\t \n\t }\t \n\t \n }",
"public function delete()\n {\n $this->isAuthenticated();\n $this->authToken->isRequestLimitExceeded();\n $this->authToken->logRequest(1);\n\n //get the id from the user\n $data = $_POST;\n //set the id\n $this->product->id = array_values($data)[0];\n\n if ($this->product->delete()) {\n // set response code - 200 ok\n http_response_code(200);\n echo json_encode(array(\"message\" => \"Product was deleted.\"));\n }\n\n // if unable to update the product\n else {\n\n // set response code - 503 service unavailable\n http_response_code(503);\n echo json_encode(array(\"message\" => \"Unable to delete.\"));\n }\n }",
"public function page_delete_cat()\n\t{\n\t\tif (check_confirm())\n\t\t{\n\t\t\tif ($this->id > 0)\n\t\t\t{\n\t\t\t\t// On met a jour l'ordre des categories\n\t\t\t\t$sql = 'SELECT cat_order\n\t\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t\t$cat_order = Fsb::$db->get($sql, 'cat_order');\n\t\t\t\tif (!$cat_order)\n\t\t\t\t{\n\t\t\t\t\tDisplay::message('no_result');\n\t\t\t\t}\n\n\t\t\t\tFsb::$db->update('smilies_cat', array(\n\t\t\t\t\t'cat_order' =>\tarray('(cat_order - 1)', 'is_field' => true),\n\t\t\t\t), 'WHERE cat_order > ' . $cat_order);\n\n\t\t\t\t// Suppression de la categorie\n\t\t\t\t$sql = 'DELETE FROM ' . SQL_PREFIX . 'smilies_cat\n\t\t\t\t\t\tWHERE cat_id = ' . $this->id;\n\t\t\t\tFsb::$db->query($sql);\n\n\t\t\t\t$sql = 'DELETE FROM ' . SQL_PREFIX . 'smilies\n\t\t\t\t\t\tWHERE smiley_cat = ' . $this->id;\n\t\t\t\tFsb::$db->query($sql);\n\t\t\t\tFsb::$db->destroy_cache('smilies_');\n\t\t\t}\n\n\t\t\tLog::add(Log::ADMIN, 'log_smiley_delete_cat');\n\t\t\tDisplay::message('adm_smiley_well_cat_delete', 'index.' . PHPEXT . '?p=posts_smiley', 'posts_smiley');\n\t\t}\n\t\telse if (Http::request('confirm_no', 'post'))\n\t\t{\n\t\t\tHttp::redirect('index.' . PHPEXT . '?p=posts_smiley');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tDisplay::confirmation(Fsb::$session->lang('adm_smiley_delete_cat_confirm'), 'index.' . PHPEXT . '?p=posts_smiley', array('mode' => $this->mode, 'id' => $this->id));\n\t\t}\n\t}",
"function delete_prodInv($prodID)\n {\n $sql = \"delete from product where ProdID=\" . $prodID;\n $query = $this->db->query($sql);\n }",
"function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS products');\r\n SQLExec('DROP TABLE IF EXISTS product_categories');\r\n SQLExec('DROP TABLE IF EXISTS shopping_list_items');\r\n parent::uninstall();\r\n }",
"public function purchase_item_delete(){\r\n\t\t\r\n\t\t$this->Purchase_model->purchase_item_delete();\r\n\t}",
"function delete($id) {\n\t\t$delete = new Product();\n\t\t# load the page with the id from the url\n\t\t$delete->load($id);\n\t\t# send and update query that does a soft delete\n\t\t$delete->delete();\n\t\t# go back to the shop page\n\t\tURL::redirect('/shop');\n\t}",
"public function delete() {\n\t\t$sql = 'delete from cart_orders_products_attributes where orders_products_attributes_id=\"' . e($this->getId()) . '\"';\n\t\tDatabase::singleton()->query($sql);\n\t}",
"function deleteQuoteAction()\n\t{\n\t\t//if($this->_view->user_type == 'superadmin')\n\t\t//{\n\t\t\t$request = $this->_request->getParams();\n\t\t\t$quote_id = $request['quote_id'];\n\t\t\t$quote_obj = new Ep_Quote_Quotes();\n\t\t\t$update = array('sales_review'=>'deleted','deleted_at'=>date('Y-m-d H:i:s'),'deleted_by'=>$this->_view->userId);\n\t\t\t$quote_obj->updateQuote($update,$quote_id);\n\t\t\t$this->_redirect('/quote/sales-quotes-list?submenuId=ML13-SL2&active=deleted');\n\t\t//}\n\t\t//else\n\t\t//$this->_redirect('/quote/sales-quotes-list?submenuId=ML13-SL2');\n\t}",
"public function delete_extraproduct(){\n if($this->uri->segment(3) == \"temp\"){\n $id = $this->uri->segment(4);\n $result = MU_Model::deletedRecordById(\"temp_table\",array(\"ID\" => $id));\n }else{\n $id = $this->uri->segment(3);\n $result = MU_Model::deletedRecordById(\"extra_acti\",array(\"extraproduct_id\" => $id));\n }\n if($result) echo 't';\n }",
"public function delete()\n {\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n $id = $_POST['id'];\n $pictureManager = new PictureManager();\n $pictureManager->delete($id);\n $productManager = new ProductManager();\n $productManager->delete($id);\n header('location: /adminProduct/list');\n }\n }",
"function delete()\n {\n $GLOBALS['DB']->exec(\"DELETE FROM stores WHERE id = {$this->getId()};\");\n $GLOBALS['DB']->exec(\"DELETE FROM stores_brands WHERE store_id = {$this->getId()};\");\n }",
"function supprimerArticleWishlist($libelleProduit){\n //Si le panier existe\n if (creationPanier() && !isVerrouille())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n $tmp['libelleProduit'] = array();\n $tmp['idProduit'] = array();\n $tmp['qteProduit'] = array();\n $tmp['prixProduit'] = array();\n $tmp['enseigne'] = array();\n $tmp['idEnseigne'] = array();\n $tmp['mediaProduit'] = array();\n $tmp['pourcentageReverse'] = array();\n $tmp['verrou'] = $_SESSION['wishlist']['verrou'];\n\n for($i = 0; $i < count($_SESSION['wishlist']['libelleProduit']); $i++)\n {\n if ($_SESSION['wishlist']['libelleProduit'][$i] !== $libelleProduit)\n {\n array_push( $tmp['libelleProduit'],$_SESSION['wishlist']['libelleProduit'][$i]);\n array_push( $tmp['idProduit'],$_SESSION['wishlist']['idProduit'][$i]);\n array_push( $tmp['qteProduit'],$_SESSION['wishlist']['qteProduit'][$i]);\n array_push( $tmp['prixProduit'],$_SESSION['wishlist']['prixProduit'][$i]);\n array_push($tmp['enseigne'], $_SESSION['wishlist']['enseigne'][$i]);\n array_push($tmp['idEnseigne'], $_SESSION['wishlist']['idEnseigne'][$i]);\n array_push($tmp['mediaProduit'], $_SESSION['wishlist']['mediaProduit'][$i]);\n array_push($tmp['pourcentageReverse'], $_SESSION['wishlist']['pourcentageReverse'][$i]);\n }\n\n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['wishlist'] = $tmp;\n //On efface notre panier temporaire\n unset($tmp);\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}",
"function m_giftWrapDelete()\n\t{\n\t\tif(isset($this->request['id']) && !empty($this->request['id']))\n\t\t{\t\t\t\n\t\t\t\t$this->obDb->query = \"DELETE FROM \".GIFTWRAPS.\" WHERE iGiftwrapid_PK =\".$this->request['id'];\n\t\t\t\t$this->obDb->updateQuery();\n\t\t}\n\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"sales/adminindex.php?action=promotions.giftwrap.home&msg=3\");\t\n\t}",
"public function delete() {\r\r\n //product id \r\r\n $id = $this->uri->segment(4);\r\r\n $this->sites_model->delete_site($id);\r\r\n redirect('admin/sites');\r\r\n }",
"public function destroy(Product $product)\n {\n $wishlist_items = array();\n $confirm_products = array();\n\n $wishlists = Wishlist::all();\n $orders = Order::all();\n foreach ($wishlists as $wishlist) {\n array_push($wishlist_items, $wishlist->getProducts()->withTrashed()->first()->id);\n }\n foreach ($orders as $order) {\n foreach ($order->getCart as $item) {\n array_push($confirm_products, $item->getProduct->first()->id);\n }\n }\n in_array($product->id, $confirm_products) || in_array($product->id, $wishlist_items) ?\n Product::find($product->id)->delete() :\n Product::find($product->id)->forceDelete();\n return back()->with('success', 'Successfully deleted.');\n }",
"function delete($flagDeleteImages=false)\n {\n global $objDatabase;\n\n// TODO: MUST NOT delete while the Product is part of any Order!\n\n if (!$this->id) return false;\n if ($flagDeleteImages) {\n // Heck, most of this should go into the ProductPicture class...\n // Split picture data into single pictures\n $arrPictures = explode(':', $this->pictures);\n foreach ($arrPictures as $strPicture) {\n if (empty($strPicture)) continue;\n // Split picture into name, width, height -- all are base64\n // encoded!\n $arrPicture = explode('?', $strPicture);\n $strFileName = base64_decode($arrPicture[0]);\n // If it is the default image, skip it\n if (preg_match('/'.ShopLibrary::noPictureName.'$/', $strFileName))\n continue;\n // Verify that no other Product uses the same picture.\n // $arrPicture[0] contains the encoded file name\n $query = \"\n SELECT picture FROM \".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products\n WHERE picture LIKE '%\".addslashes($arrPicture[0]).\"%'\";\n $objResult = $objDatabase->Execute($query);\n if ($objResult->RecordCount() == 1) {\n // The only one -- it can be deleted.\n // Delete the picture and thumbnail.\n $thumbName = \\Image::getThumbnailPath($strFileName);\n // Continue even if deleting the images fails\n \\File::delete_file($strFileName);\n \\File::delete_file($thumbName);\n }\n }\n }\n // Remove any Text records present\n if (!\\Text::deleteById($this->id, 'Shop', self::TEXT_NAME)) return false;\n if (!\\Text::deleteById($this->id, 'Shop', self::TEXT_SHORT)) return false;\n if (!\\Text::deleteById($this->id, 'Shop', self::TEXT_LONG)) return false;\n if (!\\Text::deleteById($this->id, 'Shop', self::TEXT_KEYS)) return false;\n if (!\\Text::deleteById($this->id, 'Shop', self::TEXT_CODE)) return false;\n if (!\\Text::deleteById($this->id, 'Shop', self::TEXT_URI)) return false;\n // Delete the Product attribute relations and the Product itself\n// TEST\n if (!Attributes::removeFromProduct($this->id)) {\n return false;\n }\n \n \\Env::get('cx')->getEvents()->triggerEvent('model/preRemove', array(new \\Doctrine\\ORM\\Event\\LifecycleEventArgs($this, \\Env::get('em'))));\n \n $objResult = $objDatabase->Execute(\"\n DELETE FROM \".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products\n WHERE id=$this->id\");\n \n if (!$objResult) {\n return false;\n }\n \\Env::get('cx')->getEvents()->triggerEvent('model/postRemove', array(new \\Doctrine\\ORM\\Event\\LifecycleEventArgs($this, \\Env::get('em'))));\n \n $objDatabase->Execute(\"\n OPTIMIZE TABLE \".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_products\");\n return true;\n }",
"function top10_remove() {\r\n//delete_option('omekafeedpull_omekaroot');\r\n}",
"public function removeProduct(Product $product){\n $product->allergieëns()->detach();\n $product->delete();\n return redirect()->back();\n }",
"function deleteAction()\n\t{\n global $langCode;\n\t\t$id = (int)$this->registry->router->getArg('id');//lay id cua record can xoa\n\t\t$myProductCat = new Core_ProductCategory($id);\n\t\tif($myProductCat->id > 0)\n\t\t{\n\t\t\t//tien hanh xoa\n\t\t\tif($myProductCat->delete())\n\t\t\t{\n\t\t\t\t$redirectMsg = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['succDelete']);\n\t\t\t\t\n\t\t\t\t$this->registry->me->writelog('ProductCategorydelete', $myProductCat->id, array('name' => $myProductCat->name[$langCode])); \t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$redirectMsg = str_replace('###categoryname###', $myProductCat->name[$langCode], $this->registry->lang['controller']['errDelete']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$redirectMsg = $this->registry->lang['controller']['errNotFound'];\n\t\t}\n\t\t\n\t\t$this->registry->smarty->assign(array('redirect' => $this->getRedirectUrl(),\n\t\t\t\t\t\t\t\t\t\t\t\t'redirectMsg' => $redirectMsg,\n\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t$this->registry->smarty->display('redirect.tpl');\n\t\t\t\n\t}",
"public function delete()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$post = JRequest::get('post');\n\t\t$cartElement = $post['cart_index'];\n\t\t$Itemid = JRequest::getVar('Itemid');\n\t\t$redhelper = new redhelper;\n\t\t$Itemid = $redhelper->getCartItemid();\n\t\t$model = $this->getModel('cart');\n\n\t\t$model->delete($cartElement);\n\t\t$this->_carthelper->cartFinalCalculation();\n\t\t$this->_carthelper->carttodb();\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false);\n\t\t$this->setRedirect($link);\n\t}",
"function delete_tag()\n{\n global $xoopsModule, $xoopsSecurity;\n\n $page = rmc_server_var($_POST, 'page', 1);\n $tags = rmc_server_var($_POST, 'tags', []);\n\n if (!$xoopsSecurity->check()) {\n redirectMsg('tags.php?page=' . $page, __('Sorry, operation not allowed!', 'mywords'), 1);\n die();\n }\n\n if (!is_array($tags) || empty($tags)) {\n redirectMsg('tags.php?page=' . $page, __('Please, specify a valid tag id!', 'mywords'), 1);\n die();\n }\n\n // Delete all relations\n $db = XoopsDatabaseFactory::getDatabaseConnection();\n $sql = 'DELETE FROM ' . $db->prefix('mod_mywords_tagspost') . ' WHERE tag IN(' . implode(',', $tags) . ')';\n if (!$db->queryF($sql)) {\n redirectMsg('tags.php?page=' . $page, __('Errors ocurred while trying to delete tags!', 'mywords') . '<br>' . $db->error(), 1);\n die();\n }\n\n $sql = 'DELETE FROM ' . $db->prefix('mod_mywords_tags') . ' WHERE id_tag IN(' . implode(',', $tags) . ')';\n if (!$db->queryF($sql)) {\n redirectMsg('tags.php?page=' . $page, __('Errors ocurred while trying to delete tags!', 'mywords') . '<br>' . $db->error(), 1);\n die();\n }\n\n redirectMsg('tags.php?page=' . $page, __('Database updated succesfully!', 'mywords'), 0);\n}",
"function deleteProdItems($pid)\n {\n\t \n\t $this->db->where('pid', $pid);\n $deleted = $this->db->delete('tbl_product_items'); \n\t\tif($deleted)\n return true;\n\t\telse\n\t\t return false;\n }",
"public function deleteMethod(){\n $fc=AppController::getInstance();\n $args=$fc->getArgsNum();\n if(!isset($args[0]))header('Location:/error');\n if(!$good=$this->_db->getGoodBySlug($args[0]))exit(header('Location:/error'));\n $fn=$good->foto;\n if($_SERVER['REQUEST_METHOD']=='POST'){\n if(isset($_POST['yes'])){\n // получено подтверждение на удаление товара\n if(NULL===$err=$this->_db->deleteGoodOfUserShop($good->id,$this->_user->id))if(NULL===$err=ImgProc::deleteFotos($fn))exit(header('Location:/goods'));\n die($err);\n }\n exit(header('Location:/goods'));\n }\n $fc->setContent($fc->render('goods/delete.twig.html',array('this'=>$this,'good'=>$good)));\n }",
"function supprimewishlist(){\n unset($_SESSION['wishlist']);\n}",
"public function removeProduct()\n {\n $product_code = filter_var($_GET[\"remove_code\"], FILTER_SANITIZE_STRING);\n\n if(isset($_SESSION[\"products\"][$product_code]))\t{\n unset($_SESSION[\"products\"][$product_code]);\n }\n\n $total_product = count($_SESSION[\"products\"]);\n die(json_encode(array('products'=>$total_product)));\n }",
"public function remove_from_cart() {\n WC_Gokeep_JS::get_instance()->remove_from_cart();\n }",
"public function delete_OrderPage(){\n $id_product = $_REQUEST[\"id_product\"];\n $id_order = $_REQUEST[\"id_order\"];\n $query = \"DELETE FROM order_u\n WHERE order_u.id = $id_order;\";\n $data = $this->connection->query($query);\n\n $query = \"DELETE FROM order_product\n WHERE order_product.order_id = $id_order;\";\n $data = $this->connection->query($query);\n \n }",
"public static function deleteProduct() {\n $result = array();\n $deleted = lC_Products_Admin::delete($_GET['pid'], $_GET['categories']);\n if ($deleted) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }",
"function delItem($product_id)\r\n\t{\r\n\t\t$product_id = (int)$product_id;\r\n\t\tunset($_SESSION['Product'][$product_id]);\r\n\t\tunset($_SESSION['ProductVar'][$product_id]);\r\n\t\tunset($_SESSION['BasketSumm']);\r\n\t\tunset($_SESSION['ShipperId']);\r\n\t\tunset($_SESSION['GewichtSumm']);\r\n\t\tunset($_SESSION['PaymentId']);\r\n\t\theader(\"Location:\" . $_SERVER['HTTP_REFERER']);\r\n\t\texit;\r\n\t}",
"function removeProduct(Product $product){\n \t$this->myCart->remove($product);\n }"
] | [
"0.7159804",
"0.7075959",
"0.69782597",
"0.6947912",
"0.68560386",
"0.6758628",
"0.6755822",
"0.6497662",
"0.64342815",
"0.6430143",
"0.6412369",
"0.638591",
"0.6367922",
"0.6365318",
"0.6345943",
"0.6341487",
"0.63368493",
"0.63352376",
"0.6316047",
"0.6310501",
"0.62923175",
"0.6262571",
"0.62569445",
"0.6253543",
"0.62341934",
"0.6231429",
"0.62226385",
"0.62099254",
"0.62011886",
"0.6194122",
"0.61463016",
"0.612111",
"0.6118445",
"0.6106404",
"0.6097339",
"0.6094593",
"0.60921997",
"0.6067896",
"0.60594887",
"0.60594887",
"0.60560334",
"0.60385805",
"0.60259235",
"0.6008546",
"0.6003555",
"0.59976757",
"0.59888977",
"0.5961482",
"0.59607524",
"0.59557337",
"0.5948262",
"0.59050554",
"0.59040254",
"0.5896068",
"0.5894906",
"0.5887565",
"0.58874565",
"0.58832645",
"0.5880823",
"0.58751583",
"0.5865484",
"0.58514595",
"0.5850738",
"0.5847325",
"0.58431",
"0.5839893",
"0.58314645",
"0.58288395",
"0.5828519",
"0.58279467",
"0.5826763",
"0.58037186",
"0.58024925",
"0.57992417",
"0.57956284",
"0.579556",
"0.5794938",
"0.5785266",
"0.57735705",
"0.5766982",
"0.57645434",
"0.57610285",
"0.57591563",
"0.5758885",
"0.5757353",
"0.57535726",
"0.5744345",
"0.57382977",
"0.5732278",
"0.5731168",
"0.57310504",
"0.5722915",
"0.57224256",
"0.5716713",
"0.57163686",
"0.571467",
"0.5709363",
"0.56998396",
"0.56967",
"0.5693083",
"0.5692924"
] | 0.0 | -1 |
Remove products from wish list. | protected function removeProducts(array $products, array $removedProductsIndex)
{
$productBlock = $this->wishlistIndex->getWishlistBlock()->getProductItemsBlock();
$removeProducts = [];
foreach ($removedProductsIndex as $index) {
$productBlock->getItemProduct($products[--$index])->remove();
$removeProducts[] = $products[$index];
}
return $removeProducts;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionRemoveProductFromWishlist()\n {\n // set wishlistId variable from params\n $wishlistId = craft()->request->getRequiredParam('wishlistId');\n $productId = craft()->request->getRequiredParam('productId');\n $redirectUrl = craft()->request->getRequiredParam('redirect');\n\n // Create a new wishlist with above title\n craft()->wishlist->removeProductFromWishlist($wishlistId, $productId);\n\n // Set Flash message\n craft()->userSession->setFlash('removeProductFromWishlistSuccess', 'Product has been removed from wishlist!');\n\n // Redirect to plugin index page\n $this->redirect($redirectUrl);\n }",
"public function removeItems($products)\n {\n }",
"function remove_wish($product_id)\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_type_name_by_id('user', $user, 'wishlist') !== 'null') {\n $wished = json_decode($this->get_type_name_by_id('user', $user, 'wishlist'));\n } else {\n $wished = array();\n }\n $wished_new = array();\n foreach ($wished as $row) {\n if ($row !== $product_id) {\n $wished_new[] = $row;\n }\n }\n $this->db->where('user_id', $user);\n $this->db->update('user', array(\n 'wishlist' => json_encode($wished_new)\n ));\n }",
"function remove_wish($product_id)\n {\n $user = $this->session->userdata('user_id');\n if ($this->get_field('user', $user, 'wishlist') !== 'null') {\n $wished = json_decode($this->get_field('user', $user, 'wishlist'));\n } else {\n $wished = array();\n }\n $wished_new = array();\n foreach ($wished as $row) {\n if ($row !== $product_id) {\n $wished_new[] = $row;\n }\n }\n $this->db->where('user_id', $user);\n $this->db->update('user', array(\n 'wishlist' => json_encode($wished_new)\n ));\n }",
"function uc_order_edit_products_remove($form, &$form_state) {\n $form_state['refresh_products'] = TRUE;\n\n $order_product_id = intval($form_state['triggering_element']['#return_value']);\n\n if (module_exists('uc_stock')) {\n // Replace stock immediately.\n $product = uc_order_product_load($order_product_id);\n uc_stock_adjust($product->model, $product->qty);\n }\n\n uc_order_product_delete($order_product_id);\n\n $order = $form_state['build_info']['args'][0];\n $matches = array();\n preg_match('/products\\[(\\d+)\\]/', $form_state['triggering_element']['#name'], $matches);\n $key = $matches[1];\n\n unset($order->products[$key]);\n $order->products = array_values($order->products);\n}",
"function removeWishlist(Request $request) {\n\n $customerId = $request->request->get('customerId');\n $productId = $request->request->get('productId');\n\n $em = $this->getDoctrine()->getManager();\n $wishlist = $em->getRepository('App:Wishlist')->findOneBy(['customerId' => $customerId]);\n $wishlistExploded = explode(',', $wishlist->getProductIds());\n $productIds = [];\n foreach ($wishlistExploded as $product) {\n if($product !== $productId) {\n $productIds[] = $product;\n }\n }\n $wishlistImploded = implode(',', $productIds);\n $wishlist->setProductIds($wishlistImploded);\n $em->flush();\n\n return new Response('product removed from the wishlist');\n }",
"public function remove($product_id)\n {\n\n\n $id = $this->wlm->get_id_wishlist($product_id, $this->session->userdata('id'));\n\n $this->wlm->delete($id);\n redirect(\"retailer/products/detail_product/\" . $product_id);\n }",
"public function removeAction() {\r\n\r\n //SET LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //GET WISHLIST AND PAGE ID \r\n $this->view->wishlist_id = $wishlist_id = $this->_getParam('wishlist_id');\r\n $product_id = $this->_getParam('product_id');\r\n\r\n if ($this->getRequest()->isPost()) {\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n try {\r\n\r\n //DELETE FROM DATABASE\r\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitestoreproduct')->delete(array('wishlist_id = ?' => $wishlist_id, 'product_id = ?' => $product_id));\r\n\r\n //DELETE ACTIVITY FEED\r\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $actionTableName = $actionTable->info('name');\r\n\r\n $action_id = $actionTable->select()\r\n ->setIntegrityCheck(false)\r\n ->from($actionTableName, 'action_id')\r\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\r\n ->where('engine4_activity_attachments.id = ?', $product_id)\r\n ->where($actionTableName . '.type = ?', \"sitestoreproduct_wishlist_add_listing\")\r\n ->where($actionTableName . '.subject_type = ?', 'user')\r\n ->where($actionTableName . '.object_type = ?', 'sitestoreproduct_wishlist')\r\n ->where($actionTableName . '.object_id = ?', $wishlist_id)\r\n ->query()\r\n ->fetchColumn();\r\n\r\n if (!empty($action_id)) {\r\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\r\n if (!empty($activity)) {\r\n $activity->delete();\r\n }\r\n }\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => 10,\r\n 'parentRefresh' => 10,\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('This product has been removed successfully from this wishlist!'))\r\n ));\r\n }\r\n $this->renderScript('wishlist/remove.tpl');\r\n }",
"public function removeProduct()\n {\n $product_code = filter_var($_GET[\"remove_code\"], FILTER_SANITIZE_STRING);\n\n if(isset($_SESSION[\"products\"][$product_code]))\t{\n unset($_SESSION[\"products\"][$product_code]);\n }\n\n $total_product = count($_SESSION[\"products\"]);\n die(json_encode(array('products'=>$total_product)));\n }",
"function removeProductFromWishlist(Request $request) {\n\n $customerId = $request->request->get('customerId');\n $productIdToDelete = $request->request->get('productId');\n $wishlist = $this->getMetafieldCustomer($customerId,'wishlist-products');\n $wishlistDecoded = json_decode($wishlist, true);\n $productIds = '';\n if(count($wishlistDecoded['metafields']) !== 0) {\n if($wishlistDecoded['metafields'][0]['value'] !== \"\") {\n if(strpos($wishlistDecoded['metafields'][0]['value'], ',') !== false) {\n $productIdTab = explode(',' , $wishlistDecoded['metafields'][0]['value']);\n foreach ($productIdTab as $value) {\n if((string) $productIdToDelete !== (string) $value) {\n if($productIds == '') {\n $productIds .= $value;\n } else {\n $productIds .= ',' . $value;\n }\n }\n }\n }\n\n if($productIds === '') {\n $productIds = \"null\";\n }\n\n $data = [\n \"metafield\" => [\n \"id\" => $wishlistDecoded['metafields'][0]['id'],\n \"value\" => '' . $productIds . '',\n \"value_type\" => 'string',\n ]\n ];\n\n try {\n $client = HttpClient::create();\n $response = $client->request('PUT', shopifyApiurl . 'metafields/'.$wishlistDecoded['metafields'][0]['id'].'.json', ['json' => $data]);\n } catch (\\Exception $e) {\n var_dump($e);\n }\n }\n }\n\n return new Response('wishlist saved');\n }",
"public function deletewishlist($productId){\n\t\t$this->db->where('UserID', $this->session->userdata('userid'));\n\t\t$this->db->where('Product_Id', $productId);\n\t\t$this->db->delete('tbl_wishlist');\n\t}",
"public function remove_from_cart() {\n WC_Gokeep_JS::get_instance()->remove_from_cart();\n }",
"private function deleteOldProducts(): void\n {\n DB::table('products')\n ->whereIn('id', array_keys($this->databaseProducts))\n ->delete();\n }",
"public function removeFromCart() {\n\t\t$count = 0;\n\t\tforeach ($_SESSION['cart'] as $cartRow) {\n\t\t\tif ($cartRow['id'] == $this->productId) {\n\t\t\t\t$_SESSION['cart'] = array_splice($_SESSION['cart'], $count, 1);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$count += 1;\n\t\t}\n\t}",
"function removeProduct(Product $product){\n \t$this->myCart->remove($product);\n }",
"public function remove()\n\t{\n\t\t$item = ORM::factory('cart_item', $this->input->post('id'));\n\t\t$this->cart->remove_product($item);\n\t\t\n\t\turl::redirect('cart');\n\t}",
"public function DeleteWishList()\n\t{\n\t\tif ($this->checkLogin('U') == '') {\n\t\t\tredirect(base_url());\n\t\t} else {\n\t\t\t$product_id = $this->input->post('pid');\n\t\t\t$id = $this->input->post('wid');\n\t\t\t$condition = array('id' => $id);\n\t\t\t$this->data['WishListCat'] = $this->product_model->get_all_details(LISTS_DETAILS, $condition);\n\t\t\tif ($this->data['WishListCat']->row()->product_id != '') {\n\t\t\t\t$WishListCatArr = @explode(',', $this->data['WishListCat']->row()->product_id);\n\t\t\t\t$my_array = array_filter($WishListCatArr);\n\t\t\t\t$to_remove = (array)$product_id;\n\t\t\t\t$result = array_diff($my_array, $to_remove);\n\t\t\t\t$resultStr = implode(',', $result);\n\t\t\t\tif ($resultStr != '') {\n\t\t\t\t\t$this->product_model->updateWishlistRentals(array('product_id' => $resultStr), $condition);\n\t\t\t\t\t$res['result'] = '0';\n\t\t\t\t} else {\n\t\t\t\t\t$this->product_model->updateWishlistRentals(array('product_id' => $resultStr), $condition);\n\t\t\t\t\t$res['result'] = '1';\n\t\t\t\t}\n\t\t\t\t//print_r($result);die;\n\t\t\t}\n\t\t\t//$this->setErrorMessage('success','Wish list deleted successfully');\n\t\t\t/*echo '<script>window.history.go(-1);</script>';*/\n\t\t}\n\t\techo json_encode($res);\n\t}",
"public function removeAll()\n {\n echo $this->_em->createQueryBuilder()->delete('Tdms\\Entity\\Product', 'p')->getQuery()->execute();\n }",
"function remove($user_id, $product_entity_id) {\n return $this->deleteAll(array('Wishlist.user_id' => $user_id, 'Wishlist.product_entity_id' => $product_entity_id), false, false);\n }",
"protected function saveRemoveProducts()\r\n\t{\r\n\t\tif (count($this->removeProducts) > 0) {\r\n\t\t\r\n\t\t\t// remove product from Magento catalog\r\n\t\t\tforeach ($this->removeProducts as $product) {\r\n\t\t\t $result = $this->client->catalogProductDelete($this->sessionid, $product->sku);\r\n\t\t\t\t$this->log->addInfo('removed', array(\"sku\" => $product->sku, \"result\" => $result));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->removeProducts = array();\r\n\t}",
"public function remove_wechat_order_products_from_wxuser($wopids)\n {\n foreach ($wopids as $wopid) {\n $wop = WechatOrderProduct::find($wopid);\n $wop->delete();\n }\n }",
"function removeAllProducts() {\n ini_set('max_execution_time', 0);\n try {\n $productsContent = [];\n $client = HttpClient::create();\n $productsRequest = $client->request('GET', shopifyApiurl . 'products.json?limit=250&fields=id');\n $productsContent[] = json_decode($productsRequest->getContent(), true);\n $client = HttpClient::create();\n $countRequest = $client->request('GET', shopifyApiurl . 'products/count.json');\n $countContent = json_decode($countRequest->getContent(), true);\n $count = $countContent['count'];\n\n if(array_key_exists('link', $productsRequest->getHeaders())) {\n $paginationLink = $productsRequest->getHeaders()['link'];\n $occurence = floor(($count / 250));\n for($i = 1; $i <= $occurence; $i++) {\n $result = $this->paginationRequestProducts($paginationLink);\n if ($result != false) {\n $productsContent[] = json_decode($result->getContent(), true);\n $paginationLink = $result->getHeaders()['link'];\n }\n }\n }\n foreach ($productsContent as $productId) {\n foreach ($productId['products'] as $id) {\n $client = HttpClient::create();\n $productsDelete = $client->request('DELETE', shopifyApiurl . 'products/'.$id['id'].'.json');\n }\n }\n\n } catch (\\Exception $e) {\n var_dump($e);\n }\n\n return new Response('finish');\n }",
"public static function cart_remove_product()\n {\n if (!isset($_REQUEST['cart-item-key'])) {\n WordPress_Rewrite_API_Request::missing_params();\n }\n\n //@TODO Check item_key exist in Cart or Use $_REQUEST['product_id'] as item_key\n\n // Remove\n WooCommerce_Cart::remove_item_cart(sanitize_text_field($_REQUEST['cart-item-key']));\n\n // Result\n wp_send_json_success(self::_return_cart_list(), 200);\n }",
"public static function remove_specials_from_cart(){\n\n foreach( WC()->cart->get_cart() as $cart_item_key => $cart_item ){\n if ( self::is_item_special( $cart_item['product_id'] ) ){\n WC()->cart->set_quantity( $cart_item_key, 0 );\n $product_title = $cart_item['data']->get_title();\n\n wc_add_notice( sprintf( __( '"%s" has been removed from your cart. It cannot be purchased in conjunction with other products.', 'wc-only-item-in-cart' ), $product_title ), 'error' );\n }\n\n }\n\n }",
"public function remove_from_basket_post() {\n\n $user_id = $this -> post('user_id') ? $this -> post('user_id') : \"\";\n $product_id = $this -> post('product_id') ? $this -> post('product_id') : \"\";\n $retailer_id = (int) $this->post('retailer_id') ? (int)$this->post('retailer_id') : 0;\n $store_id = (int) $this->post('store_id') ? (int) $this->post('store_id') : 0;\n\n $result = $this -> basketmodel -> remove_from_basket($product_id, $user_id);\n \n //$basket_count = $this -> basketmodel -> get_basket_count($user_id);\n $basket_count = $this -> basketmodel -> get_user_basket_count($user_id,$retailer_id,$store_id);\n\n if ($result) {\n $retArr['status'] = SUCCESS;\n $retArr['basket_count'] = $basket_count;\n $retArr['message'] = \"Product removed successfully from basket\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n else {\n $retArr['status'] = FAIL;\n $retArr['message'] = \"Failed to remove product from basket\";\n $this -> response($retArr, 200); // 200 being the HTTP response code\n die;\n }\n }",
"function basel_remove_from_compare() {\n\n\t\t$id = sanitize_text_field( $_GET['id'] );\n\n\t\tif ( defined( 'ICL_SITEPRESS_VERSION' ) && function_exists( 'wpml_object_id_filter' ) ) {\n\t\t\tglobal $sitepress;\n\t\t\t$id = wpml_object_id_filter( $id, 'product', true, $sitepress->get_default_language() );\n\t\t}\n\n\t\t$cookie_name = basel_compare_cookie_name();\n\n\t\tif ( ! basel_is_product_in_compare( $id ) ) {\n\t\t\tbasel_compare_json_response();\n\t\t}\n\n\t\t$products = basel_get_compared_products();\n\n\t\tforeach ( $products as $k => $product_id ) {\n\t\t\tif ( intval( $id ) == $product_id ) {\n\t\t\t\tunset( $products[ $k ] );\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $products ) ) {\n\t\t\tsetcookie( $cookie_name, false, 0, COOKIEPATH, COOKIE_DOMAIN, false, false );\n\t\t\t$_COOKIE[ $cookie_name ] = false;\n\t\t} else {\n\t\t\tsetcookie( $cookie_name, json_encode( $products ), 0, COOKIEPATH, COOKIE_DOMAIN, false, false );\n\t\t\t$_COOKIE[ $cookie_name ] = json_encode( $products );\n\t\t}\n\n\t\tbasel_compare_json_response();\n\t}",
"public function removeAction()\n {\n if (!$this->_isActive()\n || !$this->_getHelper()->isRemoveItemAllowed()) {\n $this->norouteAction();\n return;\n }\n\n if ($this->_expireAjax()) {\n return;\n }\n\n $result = array();\n\n $quoteItem = $this->getOnepage()->getQuote()->getItemById(\n $this->getRequest()->getPost('item_id')\n );\n\n if ($quoteItem) {\n try {\n $this->getOnepage()->getQuote()\n ->removeItem($quoteItem->getId());\n \n $this->_recalculateTotals();\n $result['success'] = true;\n /**\n * When cart is ampty - redirect to empty cart page\n */\n if(!$this->getOnepage()->getQuote()->getItemsCount()){\n $result['redirect'] = Mage::helper('checkout/cart')->getCartUrl();\n }\n } catch (Mage_Core_Exception $e) {\n $result['error'] = $e->getMessage();\n } catch (Exception $e) {\n Mage::logException($e);\n $result['error'] = Mage::helper('ecomdev_checkitout')->__('There was an error during removing product from order');\n }\n } else {\n $result['error'] = Mage::helper('ecomdev_checkitout')->__('Product was not found');\n }\n\n $this->_addHashInfo($result);\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n }",
"public function delete()\n {\n // get request\n $request = $this->getRequest()->request;\n // get product ID from request\n $product_id = $request['a'];\n // get product ids from session\n $compareProducts = $this->View()->getSession('compare', $compareProducts)?$this->View()->getSession('compare', $compareProducts):array();\n\n if (in_array($product_id, $compareProducts)) {\n // unseting product from compare session\n $key = array_search($product_id, $compareProducts);\n unset($compareProducts[$key]);\n }\n\n $this->View()->setSession('compare', $compareProducts);\n\n if ($request['XHR']) {\n die(json_encode([\n 'success' => true,\n 'message' => $this->View()->translating('compare_item_deleted'),\n 'count' => count($compareProducts),\n ]));\n }\n\n Router::redirect('compare');\n }",
"function supprimewishlist(){\n unset($_SESSION['wishlist']);\n}",
"public function removeProduct(Product $product){\n $product->allergieëns()->detach();\n $product->delete();\n return redirect()->back();\n }",
"function supprimerArticleWishlist($libelleProduit){\n //Si le panier existe\n if (creationPanier() && !isVerrouille())\n {\n //Nous allons passer par un panier temporaire\n $tmp=array();\n $tmp['libelleProduit'] = array();\n $tmp['idProduit'] = array();\n $tmp['qteProduit'] = array();\n $tmp['prixProduit'] = array();\n $tmp['enseigne'] = array();\n $tmp['idEnseigne'] = array();\n $tmp['mediaProduit'] = array();\n $tmp['pourcentageReverse'] = array();\n $tmp['verrou'] = $_SESSION['wishlist']['verrou'];\n\n for($i = 0; $i < count($_SESSION['wishlist']['libelleProduit']); $i++)\n {\n if ($_SESSION['wishlist']['libelleProduit'][$i] !== $libelleProduit)\n {\n array_push( $tmp['libelleProduit'],$_SESSION['wishlist']['libelleProduit'][$i]);\n array_push( $tmp['idProduit'],$_SESSION['wishlist']['idProduit'][$i]);\n array_push( $tmp['qteProduit'],$_SESSION['wishlist']['qteProduit'][$i]);\n array_push( $tmp['prixProduit'],$_SESSION['wishlist']['prixProduit'][$i]);\n array_push($tmp['enseigne'], $_SESSION['wishlist']['enseigne'][$i]);\n array_push($tmp['idEnseigne'], $_SESSION['wishlist']['idEnseigne'][$i]);\n array_push($tmp['mediaProduit'], $_SESSION['wishlist']['mediaProduit'][$i]);\n array_push($tmp['pourcentageReverse'], $_SESSION['wishlist']['pourcentageReverse'][$i]);\n }\n\n }\n //On remplace le panier en session par notre panier temporaire à jour\n $_SESSION['wishlist'] = $tmp;\n //On efface notre panier temporaire\n unset($tmp);\n }\n else\n echo \"Un problème est survenu veuillez contacter l'administrateur du site.\";\n}",
"public function destroy(WasteProduct $wasteProduct)\n {\n //\n }",
"public function order_remove_products($products)\n {\n foreach($products as $product)\n {\n $product_id = $product->id;\n\n $order_id = $this->id;\n\n $quantity = $product->pivot->quantity;\n\n $in_cart_product = $this->product()->where('product_id',$product_id)->wherePivot('deleted_at',null)->first();\n\n if(is_null($in_cart_product))\n\n continue;\n\n if ($quantity >= $in_cart_product->pivot->quantity )\n {\n $this->removeProduct($product);\n }\n else\n {\n $update_quantity = $quantity - $in_cart_product->pivot->quantity;\n\n $in_cart_product->pivot->update(compact('update_quantity'));\n }\n \n }\n\n }",
"public function removeProduct(Product $product, $quantity);",
"public function deleteUnpublished()\n {\n /**\n * @var OrderProduct[] $products\n */\n $products = $this->products;\n foreach ($products as $product) {\n $product->delete();\n }\n \n $this->delete();\n }",
"public function unsetProductRecommendations($index)\n {\n unset($this->productRecommendations[$index]);\n }",
"public function actionRemoveFromBasket()\n\t{\n\t\t$removeThis = array($_GET['imageid']);\n\t\t$basket = Yii::app()->user->getState('basketContents');\n\t\t$newBasket = array_diff($basket,$removeThis);\n\t\t// reduces useless keys, blank keys, from the array\n\t\t$newBasket = array_values($newBasket);\n\t\tYii::app()->user->setState('basketContents',$newBasket);\n\t}",
"public function removeproductAction() {\n $id = $this->getRequest()->getParam('id');\n $poProductId = $this->getRequest()->getParam('poproductid');\n $model = Mage::getModel('inventorypurchasing/purchaseorder_draftpo_product')->load($poProductId);\n $product = Mage::getResourceModel('catalog/product_collection')\n ->addFieldToFilter('entity_id', $model->getProductId())\n ->setPageSize(1)->setCurPage(1)\n ->getFirstItem();\n try {\n $model->delete();\n Mage::getSingleton('vendors/session')->addSuccess(\n $this->helper()->__('Product %s has been removed.', '<i>' . $product->getSku() . '</i>')\n );\n $this->_redirect('*/*/view', array('id' => $id));\n } catch (Exception $e) {\n Mage::getSingleton('vendors/session')->addError($this->helper()->__('There is error while removing product.'));\n Mage::getSingleton('vendors/session')->addError($e->getMessage());\n $this->_redirect('*/*/view', array('id' => $id));\n }\n }",
"public function product_delete()\n\t\t\t\t{\n\t\t\t\t}",
"public function removeItem($product_key)\n {\n $items = $this->getItems();\n unset($items[$product_key]);\n $this->setItems($items);\n }",
"public function removeOpinion(Product $product)\n {\n }",
"public function destroy($productId)\n {\n auth()->user()->wishlist()->detach($productId);\n\n return response()->json([\n 'message' => trans('fleetcart_api::validation.wishlist_deleted')\n ]);\n }",
"public function eliminate()\n {\n //items_list() from helpers/strings.php\n return $this->inLists(items_list())\n ->delete();\n }",
"public function removeProduct($id){\r\n $stmt = $this->DB->prepare ( \"DELETE FROM products WHERE Product_ID = '$id';\");\r\n $stmt->execute ();\r\n }",
"public function destroy(Product $product)\n {\n $wishlist_items = array();\n $confirm_products = array();\n\n $wishlists = Wishlist::all();\n $orders = Order::all();\n foreach ($wishlists as $wishlist) {\n array_push($wishlist_items, $wishlist->getProducts()->withTrashed()->first()->id);\n }\n foreach ($orders as $order) {\n foreach ($order->getCart as $item) {\n array_push($confirm_products, $item->getProduct->first()->id);\n }\n }\n in_array($product->id, $confirm_products) || in_array($product->id, $wishlist_items) ?\n Product::find($product->id)->delete() :\n Product::find($product->id)->forceDelete();\n return back()->with('success', 'Successfully deleted.');\n }",
"public function delete_item_list($product_id){\n\t\t\tunset($_SESSION['terminal_list'][$product_id]);\n\t\t\treturn 'sucess';\n\t}",
"public function testDelete() {\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $first_variation = ProductVariation::create([\n 'type' => 'default',\n 'sku' => $this->randomMachineName(),\n 'title' => $this->randomString(),\n 'status' => 1,\n ]);\n $first_variation->save();\n\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $second_variation = ProductVariation::create([\n 'type' => 'default',\n 'sku' => $this->randomMachineName(),\n 'title' => $this->randomString(),\n 'status' => 1,\n ]);\n $second_variation->save();\n\n /** @var \\Drupal\\commerce_wishlist\\Entity\\WishlistItemInterface $wishlist_item */\n $first_wishlist_item = WishlistItem::create([\n 'type' => 'commerce_product_variation',\n 'purchasable_entity' => $first_variation,\n ]);\n $first_wishlist_item->save();\n\n /** @var \\Drupal\\commerce_wishlist\\Entity\\WishlistItemInterface $wishlist_item */\n $second_wishlist_item = WishlistItem::create([\n 'type' => 'commerce_product_variation',\n 'purchasable_entity' => $second_variation,\n ]);\n $second_wishlist_item->save();\n\n $wishlist = Wishlist::create([\n 'type' => 'default',\n 'name' => 'My wishlist',\n 'wishlist_items' => [$first_wishlist_item, $second_wishlist_item],\n ]);\n $wishlist->save();\n\n $first_variation->delete();\n $this->container->get('cron')->run();\n\n // Confirm that the first wishlist item has been deleted.\n $first_wishlist_item = $this->reloadEntity($first_wishlist_item);\n $second_wishlist_item = $this->reloadEntity($second_wishlist_item);\n $this->assertEmpty($first_wishlist_item);\n $this->assertNotEmpty($second_wishlist_item);\n\n /** @var \\Drupal\\commerce_wishlist\\Entity\\WishlistInterface $wishlist */\n $wishlist = $this->reloadEntity($wishlist);\n $wishlist_items = $wishlist->getItems();\n $wishlist_item = reset($wishlist_items);\n $this->assertCount(1, $wishlist_items);\n $this->assertEquals($second_wishlist_item->id(), $wishlist_item->id());\n }",
"public function removeProduct_get() {\n extract($_GET);\n $result = $this->feeds_model->removeProduct($prod_id);\n return $this->response($result);\n }",
"public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }",
"public function remove(ProductInterface $product);",
"function delete_product_item($id){\n $this->delete($id);\n }",
"function delete($product)\n {\n if (array_key_exists($product->id, $this->items)) {\n $storeProductDelete = $this->items[$product->id];\n //giam tien\n $this->totalPrice -= $storeProductDelete['price'];\n //giam so luong\n $this->totalQuantity -= $storeProductDelete['quantity'];\n // xoa phan tu o vi tri $product->id\n unset($this->items[$product->id]);\n }\n }",
"public function removeProduct(Product $product): CurrentCart;",
"public function destroy(Products $products)\n {\n\n\n }",
"function remove_move_product_selection() {\n\t\tremove_action( 'wcopc_product_selection_fields_before', 'PP_One_Page_Checkout::opc_messages', 10, 2 );\n\t\tremove_action( 'woocommerce_checkout_before_customer_details', 'PP_One_Page_Checkout::add_product_selection_fields', 11 );\n\t\tadd_action( 'woocommerce_checkout_after_customer_details', 'PP_One_Page_Checkout::add_product_selection_fields', 11);\n\t}",
"public function destroy($slug)\n {\n $product = $this->productRepo->findProductBySlug(['slug' => $slug]);\n Wishlist::where([\n 'customer_id' => Auth::user()->id,\n 'product_id' => $product->id,\n ])->delete();\n Session::flash('notificationText', 'Product removed from your Wishlist successfully!');\n return redirect()->back()->with('notificationText', 'Product removed from your Wishlist successfully!!');\n }",
"public function remove($fruit) {\r\n // We get the number of $fruit in the basket\r\n // -1 to qty\r\n // Update value in basket\r\n\r\n $qty = $this->get($fruit);\r\n $this->itemQtyArr[$fruit] = $qty - 1;\r\n }",
"public function destroy(Wishlist $wishlist)\n {\n //\n }",
"public function destroy(Wishlist $wishlist)\n {\n //\n }",
"private function deleteProduct()\n {\n echo PHP_EOL;\n \n try\n {\n $productToDelete = $this->productDao->getByEan(self::PRODUCT_TURKEY_EAN);\n $resultOfDelete = $this->productDao->delete($productToDelete); \n\n echo 'Product with id: ' . $productToDelete->id . ' was deleted ' .\n (($resultOfDelete) ? '' : 'un') .\n 'successfuly!' . PHP_EOL; \n }\n catch (Exception $e)\n {\n echo $e->getMessage();\n }\n }",
"public function removeProducts($prodIDList){\n global $db;\n\n if(is_numeric($prodIDList) && $prodIDList > 0){\n $prodIDList = [$prodIDList];\n }\n\n if(is_array($prodIDList) && count($prodIDList) > 0){\n $idCondStr = implode(',', $prodIDList);\n\n $query = sprintf('SELECT * FROM %s WHERE productID IN (%s) AND STATUS=%d', TABLE_SHOP_PRODUCTS, $idCondStr, BuckysShopProduct::STATUS_ACTIVE);\n $prodList = $db->getResultsArray($query);\n\n if(count($prodList) > 0){\n\n //remove product images first\n foreach($prodList as $prodData){\n if($prodData['images'] != ''){\n $imageList = explode('|', $prodData['images']);\n\n if(count($imageList) > 0){\n foreach($imageList as $key => $val){\n if($val != ''){\n $val = ltrim($val, '/');\n $thumb = fn_buckys_get_item_first_image_thumb($val, false);\n\n @unlink(DIR_FS_ROOT . $val);\n @unlink(DIR_FS_ROOT . $thumb);\n }\n }\n }\n\n }\n }\n\n //Delete products\n $query = sprintf('DELETE FROM %s WHERE productID IN (%s) AND STATUS=%d', TABLE_SHOP_PRODUCTS, $idCondStr, BuckysShopProduct::STATUS_ACTIVE);\n $db->query($query);\n $query = sprintf('DELETE FROM %s WHERE productID IN (%s)', TABLE_SHOP_ORDERS, $idCondStr);\n $db->query($query);\n }\n\n }\n\n return;\n }",
"function uninstall() {\r\n SQLExec('DROP TABLE IF EXISTS products');\r\n SQLExec('DROP TABLE IF EXISTS product_categories');\r\n SQLExec('DROP TABLE IF EXISTS shopping_list_items');\r\n parent::uninstall();\r\n }",
"public function deleteProduct(Product $product);",
"protected function removeAll()\n {\n if (isset($this->currentSession->cart)) {\n unset($this->currentSession->cart);\n }\n }",
"public function remove(...$items);",
"public function removeProduct($product)\n {\n\n $cart = $product->cart()->where('cart_id',$this->id)->wherePivot('deleted_at',null)->first();\n\n if (! is_null($cart))\n\n $cart->pivot->delete();\n }",
"public function remove(Request $request): void\n {\n \\Cart::remove($request->get('product_id'));\n }",
"public function clearProducts()\n\t{\n\t\t$sql=\"SET FOREIGN_KEY_CHECKS = 0\";\n\t\t$this->exec_stmt($sql);\n\t\t$tables=array(\"catalog_product_bundle_option\",\n\t\t\t\t\t \"catalog_product_bundle_option_value\",\n\t\t\t\t\t \"catalog_product_bundle_selection\",\n\t\t\t\t\t \"catalog_product_entity_datetime\",\n\t\t\t\t\t \"catalog_product_entity_decimal\",\n\t\t\t\t\t \"catalog_product_entity_gallery\",\n\t\t\t\t\t \"catalog_product_entity_int\",\n\t\t\t\t\t \"catalog_product_entity_media_gallery\",\n\t\t\t\t\t \"catalog_product_entity_media_gallery_value\",\n\t\t\t\t\t \"catalog_product_entity_text\",\n\t\t\t\t\t \"catalog_product_entity_tier_price\",\n\t\t\t\t\t \"catalog_product_entity_varchar\",\n\t\t\t\t\t \"catalog_product_entity\",\n\t\t\t\t\t \"catalog_product_option\",\n\t\t\t\t\t \"catalog_product_option_price\",\n\t\t\t\t\t \"catalog_product_option_title\",\n\t\t\t\t\t \"catalog_product_option_type_price\",\n\t\t\t\t\t \"catalog_product_option_type_title\",\n\t\t\t\t\t \"catalog_product_option_type_value\",\t\t\n\t\t\t\t\t \"catalog_product_super_attribute_label\",\n\t\t\t\t\t \"catalog_product_super_attribute_pricing\",\n\t\t\t\t\t \"catalog_product_super_attribute\",\n\t\t\t\t\t \"catalog_product_super_link\",\n\t\t\t\t\t \"catalog_product_relation\",\n\t\t\t\t\t \"catalog_product_enabled_index\",\n\t\t\t\t\t \"catalog_product_website\",\n\t\t\t\t\t \"catalog_category_product_index\",\n\t\t\t\t\t \"catalog_category_product\",\n\t\t\t\t\t \"cataloginventory_stock_item\",\n\t\t\t\t\t \"cataloginventory_stock_status\");\n\n\n\t\tforeach($tables as $table)\n\t\t{\n\t\t\t$this->exec_stmt(\"TRUNCATE TABLE `\".$this->tablename($table).\"`\");\n\t\t}\n\n\t\t$sql=\"SET FOREIGN_KEY_CHECKS = 1\";\n\n\t\t$this->exec_stmt($sql);\n\t}",
"public function removeFavorites()\n {\n $this->favorites()->delete();\n $this->favoriteCounter()->delete();\n }",
"function delete_follow_up_product($id)\n {\n return $this->db->delete('follow_up_product',array('id'=>$id));\n }",
"public function removeQuantity()\n\t{\n\t\tif(isset($this->searchFilters[$this->ref_quantity]))\n\t\t{\n\t\t\tunset($this->searchFilters[$this->ref_quantity]);\n\t\t}\n\t}",
"public function removeAction() {\n\n // Validate request methods\n $this->validateRequestMethod('POST');\n\n //GET DIARY ID AND SUBJECT\n if (Engine_Api::_()->core()->hasSubject())\n $wishlist = Engine_Api::_()->core()->getSubject('sitereview_wishlist');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n if (isset($wishlist_id) && !empty($wishlist_id)) {\n $subject = $wishlist = Engine_Api::_()->getItem('sitereview_wishlist', $wishlist_id);\n Engine_Api::_()->core()->setSubject($wishlist);\n } else {\n $this->respondWithError('no_record');\n }\n\n\n if (empty($wishlist))\n $this->respondWithError('no_record');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET EVENT ID AND EVENT\n $listing_id = $this->_getParam('listing_id');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n if (empty($sitereview) && !isset($sitereview))\n $this->respondWithError('no_record');\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE FROM DATABASE\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->delete(array('wishlist_id = ?' => $wishlist_id, 'listing_id = ?' => $listing_id));\n\n try {\n //DELETE ACTIVITY FEED\n //SQL ERROR TO BE CORRECTED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_listing')\n ->where($actionTableName . '.object_id = ?', $listing_id)\n //->where($actionTableName . '.params like(?)', '{\"child_id\":' . $wishlist_id . '}')\n ->query()\n ->fetchColumn();\n } catch (Exception $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }",
"public function destroy()\n {\n $this->_session->offsetUnset('products');\n $this->getEventManager()->trigger(CartEvent::EVENT_DELETE_CART_POST, $this, ['cart_id'=>$this->_session->cartId]);\n }",
"function get_products_to_show()\n{\n $products = get_products();\n\n foreach ($products as $list_id => $product) {\n if (count($product['images']) == 0) {\n unset($products[$list_id]);\n }\n }\n\n return $products;\n}",
"public function remove (Product $product) {\n $basket = session()->get(\"basket\"); // On récupère le panier en session\n unset($basket[$product->id]); // On supprime le produit du tableau $basket\n session()->put(\"basket\", $basket); // On enregistre le panier\n}",
"public function destroy(Product $product) //Eliminar\n {\n //\n }",
"function remove_product_from_search_index($product_id)\n\t{\n\t\t$this->execute_sql_query('DELETE FROM product_keyword WHERE product_id = ?',array((int)$product_id));\t\n\t}",
"public function clear()\n {\n BasketProductPeer::deleteAllProductsByBasketId($this->getId());\n }",
"function remove_product($voucher_id, $prod_id=NULL)\n\t{\n\t\t$where = array('voucher_id'=>$voucher_id);\n\t\t\n\t\tif(!is_null($prod_id))\n\t\t{\n\t\t\t$where['product_id'] = $prod_id;\n\t\t}\n\t\t\t\n\t\t$this->db->where($where);\n\t\t$this->db->delete('vouchers_products');\n\t}",
"public static function remove($id) {\n\t\t// No basket? Nothing to remove.\n\t\tif(self::current() === false) return true;\n\t\t\n\t\t// Remove from list\n\t\tforeach(self::$_basket->productArray as $key => $product) {\n\t\t\tif($product == $id) {\n\t\t\t\tunset(self::$_basket->productArray[$key]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Update the list\n\t\treturn self::update();\n\t}",
"public function removeAllExtras()\n {\n $extras = $this->getPricing()->getAllExtras();\n foreach ($extras as $extraCode => $extra) {\n if ($this->getPricing()->removeExtra($extraCode)) {\n // Remove the extra via an api request\n $extra = \\tabs\\api\\client\\ApiClient::getApi()->delete(\n \"/booking/{$this->getBookingId()}/extra/{$extraCode}\"\n );\n }\n }\n\n // Update the current object\n return $this->_setBookingData();\n }",
"public function validateProducts()\r\n {\r\n $return = array();\r\n \r\n if (empty( $this->items ))\r\n {\r\n return $return;\r\n }\r\n \r\n $change = false;\r\n foreach ( $this->items as $key => $wishlistitem )\r\n {\r\n $variant_id = \\Dsc\\ArrayHelper::get( $wishlistitem, 'variant_id' );\r\n \r\n try\r\n {\r\n $product = (new \\Shop\\Models\\Variants())->getById( $variant_id );\r\n }\r\n catch ( \\Exception $e )\r\n {\r\n // remove item from wishlist and add message to $return\r\n $title = \\Dsc\\ArrayHelper::get( $wishlistitem, 'product.title' );\r\n $return[] = 'The item \"' . $title . '\" is invalid and has been removed from your wishlist.';\r\n unset( $this->items[$key] );\r\n $change = true;\r\n continue;\r\n }\r\n \r\n // TODO If the product is not available, remove item from wishlist and add message to $return\r\n \r\n // update the wishlist's stored product definition\r\n $cast = $product->cast();\r\n if ($this->items[$key]['product'] != $cast)\r\n {\r\n $change = true;\r\n $this->items[$key]['product'] = $cast;\r\n }\r\n \r\n // TODO Has the price changed? If so, update the wishlist and add message to $return\r\n }\r\n \r\n if ($change)\r\n {\r\n $this->save();\r\n }\r\n \r\n return $return;\r\n }",
"public function Remove($wishlist_id)\n\t{\n\t\t$this->_CheckLogged();\n\t\t\n\t\t$this->wishlist_model->remove($this->session->userdata('customer_id'),$wishlist_id);\n\t\t\n\t\tredirect($this->_getBaseURI());\n\t}",
"public function removeLikes()\n {\n foreach ($this->likes as $like) {\n $like->delete();\n }\n }",
"function warp_ajax_product_remove()\n{\n // Get mini cart\n ob_start();\n\n foreach (WC()->cart->get_cart() as $cart_item_key => $cart_item)\n {\n if($cart_item['product_id'] == $_POST['product_id'] && $cart_item_key == $_POST['cart_item_key'] )\n {\n WC()->cart->remove_cart_item($cart_item_key);\n }\n }\n\n WC()->cart->calculate_totals();\n WC()->cart->maybe_set_cart_cookies();\n\n woocommerce_mini_cart();\n\n $mini_cart = ob_get_clean();\n\n // Fragments and mini cart are returned\n $data = array(\n 'fragments' => apply_filters( 'woocommerce_add_to_cart_fragments', array(\n 'div.widget_shopping_cart_content' => '<div class=\"widget_shopping_cart_content\">' . $mini_cart . '</div>'\n )\n ),\n 'cart_hash' => apply_filters( 'woocommerce_add_to_cart_hash', WC()->cart->get_cart_for_session() ? md5( json_encode( WC()->cart->get_cart_for_session() ) ) : '', WC()->cart->get_cart_for_session() )\n );\n\n wp_send_json( $data );\n\n die();\n}",
"public function destroy(product $product)\n {\n //\n }",
"public function destroy(product $product)\n {\n //\n }",
"function delItem($product_id)\r\n\t{\r\n\t\t$product_id = (int)$product_id;\r\n\t\tunset($_SESSION['Product'][$product_id]);\r\n\t\tunset($_SESSION['ProductVar'][$product_id]);\r\n\t\tunset($_SESSION['BasketSumm']);\r\n\t\tunset($_SESSION['ShipperId']);\r\n\t\tunset($_SESSION['GewichtSumm']);\r\n\t\tunset($_SESSION['PaymentId']);\r\n\t\theader(\"Location:\" . $_SERVER['HTTP_REFERER']);\r\n\t\texit;\r\n\t}",
"public function removeProductStocks($product_id)\n {\n $this->db->query(\n 'UPDATE ?:products SET is_stock_split_by_warehouses = ?s'\n . ' WHERE product_id = ?i AND is_stock_split_by_warehouses = ?s',\n YesNo::NO,\n $product_id,\n YesNo::YES\n );\n\n $this->db->query('DELETE FROM ?:warehouses_products_amount WHERE product_id = ?i', $product_id);\n $this->db->query('DELETE FROM ?:warehouses_destination_products_amount WHERE product_id = ?i', $product_id);\n }",
"public static function uninstall() {\n\t\tglobal $wpdb;\n\t\t$wpdb->query( \"DROP TABLE IF EXISTS {$wpdb->prefix}product_list\" );\n\t\t$wpdb->query( \"DROP TABLE IF EXISTS {$wpdb->prefix}product_list_detail\" );\n\t\tdelete_option( 'product_list_version' );\n\n\t\twp_clear_scheduled_hook('my_cron_event');\n\n\t}",
"public function removeOneProduct(array $unreportedProducts = null, Product $product)\n {\n if($unreportedProducts){\n \n foreach ($unreportedProducts as $key => $value){\n if($value == $product){\n array_splice($unreportedProducts, $key, 1);\n }\n }\n }\n \n return $unreportedProducts;\n }",
"public function deleteAction() {\r\n\r\n //DEFAULT LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //ONLY LOGGED IN USER CAN CREATE\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //GET WISHLIST ID\r\n $this->view->wishlist_id = $wishlist_id = $this->_getParam('wishlist_id');\r\n\r\n $wishlist = Engine_Api::_()->getItem('sitestoreproduct_wishlist', $wishlist_id);\r\n\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $viewer_id = $viewer->getIdentity();\r\n $level_id = $viewer->level_id;\r\n\r\n if ($level_id != 1 && $wishlist->owner_id != $viewer_id) {\r\n return $this->_forward('requireauth', 'error', 'core');\r\n }\r\n\r\n if ($this->getRequest()->isPost()) {\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n try {\r\n\r\n //DELETE WISHLIST CONTENT\r\n $wishlist->delete();\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRedirect' => $this->_helper->url->url(array('action' => 'browse'), \"sitestoreproduct_wishlist_general\", true),\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your wishlist has been deleted successfully.'))\r\n ));\r\n } else {\r\n $this->renderScript('wishlist/delete.tpl');\r\n }\r\n }",
"public function destroy(Products $products)\n {\n //\n }",
"public function ajaxRemoveProduct()\n\t{\n\n\t\t$modelUserCart = $this->getModel('usercart');\n\t\t$userId = $this->_getUserId();\n\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$produktID = $jinput->get('produktID');\n\t\t$quantity = $jinput->get('quantity');\n\t\t$produktEigenschaft = $jinput->get('produktEigenschaft');\n\n\t\tif (!JSession::checkToken('get'))\n\t\t{\n\n\t\t\techo new JResponseJson(null, JText::_('JINVALID_TOKEN'), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$modelUserCart->removeProductFromCard($userId, $quantity, $produktID,$produktEigenschaft);\n\t\t\tparent::display();\n\t\t}\n\t}",
"public function remove($items = array())\n {\n if (($this->_checkCartRemove($items) === TRUE) && isset($this->_session['products'][$items['token']]) )\n {\n $cart = $this->_session['products'][$items['token']];\n unset($this->_session['products'][$items['token']]);\n $this->trigger(CartEvent::EVENT_REMOVE_ITEM_POST, $items['token'], $cart, $this);\n }\n }",
"function tep_remove_order($order_id, $restock = false)\n{\n if ($restock == 'on')\n {\n $order_query = tep_db_query(\"select products_id, products_quantity from \" . TABLE_ORDERS_PRODUCTS . \" where orders_id = '\" . (int)$order_id . \"'\");\n\n while ($order = tep_db_fetch_array($order_query))\n {\n tep_db_query(\"update \" . TABLE_PRODUCTS . \" set products_quantity = products_quantity + \" . $order['products_quantity'] . \", products_ordered = products_ordered - \" . $order['products_quantity'] . \" where products_id = '\" . (int)$order['products_id'] . \"'\");\n }\n\n }\n\n tep_db_query(\"delete from \" . TABLE_ORDERS . \" where orders_id = '\" . (int)$order_id . \"'\");\n tep_db_query(\"delete from \" . TABLE_ORDERS_PRODUCTS . \" where orders_id = '\" . (int)$order_id . \"'\");\n tep_db_query(\"delete from \" . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . \" where orders_id = '\" . (int)$order_id . \"'\");\n tep_db_query(\"delete from \" . TABLE_ORDERS_STATUS_HISTORY . \" where orders_id = '\" . (int)$order_id . \"'\");\n tep_db_query(\"delete from \" . TABLE_ORDERS_TOTAL . \" where orders_id = '\" . (int)$order_id . \"'\");\n}",
"function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}",
"public static function removeSubshop()\n {\n /** @var Connection $dbal */\n $dbal = Shopware()->Container()->get('dbal_connection');\n $dbal->exec('DELETE FROM s_core_shops WHERE id=3');\n }",
"public function remove($id)\n {\n if ($product = $this->find($id)) {\n $this->_em->remove($product);\n $this->_em->flush();\n } \n }",
"function remove_woo_widgets() {\n unregister_widget( 'WC_Widget_Recent_Products' );\n unregister_widget( 'WC_Widget_Featured_Products' );\n unregister_widget( 'WC_Widget_Products' );\n unregister_widget( 'WC_Widget_Product_Categories' );\n unregister_widget( 'WC_Widget_Product_Tag_Cloud' );\n unregister_widget( 'WC_Widget_Cart' );\n unregister_widget( 'WC_Widget_Layered_Nav' );\n unregister_widget( 'WC_Widget_Layered_Nav_Filters' );\n //unregister_widget( 'WC_Widget_Price_Filter' );\n unregister_widget( 'WC_Widget_Top_Rated_Products' );\n unregister_widget( 'WC_Widget_Recent_Reviews' );\n unregister_widget( 'WC_Widget_Recently_Viewed' );\n unregister_widget( 'WC_Widget_Best_Sellers' );\n unregister_widget( 'WC_Widget_Onsale' );\n //unregister_widget( 'WC_Widget_Random_Products' );\n}",
"function wooninja_remove_items() {\n $remove = array( \n 'wc-reports', \n 'wc-addons',\n //'wc-settings',\n //'wc-status',\n 'edit.php?post_type=shop_coupon',\n //'edit.php?post_type=shop_order'\n );\n foreach ( $remove as $submenu_slug ) {\n remove_submenu_page( 'woocommerce', $submenu_slug );\n }\n}"
] | [
"0.74007094",
"0.71548766",
"0.7056988",
"0.70005465",
"0.6950766",
"0.68168914",
"0.67568266",
"0.66943336",
"0.66835916",
"0.6637678",
"0.6624468",
"0.6550092",
"0.651411",
"0.6482583",
"0.647431",
"0.6424571",
"0.64054626",
"0.6308022",
"0.6307046",
"0.6264277",
"0.6258784",
"0.62552136",
"0.62544376",
"0.62276024",
"0.62169725",
"0.6108203",
"0.6097418",
"0.6092917",
"0.6088266",
"0.6079718",
"0.60683006",
"0.60676056",
"0.6052343",
"0.60255456",
"0.60241807",
"0.5956631",
"0.595146",
"0.5947613",
"0.5924646",
"0.5915534",
"0.5897888",
"0.58941597",
"0.58915037",
"0.58835894",
"0.5864226",
"0.58553773",
"0.5836861",
"0.58352804",
"0.5831304",
"0.58274007",
"0.5767855",
"0.57632554",
"0.5715564",
"0.5688371",
"0.56787986",
"0.5672448",
"0.56707436",
"0.56663656",
"0.56663656",
"0.56625116",
"0.56480944",
"0.5646386",
"0.56362885",
"0.56293136",
"0.56279784",
"0.5625388",
"0.56181777",
"0.56175756",
"0.56143266",
"0.5610303",
"0.56101435",
"0.5606988",
"0.55975384",
"0.55974096",
"0.5594731",
"0.55805063",
"0.5569255",
"0.55687016",
"0.55676687",
"0.5548765",
"0.5546614",
"0.55455095",
"0.5530289",
"0.55253106",
"0.55247974",
"0.55053174",
"0.55053174",
"0.55051196",
"0.55048496",
"0.550375",
"0.5503683",
"0.5501206",
"0.5487377",
"0.5481717",
"0.5471185",
"0.54565275",
"0.54477495",
"0.54399425",
"0.5438452",
"0.54370445",
"0.5432592"
] | 0.0 | -1 |
Use an HTML button element for the cancel comment reply link. | function cancel_comment_reply_button($html, $link, $text) {
$style = isset($_GET['replytocom']) ? '' : ' style="display:none;"';
$button = '<button id="cancel-comment-reply-link" class="btn-tertiary caps" ' . $style . '>';
return $button . $text . '</button>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function new_get_cancel_comment_reply_link($text = '') {\n\tif ( empty($text) )\n\t\t$text = __('Click here to cancel reply.', 'italystrap');\n\n\t$style = isset($_GET['replytocom']) ? '' : ' style=\"display:none;\"';\n\t$link = esc_html( remove_query_arg('replytocom') ) . '#respond';\n\treturn apply_filters('new_cancel_comment_reply_link', '<a rel=\"nofollow\" id=\"cancel-comment-reply-link\" href=\"' . $link . '\"' . $style . ' class=\"btn btn-danger btn-sm\">' . $text . '</a>', $link, $text);\n}",
"protected function cancelLink()\n\t{\n\t\treturn '<p class=\"form-link-cancel\"><a href=\"/journal\">Back to Journal</a></p>';\n\t}",
"function cancel_comment_reply_link($link_text = '')\n {\n }",
"function get_cancel_comment_reply_link($link_text = '', $post = \\null)\n {\n }",
"public function render_cancel_link() {\n\n\t\tif ( ! $this->is_checkout_confirmation() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tprintf(\n\t\t\t'<a href=\"%1$s\" class=\"wc-' . sanitize_html_class( $this->get_gateway()->get_id_dasherized() ) . '-cancel\">%2$s</a>',\n\t\t\tesc_url( add_query_arg( array( 'wc_' . $this->get_gateway()->get_id() . '_clear_session' => true ), wc_get_cart_url() ) ),\n\t\t\tesc_html__( 'Cancel', 'woocommerce-gateway-paypal-powered-by-braintree' )\n\t\t);\n\t}",
"private function getCancelLink() {\n\t\t$cancelParams = array();\n\n\t\treturn Linker::linkKnown(\n\t\t\t$this->getContext()->getTitle(),\n\t\t\twfMessage( 'cancel' )->parse(),\n\t\t\tarray( 'id' => 'mw-editform-cancel' ),\n\t\t\t$cancelParams\n\t\t);\n\t}",
"public function actionCancel()\n {\n $this->render('cancel');\n }",
"private function cancelConfirmation()\n {\n Chat::$bot->editMessageText([\n 'text' => 'channel removing confirmation canceled',\n 'inline_message_id' => Chat::getCallBackQuery()->getInlineMessageId()\n ]);\n }",
"public function render_cancel_link($cmid) {\n global $USER;\n $sesskey = sesskey();\n $stractivityclipboard =\n strip_tags(get_string('activityclipboard', '', $USER->activitycopyname));\n $cancelurl = new moodle_url('view.php', array('cancelcopy' => true, 'id' => $cmid,\n 'sesskey' => $sesskey));\n\n $cancellink = html_writer::link($cancelurl, get_string('cancel'));\n $content = $stractivityclipboard . ' (' . $cancellink . ')';\n return html_writer::tag('div', $content, array('class' => 'clipboard'));\n }",
"public function createCancelElement( $name = 'cancel', $cancelLocation = null )\n {\n if( $cancelLocation === null )\n $cancelLocation = $this->cancelLocation;\n \n $cancel = new OSS_Form_Element_Buttonlink( $name );\n \n return $cancel->setAttrib( 'href', $cancelLocation )\n ->setAttrib( 'label', _( 'Cancel' ) );\n }",
"public function actionCancel()\n {\n }",
"function cancel() \r\n\t\t{\r\n\t $msg = JText::_('COM_QRCODE_CANCEL');\r\n\t $this->setRedirect(JRoute::_('index.php?option=com_qrcode', false), $msg);\r\n\t }",
"public function cancelAction() \n {\n \t\t$tblVote = Facebook_Vote::Table();\n\t\t$objSession = new App_Session_Namespace( 'facebook' );\n\t\t\n\t\tif ( is_object( $objSession )) {\n\t\t\t$nUserId = $objSession->user->fbu_id;\n\t\t\t$nVoteId = $this->_getIntParam( 'fbv_vote_id', 1 );\n\t\t\t\n\t\t\t$objVote = $tblVote->findVote( $nUserId, $nVoteId );\n\t\t\tif ( is_object( $objVote ) ) {\n \t\t\t\t$objVote->delete();\n\t\t\t}\n\t\t}\n\t\t$this->view->return = $this->_getParam( 'return' );\n }",
"function make_cancel_button($purchase_id)\n\t{\n\t\treturn do_template('ECOM_CANCEL_BUTTON_VIA_PAYPAL',array('PURCHASE_ID'=>$purchase_id));\n\t}",
"public function cancel()\n\t{\n\t\t$option = JRequest::getVar('option');\n\t\t$Itemid = JRequest::getVar('Itemid');\n\n\t\t$link = JRoute::_('index.php?option=' . $option . '&view=cart&Itemid=' . $Itemid, false); ?>\n\t\t<script language=\"javascript\">\n\t\t\twindow.parent.location.href = \"<?php echo $link ?>\";\n\t\t</script>\n\t\t<?php exit;\n\t}",
"function krnEmit_button_editSubmit($caption, $value) {\n // used twice in set security\n // submit for editing - so all are consistent - (design choices:Edit button - caption - caption button that looks like link)\n //?????????? if report should not be coded as button ??????????????????????\n //$cellClass = empty($cellClass) ? '' : ' class=\"'.$class.'\"';\n return '<button type=\"submit\" class=\"kcmKrn-button-editLink\" name=\"submit\" value=\"'.$value.'\">' . $caption . '</button>';\n}",
"function cancel() {\n\n\t\tif (KRequest::getVar('return')) {\n\t\t\t$url = KLink::base64UrlDecode(KRequest::getVar('return'));\n\t\t}\n\t\telse {\n\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t$url = KLink::getRoute('index.php?option='.$this->component.'&controller='.$controllerName, false);\n\t\t}\n\n\t\t$this->setRedirect($url);\n\n\t}",
"public function paypal_cancel() {\n\t\t\t// on va donc chercher son adresse mail\n\t\t\t$user = $this->User->find('first', array(\n\t\t\t\t'conditions'=>array('id'=>$this->Auth->user('id')),\n\t\t\t\t'fields'=>array('mail')\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// et on lui envoie le mail de confirmation pour son annulation\n\t\t\tApp::uses('CakeEmail', 'Network/Email');\n\t\t\t$email = new CakeEmail('gmail');\n\t\t\t$email->to($user['User']['mail']) // à qui ? $this->Auth->user('mail')\n\t\t\t\t ->from(Configure::read('Site_Contact.mail')) // par qui ?\n\t\t\t\t ->subject('Votre demande a été annulée') // sujet du mail\n\t\t\t\t ->emailFormat('html') // le format à utiliser\n\t\t\t\t ->template('paypal_cancel') // le template à utiliser\n\t\t\t\t ->send(); // envoi du mail\n\n\t\t\t$this->Session->setFlash(__(\"Votre demande a été annulée\"), 'success');\n\t\t\t$this->redirect(array('controller'=>'posts', 'action'=>'index'));\n\t\t}",
"public function cancel()\n {\n $message = new MailMessage;;\n $message->greeting(\"Hi {$this->post->user->name}!\");\n $message->line(\"The post {$this->post->titile} has been cancelled successfully.\"); \n foreach ($this->workflow as $key => $value) {\n if ($key == 0) {\n $message->action($value->action, url('workflows/workflow/' . $value->id));\n continue;\n }\n $message->line('<a href=\"'.url('workflows/workflow/' . $value->id).'\">'.$value->action.'</a>');\n }\n\n return $message;\n }",
"function reply_button() {\n\t\t\n\t\treturn \" <input type=image name=submit src=\\\"images/reply.jpg\\\" \n\t\twidth=45 height=23 border=0 align=middle>\";\n}",
"protected function _getCancelUrl()\n {\n return $this->getUrl('*/*/cancel', array('agreement' => $this->_getBillingAgreement()->getAgreementId()));\n }",
"public function cancel()\n {\n $this->confirmationArchived = false;\n }",
"public function add_edit_activity_comment_button() {\r\n\r\n\t\tglobal $activities_template;\r\n\t\t\r\n\t\tif ( yzea_is_activity_editable( $activities_template->activity ) ) {\r\n\r\n\t\t\t?>\r\n\r\n\t\t\t<a class=\"bp-secondary-action yz-edit-activity\" data-activity-id=\"<?php echo $activities_template->activity->current_comment->id;?>\" data-activity-type=\"activity_comment\"><?php _e( 'Edit', 'youzer-edit-activity' ); ?>\r\n\t\t\t</a>\r\n\r\n\t\t\t<?php \r\n\t\t}\r\n\t}",
"public function getCancelUrl()\n {\n return Mage::getUrl('payulite/processing/cancel', array('_secure' => true, 'order' => '{{ORDER_ID}}'));\n }",
"public function cancelUrl(): string\n {\n return Request::url() . '?' . http_build_query([\n 'return' => 'cancel',\n 'oc-mall_payment_id' => $this->getPaymentId(),\n ]);\n }",
"function backend_ctr_button($caption, $button_class, $attributes = array(), $ajaxHandler=null, $ajaxParams = null, $formElement = null)\n\t{\n\t\treturn Backend_Html::ctr_button($caption, $button_class, $attributes, $ajaxHandler, $ajaxParams, $formElement);\n\t}",
"public function cancel(): void;",
"function getButton_addComment() {\r\r\n\t$PView = new PView;\r\r\n\t// PERMISSION!!!\r\r\n\tif ($PView -> getPermission(\"config\",\"permComment\",\"\")) {\r\r\n\t\tif (!$_GET['comment'] && !$_POST['submit']) {\r\r\n\t\t\t$btn = \"<a href='javascript:pv_CommentAdd();'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/comment_add.png' border='0px'alt='\".LAN_IMAGE_18.\"' title='\".LAN_IMAGE_18.\"'></a>\";\r\r\n\t\t}\r\r\n\t}\r\r\n\treturn $btn;\r\r\n}",
"function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t// Checkin the weblink\n\t\t$model = $this->getModel('weblink');\n\t\t$model->checkin();\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}",
"function rt_button_delete($target)\n{\n return rt_ui_button('delete', $target, 'trash', array('method' => 'post', 'confirm' => 'Are you sure?'));\n}",
"function getButton_editComment($commentid) {\r\r\n\t$PView = new PView;\r\r\n\t// PERMISSION!!!\r\r\n\tif ($PView -> getPermission(\"config\",\"permComment\",\"\")) {\r\r\n\t$btn = \"<a href='pviewgallery.php?image=\".$_GET['image'].\"&comment=\".$commentid.\"#a_preview'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/comment_edit.png' border='0px'alt='\".LAN_IMAGE_19.\"' title='\".LAN_IMAGE_19.\"'></a>\";\r\r\n\t}\r\r\n\treturn $btn;\r\r\n}",
"public function cancel()\n {\n }",
"public function cancel()\n {\n }",
"protected function cancel(): void\n {\n }",
"public function get_cancel_url() {\n\t\t$cancel_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'cancel',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $cancel_url;\n\t}",
"public function cancel()\n {\n $post = $_REQUEST;\n $model = & $this->getModel('jms');\n $model->cancelSubscription($post);\n $this->setRedirect('index.php?option=com_jms&view=jms&layout=cancel&id=' . $post['id'] . '&plan_id=' . $post['plan_id']);\n }",
"function voyage_mikado_comment_form_submit_button() {\n\n $comment_form_button = voyage_mikado_get_button_html(array(\n 'html_type' => 'input',\n 'type' => 'solid',\n 'text' => esc_html__('Submit', 'voyage'),\n 'input_name' => 'submit'\n ));\n\n return $comment_form_button;\n\n }",
"public function cancel();",
"public function handleCancel() {\n // logit('HC: ' . print_r($this->data, true));\n if ($this->data['submit_button'] == 'Cancel') {\n $this->data = array();\n $this->error = array();\n $this->_redirector->gotoUrl($this->mainpage);\n }\n }",
"function filter_comment_reply_link( $args_before_link_args_after, $args, $comment, $post ) { \n // make filter magic happen here... \n if (!is_user_logged_in()) {\n \treturn '<a class=\"tg-btn\" href=\"javascript:;\" data-toggle=\"modal\" data-target=\".tg-user-modal\">'.pll__('Login to reply').'</a>'; \n }else {\n \treturn $args_before_link_args_after;\n }\n}",
"function form_content_buttons()\r\n {\r\n return $this->form_content_buttons_Confirm_Cancel() ;\r\n }",
"function wpb_comment_reply_text( $link ) {\n$link = str_replace( 'Reply', '<i class=\"icon-reply\"></i>', $link );\nreturn $link;\n}",
"public function editFormCancelled(\\Nette\\Forms\\SubmitButton $btn) {\n $this->redirect('default');\n }",
"function cancelObject($in_rep = false)\n\t{\n\t\tilUtil::sendInfo($this->lng->txt('msg_cancel'), true);\n\t\t// TODO: check this\n\t\tilUtil::redirect('repository.php?cmd=frameset&ref_id='.$_GET['ref_id']);\n\t}",
"public function getCancelUrl() {\n return $this->getReturnUrl();\n }",
"function button( $attr, $content = null ) {\n // if have anchor inside, add button class\n if(preg_match( '/<a (.+?)>/', $content, $match ) ) {\n $content = substr_replace( $content, ' class=\"button\" ', 3, 0 );\n }\n // else, make it into do-nothing button\n else { $content = '<a class=\"button\">' . $content . '</a>'; }\n\n return wpautop( $content );\n }",
"public function getCancelUrl()\n {\n // TODO: Implement getCancelUrl() method.\n }",
"private function getCaptionButton()\n\t{\t\t\n\t\t\n\t\t$link = '<input type=\"button\" onclick=\"editCaption(';\n\t\t$link .= $this->aImg['albumId'].', '.$this->aImg['id'].');\" value=\"%s\"/>';\n\t\t\n\t\tif($this->aImg['sCaption'])\n\t\t{\n\t\t\t$link = sprintf(\n\t\t\t\t$link,\t\t\t\t\n\t\t\t\t$this->TXT_LINK_EDIT\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$link = sprintf(\n\t\t\t\t$link,\t\t\t\t\n\t\t\t\t$this->TXT_LINK_ADD\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $link;\n\t}",
"public final function addCancelButton(array $options = [])\n {\n $this->setConfigurationWith('__buttons_have_cancel', true);\n $this->setConfigurationWith(self::ACTIONS_CANCEL, $options);\n return $this;\n }",
"function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = & JFactory::getApplication();\n\n\t\t// Clear the link id from the session.\n\t\t$app->setUserState('redirect.edit.link.id', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_redirect&view=links', false));\n\t}",
"function medigroup_mikado_comment_form_submit_button() {\n\n $comment_form_button = medigroup_mikado_get_button_html(array(\n 'html_type' => 'input',\n 'type' => 'solid',\n 'text' => esc_html__('Submit', 'medigroup'),\n 'input_name' => 'submit'\n ));\n\n return $comment_form_button;\n\n }",
"function cancel()\n\t{\n\t\t// Initialize some variables\n\t\t$db = & JFactory::getDBO();\n\t\t$user = & JFactory::getUser();\n\n\t\t// Get an article table object and bind post variabes to it [We don't need a full model here]\n\t\t$article = & JTable::getInstance( 'content' );\n\t\t$article->bind( JRequest::get( 'post' ) );\n\n\t\tif ( $user->authorize( 'com_content', 'edit', 'content', 'all' ) || ($user->authorize( 'com_content', 'edit', 'content', 'own' ) && $article->created_by == $user->get( 'id' )) )\n\t\t{\n\t\t\t$article->checkin();\n\t\t}\n\n\t\t// If the task was edit or cancel, we go back to the content item\n\t\t$referer = JRequest::getString( 'ret', base64_encode( JURI::base() ), 'get' );\n\t\t$referer = base64_decode( $referer );\n\t\tif ( !JURI::isInternal( $referer ) )\n\t\t{\n\t\t\t$referer = '';\n\t\t}\n\t\t$this->setRedirect( $referer );\n\n\t}",
"function backend_button($caption, $attributes = array(), $ajaxHandler=null, $ajaxParams = null, $formElement = null)\n\t{\n\t\treturn Backend_Html::button($caption, $attributes, $ajaxHandler, $ajaxParams, $formElement);\n\t}",
"function ea_comment_form_button_class( $args ) {\n\t$args['class_submit'] = 'submit wp-block-button__link';\n\treturn $args;\n}",
"function backend_ctr_ajax_button($caption, $button_class, $ajaxHandler, $attributes = array(), $ajaxParams = null)\n\t{\n\t\treturn Backend_Html::ctr_ajaxButton($caption, $button_class, $ajaxHandler, $attributes, $ajaxParams);\n\t}",
"public function setCancelUrl($url) {\n\t\t$this->_url_cancel = $url;\n\t}",
"function form_button_link($value, $url, $blank='', $prevent_double = false, $js = '') {\n\n\tif ($blank) {\n\t\t$action = \"openWindow2('$url');\";\n\t} else {\n\t\t$action = \"window.location='$url';\";\n\t}\n\n\tif ($prevent_double) {\n\t\t$action .= \"this.disabled=true;\";\n\t}\n\n\tif ($js) {\n\t\t$action = \"var cancelproceed = false; $js if (!cancelproceed) { $action }\";\n\t}\n\n\treturn \"<input type=\\\"button\\\" name=\\\"$value\\\" value=\\\"$value\\\" onclick=\\\"$action\\\" />\";\n\n}",
"function genesis_sample_comment_form_button_class( $args ) {\n\t$args['class_submit'] = 'submit wp-block-button__link';\n\treturn $args;\n}",
"public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}",
"public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect($this->getReturnPage());\n\t}",
"public function cancel($key = 'a_id')\n\t{\n\t\tparent::cancel($key);\n\n\t\t// Redirect to the return page.\n\t\t$this->setRedirect(JRoute::_($this->getReturnPage()));\n\t}",
"public function cancelAction()\n {\n $event = Mage::getModel('payanyway/event')\n ->setEventData($this->getRequest()->getParams());\n $message = $event->cancelEvent();\n\n // set quote to active\n $session = $this->_getCheckout();\n if ($quoteId = $session->getPayanywayQuoteId()) {\n $quote = Mage::getModel('sales/quote')->load($quoteId);\n if ($quote->getId()) {\n $quote->setIsActive(true)->save();\n $session->setQuoteId($quoteId);\n }\n }\n $session->addError($message);\n $this->_redirect('checkout/cart');\n }",
"public function cancelAction() {\n\n return $this->_redirect('/order_basis/payment');\n }",
"function protocol_button($element) {\n if (isset($element['#attributes']['class'])) {\n $element['#attributes']['class'] = 'form-' . $element['#button_type'] . ' ' . $element['#attributes']['class'];\n }\n else {\n $element['#attributes']['class'] = 'form-' . $element['#button_type'];\n }\n\n return '<div class=\"button-wrapper-outer\"><div class=\"button-wrapper\"><input type=\"submit\" ' . (empty($element['#name']) ? '' : 'name=\"' . $element['#name'] . '\" ') . 'id=\"' . $element['#id'] . '\" value=\"' . check_plain($element['#value']) . '\" ' . drupal_attributes($element['#attributes']) . \" /></div></div>\\n\";\n}",
"protected function _actionCancel(KCommandContext $context)\n\t{\n\t\t$post\t= $this->getModel()->getItem();\n\n\t\t$isset\t= array(\n\t\t\t'post'\t=> $post->id,\n\t\t\t'topic' => isset($this->_request->topic) && $this->_request->topic,\n\t\t\t'forum'\t=> isset($this->_request->forum) && $this->_request->forum\n\t\t);\n\n\t\tif($isset['post']) {\n\t\t\t$append = $this->_redirect_hash ? '#p'.$post->id : '';\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=topic&id='.$post->ninjaboard_topic_id.'&post='.$post->id.$append;\n\t\t\t\n\t\t} elseif($isset['topic']) {\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=topic&id='.$this->_request->topic;\n\t\t} elseif($isset['forum']) {\n\t\t\t$this->_redirect = 'index.php?option=com_ninjaboard&view=forum&id='.$this->_request->forum;\n\t\t} else {\n\t\t\tparent::_actionCancel($context);\n\t\t}\n\t\t\n\t\treturn $post;\n\t}",
"public function getCancelReason()\n {\n return $this->cancel_reason;\n }",
"function form_content_buttons()\r\n {\r\n return $this->form_content_buttons_Delete_Cancel() ;\r\n }",
"function rt_button_undelete($target)\n{\n return rt_ui_button('undelete', $target, 'trash', array('method' => 'post'));\n}",
"protected function _renderCloseButton()\n\t{\n\t\tif( $closeButton = $this->closeButton ) {\n\t\t\t\n\t\t\t$tag = ArrayHelper::remove( $closeButton, 'tag', 'button' );\n\t\t\t$label = ArrayHelper::remove( $closeButton, 'label', '×' );\n\t\t\t\n\t\t\tif( $tag === 'button' && !isset( $closeButton['type'] ) ) {\n\t\t\t\t$closeButton['type'] = 'button';\n\t\t\t}\n\t\t\t\n\t\t\treturn Html::tag( $tag, $label, $closeButton );\n\t\t}\n\t\t\n\t}",
"public function actionCancelconvert() {\n if (!empty($_POST['id']))\n {\n\t CConvertQueue::model()->deleteUserQueue($this->user_id, $_POST['id']);\n }\n }",
"public function cancelAction()\n\t{\n\t\t$this->_redirect('checkout/onepage/failure');\n\t}",
"function rt_ui_button($label, $target, $icon, $options = array())\n{\n $options['class'] = 'new ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary';\n $content = sprintf('<span class=\"ui-button-icon-primary ui-icon ui-icon-%s\"></span><span class=\"ui-button-text\">%s</span>', $icon, $label);\n return link_to($content, $target, $options);\n}",
"function mc_close_button( $html ) {\n\t/**\n\t * Example using WordPress dashicons\n\t */\n\t$return = '<span class=\"dashicons dashicons-close\" aria-hidden=\"true\"></span><span class=\"screen-reader-text\">Close</span>';\n\t/**\n\t * Example using custom image\n\t */\n\t$return = '<img src=\"/path/to/my/custom-icon.png\" alt=\"Close\" />';\n\t\n\treturn $return;\n}",
"public function getCommentsButton($row, $href, $label, $title, $icon, $attributes)\n\t{\n\t\tif($row['comment'] < 1)\n\t\t{\n\t\t\t$icon = str_replace('comments','comments_',$icon);\n\t\t\treturn '<span title=\"'.specialchars($title).'\"'.$attributes.'>'.\\Image::getHtml($icon, $label).'</span> ';\n\t\t}\n\t\t\n\t\treturn '<a href=\"'.$this->addToUrl($href.'&id='.$row['comment']).'\" title=\"'.specialchars($title).'\"'.$attributes.'>'.\\Image::getHtml($icon, $label).'</a> ';\n\t}",
"public function reply($reply_link) {\r\n\t\t $comment_ID = '#comment-' . get_comment_ID();\r\n\t\t $comment_author = esc_html(get_comment_author());\r\n\t\t $r2_reply_link = 'onclick=\\'return r2_replyTwo(\"' . $comment_ID . '\", \"' . $comment_author . '\"),';\r\n\t\t return str_replace(\"onclick='return\", \"$r2_reply_link\", $reply_link);\r\n\t}",
"public function cancelThis($id, $data) {\n $this->db->update('tbl_order', array('deliver' => 3, 'cancel_comments' => $data), array('id' => $id));\n }",
"function layout_builder_post_update_cancel_link_to_discard_changes_form() {\n // Empty post-update hook.\n}",
"public function getConfirmCancelTopic()\n {\n return view('teacher.confirmcancel', ['topics' => $this->topic->getTopicCancel()]);\n }",
"public function getCancelType()\n {\n return $this->cancelType;\n }",
"function cancel() {\r\n\t\t$this->setRedirect ( 'index.php' );\r\n\t}",
"function cancel()\n\t{\n\t\tif ($_GET[\"obj_id\"] != 0)\n\t\t{\n\t\t\tif ($_GET[\"new_type\"] == \"pg\")\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"view\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->ctrl->redirect($this, \"subchap\");\n\t\t\t}\n\t\t}\n\t}",
"public function cancel(){\n\t\t$this->getBasics();\n\t\t$this->getParams();\n\t\t$this->getLanguage();\n\n\t\t// load additonal language (for breadcrumbs)\n\t\t$this->language->load( 'checkout/success' );\n\n\t\t$this->load->library( 'encryption' );\n\t\t$encryption = new Encryption( $this->config->get( 'config_encryption' ) );\n\n\t\t// get order id\n\t\tif( isset( $this->request->get['order_id'] ) ) {\n\t\t\t$order_id = $encryption->decrypt( $this->request->get['order_id'] );\n\t\t}else{\n\t\t\t$order_id = 0;\n\t\t}\n\n\t\t// get project id\n\t\t$project_id = $this->getRequest( 'pid', 0 );\n\n\t\t// write log\n\t\t$msg = sprintf( $this->language->get( 'text_log_return_cancel'), $project_id, $order_id );\n\t\t$this->writeLog( $msg, 4 );\n\n\t\t$this->data['heading_title']\t= $this->language->get( 'text_cancel' );\n\t\t$this->data['text_message']\t\t= sprintf(\n\t\t\t$this->language->get( 'text_cancel_message' ),\n\t\t\t$this->buildUrl( 'information/contact' )\n\t\t);\n\t\t$this->data['button_continue']\t= $this->language->get( 'button_continue' );\n\t\t$this->data['continue']\t\t\t= $this->buildUrl( 'common/home' );\n\n\t\tif( $this->_ocversion == '1.4' ) {\n\t\t\t$breadcrumbs = array(\n\t\t\t\tarray(\n\t\t \t'href' => $this->buildUrl( 'common/home' ),\n\t\t \t'text' => $this->language->get( 'text_home' ),\n\t\t \t'separator' => false\n\t\t \t),\n\t\t \tarray(\n\t\t \t'href' => $this->buildUrl( 'checkout/cart' ),\n\t\t \t'text' => $this->language->get( 'text_basket' ),\n\t\t \t'separator' => $this->language->get( 'text_separator' )\n\t\t \t)\n\t\t\t);\n\n\t\t\tif( $this->customer->isLogged() ) {\n\t\t\t\t$breadcrumbs_add = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/shipping' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_shipping' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/payment' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_payment' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/confirm' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_failed' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$breadcrumbs_add = array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/guest' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_guest' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'href' => $this->buildUrl( 'checkout/guest/confirm' ),\n\t\t\t\t\t\t'text' => $this->language->get( 'text_failed' ),\n\t\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$breadcrumbs = array_merge( $breadcrumbs, $breadcrumbs_add );\n\n\t \t$breadcrumbs[] = array(\n\t \t'href' => $this->buildUrl( 'checkout/success' ),\n\t \t'text' => $this->language->get( 'text_failed' ),\n\t \t'separator' => $this->language->get( 'text_separator' )\n\t \t);\n\t\t}else{\n\t\t\t$breadcrumbs = array(\n\t\t\t\tarray(\n\t\t\t\t\t'href' => $this->buildUrl( 'common/home' ),\n\t\t \t'text' => $this->language->get( 'text_home' ),\n\t\t \t'separator' => false\n\t\t\t\t),\n\t \tarray(\n\t\t \t'href' => $this->buildUrl( 'checkout/cart' ),\n\t\t \t'text' => $this->language->get( 'text_basket' ),\n\t\t \t'separator' => $this->language->get( 'text_separator' )\n\t\t \t),\n\t\t \tarray(\n\t\t\t\t\t'href' => $this->buildUrl( 'checkout/checkout', '', 'SSL' ),\n\t\t\t\t\t'text' => $this->language->get( 'text_checkout' ),\n\t\t\t\t\t'separator' => $this->language->get( 'text_separator' )\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t \t'href' => $this->buildUrl( 'checkout/success' ),\n\t\t \t'text' => $this->language->get( 'text_failed' ),\n\t\t \t'separator' => $this->language->get( 'text_separator' )\n\t\t \t)\n\t \t);\n\t\t}\n\n\t\t$this->getTemplate( '/template/common/success.tpl' );\n\t\t$this->buildBreadcrumbs( $breadcrumbs );\n\t\t$this->buildTitle( $this->language->get( 'text_cancel' ) );\n\t\t$this->getChildren();\n\t\t$this->buildResponse();\n\t}",
"function backend_ajax_button($caption, $ajaxHandler, $attributes = array(), $ajaxParams = null)\n\t{\n\t\treturn Backend_Html::ajaxButton($caption, $ajaxHandler, $attributes, $ajaxParams);\n\t}",
"public function cancel () {\n\t\t$this->opts['cancel'] = true;\n\t\treturn $this;\n\t}",
"public function actionCancel() {\n $token = trim($_GET['token']);\n// $payerId = trim($_GET['PayerID']);\n $criteria = new CDbCriteria;\n $criteria->condition = 'token=:Tokenw';\n $criteria->params = array(':Tokenw' => $token);\n $orders = Orders::model()->find($criteria);\n if ($orders->status_id == '4') {\n $orders->status_id = '2';\n $orders->save();\n// need to clear cart\n//Yii::app()->shoppingCart->clear();\n }\n $this->render('cancel');\n }",
"public function cancel()\n {\n $this->resetInput();\n $this->updateMode = false;\n }",
"function reply_form($btnText = 'Reply', $errorMsg = 'Please log in to reply') {\n\tglobal $discussion_title;\n\n\tif (auth::isLoggedIn()) {\n\t\techo '\n\t\t<form name=\"input\" action=\"' . BASE . 'discussion' . DS . discussion::encode_title($discussion_title) . DS . 'reply' . '\" method=\"post\">\n\t\t\t<textarea rows=\"7\" placeholder=\"Just type...\" name=\"content\" class=\"boxsizingBorder\"></textarea><br/>\n\t\t\t<input type=\"submit\" class=\"submit small\" value=\"' . $btnText .'\"/>\n\t\t</form>\n\t\t';\n\t} else {\n\t\techo '<a href=\"http://' . getenv(DOMAIN_NAME) . BASE . 'login' . '\">' . $errorMsg . '</a>';\n\t}\n}",
"protected function renderCloseButton()\r\n {\r\n if ($this->closeButton !== false) {\r\n $tag = ArrayHelper::remove($this->closeButton, 'tag', 'button');\r\n $label = ArrayHelper::remove($this->closeButton, 'label', '×');\r\n $label = Html::tag('span', $label, ['aria-hidden' => 'true']);\r\n if ($tag === 'button' && !isset($this->closeButton['type'])) {\r\n $this->closeButton['type'] = 'button';\r\n }\r\n\r\n ArrayHelper::remove($this->closeButton, 'aria-hidden');\r\n $this->closeButton['aria-label'] = Yii::t('app', 'Close');\r\n\r\n return Html::tag($tag, $label, $this->closeButton);\r\n } else {\r\n return null;\r\n }\r\n }",
"public function cancel()\n\t{\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->setRedirect('index.php');\n\t}",
"function rt_button_edit($target)\n{\n return rt_ui_button('edit', $target, 'pencil');\n}",
"function print_embed_comments_button()\n {\n }",
"function media_button() {\n global $post;\n\n if( WP_Dummy_Admin::is_in_post_page() ) {\n $thickbox_url = '#TB_inline?width=753&height=578&inlineId=lipsum-generator';\n echo '<a href=\"'. $thickbox_url .'\" class=\"button add-lipsum-dummy\" id=\"add-lipsum-dummy\" title=\"' . esc_attr__( 'Lipsum Generator', 'colabsthemes' ) . '\" onclick=\"return false;\">'. __('Lipsum Generator', 'colabsthemes') .'</a>';\n }\n }",
"protected function _cancelOperation() {}",
"public function no_button() { $this->button = NULL; }",
"function cancel()\n\t{\n\t\t// Get some objects from the JApplication\n\t\t$user\t= & JFactory::getUser();\n\n\t\t// Must be logged in\n\t\tif ($user->get('id') < 1) {\n\t\t\tJError::raiseError(403, JText::_('ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\t// Checkin the weblink\n\t\t$model = $this->getModel('weblink');\n\t\t$model->checkin();\n\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_weblinks&view=categories', false));\n\t}",
"public function cancel($value) {\n return $this->setProperty('cancel', $value);\n }",
"public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }",
"public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }",
"function register_block_core_comment_reply_link()\n {\n }",
"public function actionCancel($id)\n {\n // $this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->approved = 'cancelled';\n $model->status = 0;\n if ( $model->save() ) {\n Yii::$app->getSession()->setFlash('success', 'Quotation Cancelled');\n } else {\n Yii::$app->getSession()->setFlash('danger', 'Unable to cancel the Quotation');\n }\n\n return $this->redirect(['index']);\n }"
] | [
"0.762003",
"0.73364586",
"0.71633077",
"0.70650524",
"0.6897232",
"0.66169274",
"0.6498056",
"0.61661035",
"0.5992846",
"0.5990402",
"0.5870972",
"0.58622366",
"0.5824604",
"0.58053654",
"0.57741654",
"0.5752422",
"0.5739285",
"0.57126486",
"0.57039523",
"0.57039434",
"0.56849897",
"0.5676667",
"0.5670734",
"0.56645286",
"0.5617286",
"0.56163186",
"0.5609105",
"0.55886376",
"0.5587285",
"0.55769175",
"0.5574586",
"0.556945",
"0.556945",
"0.55578",
"0.5549701",
"0.5523959",
"0.54981315",
"0.5441012",
"0.5426326",
"0.54232985",
"0.5415626",
"0.5409919",
"0.5408422",
"0.5406083",
"0.5402406",
"0.53850687",
"0.5376938",
"0.53686523",
"0.5367973",
"0.5354633",
"0.5354259",
"0.5338578",
"0.531857",
"0.53168863",
"0.529733",
"0.5291502",
"0.5289447",
"0.52623564",
"0.52616316",
"0.52616316",
"0.52529037",
"0.52345127",
"0.52286774",
"0.5221518",
"0.5210881",
"0.5209381",
"0.5207015",
"0.5191312",
"0.5190933",
"0.5187236",
"0.51869255",
"0.5182669",
"0.5169273",
"0.5148459",
"0.51283264",
"0.51182735",
"0.51166373",
"0.5092575",
"0.5092408",
"0.5088665",
"0.5076151",
"0.5075505",
"0.5071626",
"0.50698996",
"0.5069423",
"0.50654256",
"0.5061281",
"0.50611275",
"0.50564",
"0.50563407",
"0.5045374",
"0.5041585",
"0.5037042",
"0.5028491",
"0.5027844",
"0.50278413",
"0.5014227",
"0.5014227",
"0.50052685",
"0.49950683"
] | 0.83585376 | 0 |
Create a new controller instance. | public function __construct(Request $request)
{
$this->request = $request;
} | {
"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ó 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 |
Permite obtener el listado de tipos de red | public function index()
{
return response()->json([
'data' => TypeNetwork::all()
], Response::HTTP_OK);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function listaTipos(){\n\t\t$query = 'Select GRAL_PAR_PRO_ID, GRAL_PAR_PRO_DESC, GRAL_PAR_PRO_COD\n\t\t\t\t From gral_param_propios \n\t\t\t\t where GRAL_PAR_PRO_GRP = 1500 and GRAL_PAR_PRO_COD <> 0';\n\t\treturn $this->mysql->query($query);\n\t}",
"public function getClothcoloridsList(){\n return $this->_get(39);\n }",
"public function getColorListAttribute()\n {\n $colors = $this->colors()->lists('name')->all();\n // retorno as tags separadas por uma virgula e um espaço.\n return $colors;\n }",
"private function getFiltroTiposRefeicao()\n {\n return (array) $this->filtros['tipo_refeicao'];\n }",
"public function getTipidList(){\n return $this->_get(3);\n }",
"public function getTipos() {\r\n $this->db->select('*');\r\n $this->db->from('tipo');\r\n return $this->db->get()->result();\r\n }",
"public function getTipos()\n {\n return [\n 'General' => 'General',\n 'Problema técnico' => 'Problema técnico',\n 'Error de traducción' => 'Traducción',\n 'Otras' => 'Otras',\n ];\n }",
"function consulta_lista_colores()\n {\n\n\t $con = new DBmanejador;\n if($con->conectar()==true)\n {\n\t\t $consulta= 'SELECT * FROM tcolores';\n $resultado=mysql_query($consulta) or die('La consulta falló: ' . mysql_error());\n\n\n\t\t \tif (!$resultado) return false;\n\t\t \telse\n\t\t \t{ $contador=0;\n\n\t\t\t\t\twhile($row = mysql_fetch_array($resultado))\n\t\t\t\t\t{\n \t\t\t\t \t\t$respuesta[$contador][\"codigo\"]= $row['color_id'];\n\t\t\t\t\t\t$respuesta[$contador][\"descripcion\"]= $row['descripcion'];\n\t\t\t\t\t\t$respuesta[$contador][\"coleccion\"]= $row['coleccion'];\n \t\t$contador=$contador+1;\n\n \t\t\t\t\t}\n\n\t\t \treturn $respuesta;\n\t\t \t}\n\t\t }\n }",
"public function getLabelsList(){\n return $this->_get(2);\n }",
"public function getLabelsList(){\n return $this->_get(6);\n }",
"function mostrar_colores_producto(){\n\t\tif (isset($_GET['id']) && $_GET['id']!=\"\"){\n\t\t\t$id=$_GET['id'];\n\t\t\t$sql=\"SELECT * FROM colorxpro, color WHERE producto_cxp='$id' AND id_color=color_cxp ORDER BY id_color ASC\";\n\t\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t\t$this->mensaje=\"si\";\n\t\t\t\t$this->listado[] = $resultado;\n\t\t\t}\n\t\t} \n\t}",
"public function getTiposProyecto()\r\n {\r\n $datos = array();\r\n $consulta = $this->encontrar('cat_tipos_proyecto', array('Flag' => '1'));\r\n if (!empty($consulta)) {\r\n foreach ($consulta as $value) {\r\n array_push($datos, array('Id' => $value['Id'], 'Nombre' => $value['Nombre']));\r\n }\r\n }\r\n return $datos;\r\n }",
"public function listattr_cat()\n {\n $this->db->where('descripcion_atributo', 'Catalogo');\n $resultados = $this->db->get('atributos_b');\n\n return $resultados->result();\n }",
"function listar_lse_color($registrado,$id_tipo,$letra,$filtrado,$orden,$id_subtema) {\n\t\n\t\tif ($registrado==false) {\n\t\t\t$mostrar_registradas=\"AND imagenes.registrado=0\";\n\t\t}\n\t\t\n\t\tif ($id_tipo==99) { $sql_tipo=''; } \n\t\telse { $sql_tipo='AND palabras.id_tipo_palabra='.$id_tipo.''; }\n\t\t\n\t\tif ($id_subtema==99999) { \n\t\t\t$sql_subtema=''; \n\t\t\t$subtema_tabla='';\n\t\t\t$subtema_tabla_from='';\n\t\t} \n\t\telse { \n\t\t\t$sql_subtema='AND palabra_subtema.id_palabra=palabras.id_palabra\n\t\tAND palabra_subtema.id_subtema='.$id_subtema.''; \n\t\t\t$subtema_tabla=',palabra_subtema.*';\n\t\t\t$subtema_tabla_from=', palabra_subtema';\n\t\t\n\t\t}\n\t\t\n\t\tif ($letra==\"\") { $sql_letra=''; } \n\t\telse { $sql_letra=\"AND palabras.palabra LIKE '$letra%%'\"; }\n\t\t\n\t\tif ($filtrado==1) { $sql_filtrado='imagenes.ultima_modificacion'; } \n\t\telseif ($filtrado==2) { $sql_filtrado='palabras.palabra'; }\n\t\t\n\t\t$query = \"SELECT DISTINCT palabra_imagen.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabras.* $subtema_tabla\n\t\tFROM palabra_imagen, imagenes, palabras $subtema_tabla_from\n\t\tWHERE imagenes.estado=1\n\t\tAND palabras.id_palabra=palabra_imagen.id_palabra\n\t\t$sql_letra\n\t\t$sql_tipo\n\t\t$sql_subtema\t\n\t\tAND imagenes.id_tipo_imagen=12\n\t\tAND palabra_imagen.id_imagen=imagenes.id_imagen\n\t\t$mostrar_registradas\n\t\tORDER BY $sql_filtrado $orden\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t\t\n\t}",
"function colorList() {\n $colorArr = (new \\yii\\db\\Query())\n ->select(['color'])\n ->from('product_variation')\n ->where(['!=', 'color', ''])\n ->groupBy(['color'])\n ->all();\n return $colorArr;\n }",
"public function getTipos(){\n $sql = \"SELECT * FROM tipos_producto ORDER BY nombre\";\n #se guardan los parametros (datos recogidos) en una variable,como un arreglo\n $params = array(null);\n #Retorna los datos que devuelve el metodo getRows \n return Database::getRows($sql, $params);\n }",
"static public function getColoresTextos()\n {\n return ColoresTextos::Select('nombre_color', 'codigo_color')\n ->orderBy('codigo_color', 'ASC')\n ->get();\n }",
"public function colorList() {}",
"public function mostrarTeatros(){\n /**\n * @var object $objTeatro\n * @var array $colTeatro\n * @var string $strTeatros\n */\n $objTeatro = new Teatro();\n $colTeatro = $objTeatro->listar();\n $strTeatros = \"Teatros: \\n\";\n foreach($colTeatro as $teatro){\n $strTeatros.=\"* \\n\".$teatro;\n }\n return $strTeatros;\n }",
"function _traer_titulo($id){\n\t\t$query = $this->db->query(\"select c.* from colores c where c.color_id=$id\");\n\t\t$res = $query->result();\t\n\t\tif($res){\n\t\t\t/*return array(\n\t\t\t\t'color' => $res[0]->color,\n\t\t\t\t'color_img' => $res[0]->color_img,\n\t\t\t\t'marca' => $res[0]->marca,\n\t\t\t\t'marca_id' => $res[0]->id\n\t\t\t\t);*/\n\t\t\treturn array(\n\t\t\t\t'color' => $res[0]->color,\n\t\t\t\t'color_img' => $res[0]->color_img\n\t\t\t\t);\n\t\t\t\t\n\t\t}\n\t}",
"public function listadoTipoDocumento(){\n \n\t\t$data= $this->Model_maestras->BuscarTiposDocumentos();\n\t\n\t\techo($data); \n\t \n\n\t}",
"public function get_color($idTalla,$idEmpresa){\n\n if($idTalla != '' || $idEmpresa != ''){\n\n $this->_query = \"\n SELECT a.idempresa,a.opc_catalogo,a.nombre_catalogo,a.descripcion_catalogo,a.idestado,a.fecha_alta,b.nick_name as idusuario_alta,a.fecha_um,c.nick_name as idusuario_um \n FROM catalogo_general as a \n LEFT JOIN perfil_usuarios as b \n ON a.idusuario_alta = b.idusuario \n LEFT JOIN perfil_usuarios as c \n ON a.idusuario_um = c.idusuario \n WHERE a.idcatalogo = 4 AND a.idempresa = '$idEmpresa' AND a.opc_catalogo = '$idTalla' \";\n\n $this->get_result_query();\n\n }\n\n if(count($this->_rows) == 1){\n\n foreach ($this->_rows[0] as $campo => $valor){\n $this->$campo = $valor ;\n }\n\n $this->_confirm = true ;\n $this->_message = \"Se encontro la talla\";\n\n }else{\n $this->_confirm = false ;\n $this->_message = \"No se encontro la talla\" ;\n }\n\n }",
"public function getOptions(){\n //$this->xpath = new DOMXPath($this->document);\n $cssname = \"options-list\";\n $tag = \"ul\";\n $consulta = \"//\".$tag.\"[@class='\".$cssname.\"']\";\n $elements = $this->xpath->query($consulta);\n if ($elements->length > 0){\n foreach($elements as $element){\n $consultaSpan = \"li/span[@class='label']\";\n $spans = $this->xpath->query($consultaSpan, $element);\n if ($spans->length > 0){\n foreach($spans as $span){\n //echo \"La caracteristica es: \".$span->nodeValue.\"<br>\";\n }\n }\n }\n }\n echo \"<br><br>\";\n }",
"public static function getAttributeList() {\n $model = self::_getDataType();\n $LblNm = $model::_getLabelName();\n $table = self::_getDbTable();\n $rs = $table->fetchAll(\n $table->select($LblNm)\n );\n $labels = array();\n foreach($rs as $row) {\n array_push($labels, $row->$LblNm);\n }\n return $labels;\n }",
"function get_all_contrato()\n {\n $contrato = $this->db->query(\"\n SELECT\n c.*, e.estado_descripcion, e.estado_color\n FROM\n `contrato` c\n left join estado e on c.estado_id = e.estado_id\n ORDER BY c.`contrato_id` DESC\n \")->result_array();\n\n return $contrato;\n }",
"public function getInstrucoes();",
"public function getDiagnosaformItems()\n {\n return Yii::app()->db->createCommand('SELECT diagnosa_id, diagnosa_nama FROM diagnosa_m WHERE diagnosa_aktif=TRUE')->queryAll();\n }",
"protected function fijarAtributos(){\n \n return array(\"cod_categoria\",\"nombre\");\n \n }",
"public function getLabels();",
"public function getLabels();",
"public function getLabels();",
"public function obtenerTiposResiduos(){\n $this->tipoResiduoAccesoDatos->conectar();\n $resultado = $this->tipoResiduoAccesoDatos->obtenerTiposResiduos();\n $this->tipoResiduoAccesoDatos->cerrarConexion();\n return $resultado;\n }",
"function clade_context_clade_convert_list() {\n return array(\n 'tid' => t('Clade ID'),\n 'name' => t('Clade name'),\n 'description' => t('Clade description'),\n );\n}",
"protected function _getTextLabels()\n {\n return array(\n self::NUMBER => 'card_number',\n self::SECURE_STORE => 'secure_store',\n self::EXPIRE_MONTH => 'expire_month',\n self::EXPIRE_YEAR => 'expire_year',\n self::CCV => 'card_ccv',\n self::TYPE => 'card_type',\n self::FIRST_NAME => 'first_name',\n self::LAST_NAME => 'last_name',\n self::ADDRESS => 'address',\n self::CITY => 'city',\n self::STATE => 'state',\n self::POSTAL_CODE => 'postal_code',\n self::COUNTRY => 'country',\n self::PHONE => 'phone'\n );\n }",
"public static function obtenerTodos()\n\t{\n\t\t$listaColores = NULL;\n\n\t\ttry\n\t\t{\n\t\t\t$sentencia = \"select * from colores\";\n\t\t\t$resultado = mysql_query($sentencia, BD::conectar());\n\n\t\t\tif ($resultado)\n\t\t\t{\n\t\t\t\t$listaColores = array();\n\t\t\t\t$contador = 0;\n\t\t\t\twhile ($fila = mysql_fetch_array($resultado))\n\t\t\t\t{\n\t\t\t\t\t$color = self::obtenerDatos($fila);\n\t\t\t\t\tif ($color != NULL)\n\t\t\t\t\t{\n\t\t\t\t\t\t$listaColores[$contador++] = $color;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tLogger::aviso(\"<CADColor::obtenerTodos() Color nulo nº $contador\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tLogger::error(\"<CADColor::obtenerTodos() \".$e->getMessage());\n\t\t\t$listaColores = NULL;\n\t\t}\n\n\t\treturn $listaColores;\n\t}",
"protected function CltvoGetItems(){\n\n return [\n [\n \"label\" => \"Especial\",\n \"description\" => \"Sección que requiere información de modelos diferentes a los componenetes\",\n \"admin_view_path\" => \"protected\",\n \"protected\" => true,\n \"unlimited\" => false,\n 'sortable' => false\n ],\n [\n \"label\" => \"Fija\",\n \"description\" => \"Sección que requiere información de una cantidad exacta de componentes\",\n \"admin_view_path\" => \"multiple-fixed\",\n \"protected\" => false,\n \"unlimited\" => false,\n 'sortable' => false\n ],\n [\n \"label\" => \"Múltiple limitada\",\n \"description\" => \"Sección que requiere información de una cantidad exacta de componentes que pueden ordenarse\",\n \"admin_view_path\" => \"multiple-limited\",\n \"protected\" => false,\n \"unlimited\" => false,\n 'sortable' => true\n ],\n [\n \"label\" => \"Múltiple ilimitada\",\n \"description\" => \"Sección que requiere información de una cantidad ilimitada de componentes que pueden ordenarse\",\n \"admin_view_path\" => \"multiple-unlimited\",\n \"protected\" => false,\n \"unlimited\" => true,\n 'sortable' => true\n ]\n ];\n }",
"public function listDisplayElements();",
"function getTypesMenu(){\n\t\t$sql=\"SELECT gd.TenGD, ctgd.MaCTGD, ctgd.TenCTGD FROM giaidoan gd, chitietgiaidoan ctgd WHERE gd.MaGD = ctgd.MaGD\";\n\t\t$this->setQuery($sql);\n\t\treturn $this->loadAllRows();\n\t}",
"public function SelectSocial(){\n\n $all_redes = ($this->ConfigModelo->select('select', 'red_social', '', '', '', ''));\n return $all_redes;\n\n\n }",
"function getNonColourDetails() {\n\t\t\t$NON_COLOUR_ID = 200;\n\t\t\t$sql = \" SELECT * FROM colour_colour_details WHERE id = \" . $NON_COLOUR_ID;\n\t\t\t$result = mysql_query( $sql );\n\t\t\twhile ( $row = mysql_fetch_array( $result ) ) {\n\t\t\t\t$s .= \"[\" . $row['id'] . \",'\" . $row['name'] . \"','\" . $row['pantone'] . \"','#\" . $row['rgb'] . \"'],\";\n\t\t\t}\n\t\t\t// knock final comma\n\t\t\t$s = substr( $s, 0, strlen( $s ) - 1 );\n\t\t\t// add closing bracket, but only if we found some items\n\t\t\tif ( trim( $s ) != '' ) {\n\t\t\t\t//\t$s .= ']';\n\t\t\t} else {\n\t\t\t\t$s .= '[]';\n\t\t\t}\n\t\t\treturn $s;\n\t\t}",
"private function codTributos(): array\n {\n $codigos = [];\n if ($this->ws === 'wsfe') {\n $codigos = $this->FEParamGetTiposTributos();\n $codigos = array_map(function ($o) {\n return $o->Id;\n }, $codigos->TributoTipo);\n }\n\n return $codigos;\n }",
"public function ctrMostrarTarifas(){\n\n\t\t$tabla = \"comercio\";\n\n\t\t$respuesta = ModeloCarrito::mdlMostrarTarifas($tabla);\n\n\t\treturn $respuesta;\n\n\t}",
"public function ctrMostrarTarifas(){\n $tabla = \"comercio\";\n\n $respuesta = ModeloCarrito::mdlMostrarTarifas($tabla);\n\n return $respuesta;\n }",
"public static function getAttributeTypeList() {\n $model = self::_getDataType();\n $LblNm = $model::_getLabelName();\n $table = self::_getDbTable();\n $rs = $table->fetchAll(\n $table->select($LblNm)\n );\n $labels = array();\n foreach($rs as $row) {\n array_push($labels, $row->$LblNm);\n }\n return $labels;\n }",
"public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Etat\");//type array\n\t}",
"function getTarjetas(){\n\t\treturn $this->objetos_tarjetas;\n\t}",
"public function labels()\n {\n return array();\n }",
"public function labels()\r\n {\r\n \treturn array(\r\n\t\t\t 'id_post'\t\t=> 'Id post',\r\n\t\t\t 'id_user'\t\t=> 'Id user',\r\n\t\t\t 'id_category'\t=> 'Id category',\r\n\t\t\t 'id_location'\t=> 'Id location',\r\n\t\t\t 'type'\t\t\t=> 'Type',\r\n\t\t\t 'title'\t\t\t=> 'Title',\r\n\t\t\t 'seotitle'\t\t=> 'SEO title',\r\n\t\t\t 'description'\t=> 'Description',\r\n\t\t\t 'adress'\t\t=> 'Adress',\r\n\t\t\t 'price'\t\t\t=> 'Price',\r\n\t\t\t 'phone'\t\t\t=> 'Phone',\r\n\t\t\t 'ip_address'\t=> 'Ip address',\r\n\t\t\t 'created'\t\t=> 'Created',\r\n\t\t\t 'published'\t\t=> 'Published',\r\n\t\t\t 'status'\t\t=> 'Status',\r\n\t\t\t 'has_images'\t=> 'Has images',\r\n\t\t\t );\r\n }",
"private function getColors(): array\n {\n $colors = $this->website->getConfiguration()->getColors();\n $choices = [];\n foreach ($colors as $color) {\n if ($color->getCategory() === \"background\" && $color->getIsActive()) {\n $choices[$color->getAdminName()] = $color->getSlug();\n $this->colors[$color->getSlug()] = $color->getColor();\n }\n }\n return $choices;\n }",
"public function listar(){\n\n $sql = \"SELECT * FROM buro_credito\";\n\n return $this->mysql->getRows($sql);\n\n }",
"public function __toString()\n {\n return $this->getRed() . ', ' . $this->getGreen() . ', ' . $this->getBlue();\n }",
"function getTiposCampos($tabla) {\r\n $tipos = $this->dt->getTipos($tabla);\r\n return $tipos;\r\n }",
"public function getDescriptionList() {\n return $this->_get(3);\n }",
"public function getDescriptionList() {\n return $this->_get(3);\n }",
"function ListClases(){\n\t\t$nodepal=$this->getMainNode();\n\t\techo(\"Lista de Clases: <br>\");\n\t\tforeach ($this->clases[$nodepal] as $key=>$value) {\n\t\t echo(\"$value<br/>\\n\");\n\t\t}\n\t}",
"public function generateNodeTypeList() {\n $type_labels = [];\n $node_types = $this->entityTypeManager\n ->getStorage('node_type')\n ->loadMultiple();\n foreach ($node_types as $type) {\n $type_labels[$type->id()] = $this->t('@label', ['@label' => $type->id()]);\n }\n return $type_labels;\n }",
"public function getAllRespTec(){\n\t\t$sql = \"SELECT * FROM responsavel_tecnico;\";\n\t\treturn $this->Model->getData($sql);\n\t}",
"function pegaDadosEtiquetas()\n\t{\n\t\tif(!$this->layer){return \"erro\";}\n\t\t$itens = $this->layer->getmetadata(\"ITENS\");\n\t\t$itens = explode(\",\",$itens);\n\t\t$itensdesc = mb_convert_encoding($this->layer->getmetadata(\"ITENSDESC\"),\"UTF-8\",\"ISO-8859-1\");\n\t\t$itensdesc = explode(\",\",$itensdesc);\n\t\t$itenslink = $this->layer->getmetadata(\"ITENSLINK\");\n\t\t$itenslink = explode(\",\",$itenslink);\n\n\t\t$tips = $this->layer->getmetadata(\"TIP\");\n\n\t\t$res = array(\n\t\t\t\t\"itens\"=>$itens,\n\t\t\t\t\"itensdesc\"=>array_combine($itens,$itensdesc),\n\t\t\t\t\"itenslink\"=>array_combine($itens,$itenslink),\n\t\t\t\t\"tips\"=>explode(\",\",$tips),\n\t\t\t\t\"itembuscarapida\"=>$this->layer->getmetadata(\"itembuscarapida\")\n\t\t);\n\t\treturn($res);\n\t}",
"function wpsp_list_tour_style( $icon_size = '' ) {\n\tglobal $post;\n\n\t$class = 'tour-style-icon';\n\tif ( $icon_size ) \n\t\t$class = 'tour-style-icon-' . $icon_size;\n\n\t//$args = array('orderby' => 'ID', 'order' => 'DESC', 'fields' => 'all');\n\t$tour_styles = wp_get_post_terms( $post->ID, 'tour_style' );\n\t$out = '<ul class=\"' . $class . '\">';\n\t$out .= '<li><span class=\"label\">' . esc_html__( 'Experiences: ', 'discovertravel' ) . '</span></li>';\n\tforeach ($tour_styles as $term) {\n\t\t//$out .= '<li><a href=\"' . get_term_link( $term ) . '\" title=\"' . $term->name . '\"><span class=\"sprite ' . get_option( 'tour_style_'.$term->term_id.'_icon', '' ) . '\"></span>' . $term->name . '</a></li>';\n\t\t$out .= '<li><span class=\"sprite ' . get_option( 'tour_style_'.$term->term_id.'_icon', '' ) . '\"></span></li>';\n\t}\n\t$out .= '</ul>';\n\techo $out;\n}",
"function getTiposCampos($tabla) {\n $tipos = $this->dt->getTipos($tabla);\n return $tipos;\n }",
"function getCategoryRecommandationList(){\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$query = $wpdb->prepare(\r\n\t\t\t\"SELECT RECOMMANDATION_CAT.*, PIC.photo\r\n\t\t\tFROM \" . TABLE_CATEGORIE_PRECONISATION . \" AS RECOMMANDATION_CAT\r\n\t\t\t\tLEFT JOIN \" . TABLE_PHOTO_LIAISON . \" AS LINK_ELT_PIC ON ((LINK_ELT_PIC.idElement = RECOMMANDATION_CAT.id) AND (tableElement = '\" . TABLE_CATEGORIE_PRECONISATION . \"') AND (LINK_ELT_PIC.isMainPicture = 'yes'))\r\n\t\t\t\tLEFT JOIN \" . TABLE_PHOTO . \" AS PIC ON ((PIC.id = LINK_ELT_PIC.idPhoto))\r\n\t\t\tWHERE RECOMMANDATION_CAT.status = 'valid'\r\n\t\t\t\tGROUP BY RECOMMANDATION_CAT.id\", \"\");\r\n\r\n\t\t$CategoryRecommandationList = $wpdb->get_results($query);\r\n\r\n\t\treturn $CategoryRecommandationList;\r\n\t}",
"function getTiposDocumento(){\r\n\t$tipos_documento[\"I\"]\t= \"Investigación\";\r\n\t$tipos_documento[\"AV\"]\t= \"Archivo vertical\";\r\n\t$tipos_documento[\"AR\"]\t= \"Artículo de revisa\";\r\n\t$tipos_documento[\"L\"]\t= \"Libro\";\r\n\t$tipos_documento[\"R\"]\t= \"Revista\";\r\n\t$tipos_documento[\"T\"]\t= \"Tesis\";\r\n\t$tipos_documento[\"D\"]\t= \"Documento\";\t\r\n\t\r\n\treturn $tipos_documento;\r\n}",
"public function getTodoTypeListAction(){\n /** @var Object_Todo $todo */\n $this->getDeviceSession()->getUserId();\n $todo = new Object_Todo();\n $this->_helper->json($todo->getClass()->getFieldDefinition('Todo_type'));\n }",
"public function listattr_form_generales()\n {\n $this->db->where('tipo_atributob', 'Generales');\n $resultados = $this->db->get('atributos_b');\n\n return $resultados->result();\n }",
"public function getColorList()\n {\n return $this->colorList;\n }",
"public function getListEntry()\n {\n $fields = goService::getListEntry();\n $fields['Message'] = _(\"Kopano service\");\n #$fields['AllowEdit'] = false;\n return($fields);\n }",
"public function getDescriptionList() {\n return $this->_get(4);\n }",
"public function getDescriptionList() {\n return $this->_get(4);\n }",
"public function getDescriptionList() {\n return $this->_get(7);\n }",
"function getLegend()\n {\n ksort($this->price_arr);\n //print_r($this->price_arr);\n \n foreach ($this->price_arr as $k => $v) {\n //echo \"$k => $v<br>\";\n $ret[$v] = array($k, $this->price_colors[$v]);\n }\n\n return $ret;\n }",
"function show_list()\n\t{\n\t\t$out = $this->get_value_list();\n\t\treturn $out;\n\t}",
"public function actionLabels() {\n return Label::getList();\n }",
"function getAllFromProizvod(){\n\t\treturn $this->ime . \" \" . $this->imeProizvođača . \" \" \n\t\t. $this->prezimeProizvođača . \" \" . $this->cijena;\n\t}",
"public function listAction() {\n\t\t$data = array('red','green','blue','yellow');\n\t\t$this->view->data = $data;\n\t}",
"public function getLabelData()\n {\n $query = '\nSELECT\n d.id, CONCAT(d.fornavn, \" \",\n d.efternavn),\n w.navn AS wear,\n dwp.antal,\n dwp.size\nFROM\n deltagere AS d\n JOIN deltagere_wear AS dwp ON dwp.deltager_id = d.id\n JOIN wearpriser AS wp ON wp.id = dwp.wearpris_id\n JOIN wear AS w on w.id = wp.wear_id\nWHERE\n w.id IN (7, 18, 21, 22, 28, 29, 31)\nORDER BY\n d.id, w.navn';\n\n $labels = [];\n\n foreach ($this->db->query($query) as $row) {\n if (!isset($labels[$row['id']])) {\n $labels[$row['id']] = [\n 'name' => e('ID: ' . $row['id']),\n 'wear' => [],\n ];\n }\n\n $labels[$row['id']]['wear'][] = e(sprintf('%u %s - %s', $row['antal'], $row['size'], $row['wear']));\n\n }\n\n $groups = [];\n\n while (count($labels) > 0) {\n $groups[] = array_splice($labels, 0, 8);\n }\n\n return $groups;\n }",
"public function colorCodesName(){\n\t\t\t\n\t\t$sql = \"select name from sy_color_codes\";\n\t\t$SyColorCodes = $this->runRequest($sql);\n\t\treturn $SyColorCodes->fetchAll();\n\t}",
"public function getColorLabelByColorId($id){\n\n $atributo = Mage::getStoreConfig('cores/config/codigo_cor');\n $attribute_code=Mage::getModel('eav/entity_attribute')->getIdByCode('catalog_product', $atributo);\n $attributeInfo = Mage::getModel('eav/entity_attribute')->load($attribute_code);\n $attribute_table = Mage::getModel('eav/entity_attribute_source_table')->setAttribute($attributeInfo);\n\n $label = $attribute_table->getOptionText($id);\n return $label;\n }",
"public function getListePraticiens(){\n\t\t$req = \"select * from praticien order by PRA_NOM\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetchAll();\n\t\treturn $ligne;\n\t}",
"protected function CltvoGetItems(){\n return [\n [\n \"active\" => true,\n \"paid\" => false,\n \"cancel\" => false,\n \"slug\" => \"activo\",\n \"label\" => \"Activo\"\n ],\n [\n \"active\" => false,\n \"paid\" => false,\n \"cancel\" => false,\n \"slug\" => \"pago-pendiente\",\n \"label\" => \"Pago pendiente\"\n ],\n [\n \"active\" => false,\n \"paid\" => true,\n \"cancel\" => false,\n \"slug\" => \"pagado\",\n \"label\" => \"Pagado\"\n ],\n [\n \"active\" => false,\n \"paid\" => true,\n \"cancel\" => false,\n \"slug\" => \"en-proceso\",\n \"label\" => \"En proceso\"\n ],\n [\n \"active\" => false,\n \"paid\" => true,\n \"cancel\" => false,\n \"slug\" => \"entregado\",\n \"label\" => \"Entregado\"\n ],\n\n [\n \"active\" => false,\n \"paid\" => true,\n \"cancel\" => true,\n \"slug\" => \"cancelado\",\n \"label\" => \"Cancelado\"\n ],\n\n [\n \"active\" => false,\n \"paid\" => true,\n \"cancel\" => true,\n \"slug\" => \"devuelto\",\n \"label\" => \"Devuelto\"\n ],\n\n [\n \"active\" => false,\n \"paid\" => false,\n \"cancel\" => true,\n \"slug\" => \"expirado\",\n \"label\" => \"Expirado\"\n ],\n\n\n\n\n ];\n }",
"function ListNodos(){\n\t\t$clase=$this->nmclass;\n\t\t$nodosnum=count($this->nodos[$clase]);\n\t\techo(\"Lista de Nodos: <br>\");\n\t\tforeach ($this->nodos[$clase] as $key=>$value) {\n\t\t echo(\"Clave: $key; Valor: $value<br />\\n\");\n\t\t}\n\t}",
"function imagenes_disponibles_tipos($id_palabra,$with_pictcolor,$with_pictnegro,$with_imagenes,$with_cliparts) {\n\t\t\t\n\t\t$query = \"SELECT palabras.*, tipos_palabra.*, \n\t\timagenes.id_imagen,imagenes.id_colaborador,imagenes.imagen,imagenes.extension,imagenes.id_tipo_imagen,\n\t\timagenes.estado,imagenes.registrado,imagenes.id_licencia,imagenes.id_autor,imagenes.tags_imagen,\n\t\timagenes.tipo_pictograma,imagenes.validos_senyalectica,imagenes.original_filename,\n\t\tpalabra_imagen.*\n\t\tFROM palabras, tipos_palabra, imagenes, palabra_imagen\n\t\tWHERE palabras.id_palabra = '$id_palabra'\n\t\tAND palabra_imagen.id_palabra = '$id_palabra'\n\t\tAND palabra_imagen.id_imagen = imagenes.id_imagen\n\t\tAND tipos_palabra.id_tipo_palabra=palabras.id_tipo_palabra\n\t\t$with_pictcolor\n\t\t$with_pictnegro\n\t\t$with_imagenes\n\t\t$with_cliparts\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t}",
"public function getCategorias(){\n\t\t$sql = \"SELECT * FROM tipo_producto ORDER BY nombre_tipo_prod\";\n\t\t$params = array(null);\n\t\treturn Database::getRows($sql, $params);\n\t}",
"function get_tipos_espacios_mtrx()\n\t{\n\t\t$ef = new Tipo_espacio();\n\t\t$ef->order_by('tag');\n\t\t$ef->get();\n\t\tif($ef->c_rows>0){\n\t\t\t$colect[0]=\"TODOS\";\n\t\t\tforeach($ef->all as $row){\n\t\t\t\t$colect[$row->id]=$row->tag;\n\t\t\t}\n\t\t\treturn $colect;\n\t\t} else\n\t\t\treturn 0;\n\t}",
"public static function getColors()\n {\n $db = DataBase::connect();\n\n $result = $db->query('SELECT * FROM `color`');\n\n $colors = [];\n\n $i = 1;\n\n while($row = $result->fetch()) {\n $colors[$i]['color'] = $row['color'];\n $colors[$i]['ukr_title'] = $row['ukr_title'];\n $colors[$i]['upper_ukr_title'] = $row['upper_ukr_title'];\n $colors[$i]['default'] = $row['default'];\n\n $i++;\n }\n return $colors;\n }",
"function getListe() {\n\t\t$parents = $this->getParents();\n\t\t$keys_parents = array_keys($parents);\n\t\t\n\t\tforeach ($keys_parents as $key) {\n\t\t\tif (strpos($key, 'lis') !== false) {\n\t\t\t\treturn $parents[$key];\n\t\t\t}\n\t\t}\n\t\tdie(\"Aucune Liste n'a été trouvée pour ce pseudo/email/ip !\");\n\t}",
"function getOrderInfo(){\r\n // select query \r\n $query = \"SELECT\r\n color\r\n FROM\r\n `ducks` \r\n WHERE owner = ?\";\r\n \r\n // prepare query statement\r\n $stmt = $this->conn->prepare($query);\r\n \r\n // sanitize\r\n $this->id=htmlspecialchars(strip_tags($this->id));\r\n \r\n // bind id of record \r\n $stmt->bindParam(1, $this->id);\r\n \r\n // execute query\r\n $stmt->execute();\r\n $clr=[];\r\n \r\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)){\r\n extract($row);\r\n if (!isset($clr[$color]))\r\n $clr[$color] = 1;\r\n else $clr[$color] = $clr[$color]+1;\r\n } \r\n $this->ducks=$clr;\r\n \r\n }",
"function getColor(){\n\t\treturn $this->color_ficha;\n\t}",
"public function getTextColors()\n {\n return $this->textColors;\n }",
"public function all_redes_dropdown(){\r\n\t\r\n $query = $this->db->query(\"SELECT nombre FROM redes;\");\r\n if ($query->num_rows() > 0) {\r\n $data =array();\r\n foreach ($query->result() as $red) {\r\n $data[$red->nombre] = $red -> nombre;\r\n }\r\n return $data;\r\n \r\n } else\r\n return false;\r\n }",
"public function ListCrossListed(){\n\t\treturn array(\"results\" => $this->Read('[CROSSLISTINGS TABLE]'));\n\t}",
"public function getCustomLineItems();",
"public static function list() {\n self::init();\n $columns = self::getListTableColumns();\n $columns = array_map(function($object) {\n return $object['label'];\n }, $columns);\n $columns = array_values($columns);\n\n $columnsSql = implode(', ', self::$listTableColumnsKeys);\n $data = self::$wpdb->get_results(\n self::$wpdb->prepare(\n \"SELECT {$columnsSql}\n FROM \" . self::$table . \"\n ORDER BY id ASC\"\n )\n );\n return $data;\n }",
"function jobstar_core_job_type_color() {\r\n $types = get_terms( array(\r\n 'taxonomy' => 'job_listing_type',\r\n 'hide_empty' => false,\r\n 'fields' => 'id=>slug'\r\n ) );\r\n if ( !empty( $types ) ) : ?>\r\n <style type=\"text/css\">\r\n <?php foreach ( $types as $type_id => $type ) :\r\n $color_type = get_term_meta( $type_id, '_color', true );\r\n if ( empty( $color_type ) ) continue; ?>\r\n body.post-type-job_listing .widefat .column-job_listing_type .<?php echo $type; ?>,\r\n body.edit-tags-php.post-type-job_listing.taxonomy-job_listing_type tr#tag-<?php echo $type_id; ?> a.row-title {\r\n background-color: <?php echo esc_attr($color_type); ?>;\r\n }\r\n <?php endforeach; ?>\r\n </style>\r\n<?php endif;\r\n}",
"static public function __hx__list () {\n\t\treturn [\n\t\t\t4 => 'RChoice',\n\t\t\t1 => 'RData',\n\t\t\t3 => 'RList',\n\t\t\t2 => 'RMulti',\n\t\t\t0 => 'RNode',\n\t\t\t5 => 'ROptional',\n\t\t];\n\t}",
"public function ListarDetallesCompras()\n{\n\tself::SetNames();\n\n\tif($_SESSION['acceso'] == \"administrador\") {\n\n\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n\telse {\n\n\t\t$sql = \" SELECT * FROM detallecompras LEFT JOIN categorias ON detallecompras.categoria = categorias.codcategoria WHERE detallecompras.codigo = \".$_SESSION[\"codigo\"].\"\";\n\t\tforeach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}",
"public function listtabelPngAction() {\n $this->view->tableList = $this->adm_listtabel_serv->getTableList('PENGADAAN');\n }",
"function listar_color(){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\t\n\t\tif (isset($_SESSION['buscar']) && $_SESSION['buscar']!=\"\"){\t\n\t\t\t$this->buscar=$_SESSION['buscar'];\n\t\t\t$sql=\"SELECT * FROM color WHERE (nombre_color LIKE '%' '\".$_SESSION['buscar'].\"' '%' OR \n\t\t\tcodigo_color LIKE '%' '\".$_SESSION['buscar'].\"' '%') \n\t\t\tORDER BY id_color ASC\";\n\t\t}else{\n\t\t\t$sql=\"SELECT * FROM color ORDER BY id_color\";\n\t\t}\n\t\t$consulta=mysql_query($sql);\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}",
"public function getTipoContrato(){\n\t\t$em= $this->getEntityManager(); \n $dql = 'SELECT tc.id, tc.tipo , tc.abr FROM RRHHBundle:TipoContrato tc ORDER By tc.id ASC ';\n $dql = $em->createQuery($dql); \n return $dql->getResult(); \n\t}",
"public function getListColumns(){\n\treturn \"id, codice_categoria, codice, descrizione\";\n}",
"public function citas_tiposCitas(){\n \t\n\t\t\t$resultado = array();\n\t\t\n\t\t\t$query = \" SELECT idTipoCita, nombre\n\t\t\t\t\t\tFROM tb_tiposCita\";\n\t\t\t\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado[] = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado;\n\t\t\t\n }",
"public function todaInfoProductos(){\n\n for($i = 0; $i < count($this -> listProducto); $i++){\n $this -> listProducto[$i][0] -> getInfoBasic();\n }\n }"
] | [
"0.64754105",
"0.62769306",
"0.6111466",
"0.60976607",
"0.60688865",
"0.60525215",
"0.6046465",
"0.60432386",
"0.6015319",
"0.59928924",
"0.5952196",
"0.58872765",
"0.58578867",
"0.58458626",
"0.57484215",
"0.5741707",
"0.573697",
"0.5660174",
"0.56596184",
"0.5655299",
"0.5609304",
"0.56000906",
"0.5593665",
"0.5545505",
"0.5522348",
"0.5515407",
"0.55065715",
"0.5501391",
"0.54947644",
"0.54947644",
"0.54947644",
"0.54876435",
"0.5472335",
"0.5463428",
"0.5457771",
"0.5457756",
"0.5457117",
"0.5442565",
"0.5432794",
"0.54312515",
"0.5429714",
"0.54208314",
"0.5410461",
"0.54067796",
"0.54037696",
"0.5380562",
"0.5357701",
"0.5334249",
"0.53332937",
"0.5319502",
"0.5316161",
"0.53160065",
"0.5306471",
"0.5306471",
"0.5287904",
"0.5287548",
"0.52864075",
"0.52834946",
"0.52805054",
"0.5273539",
"0.5268314",
"0.5263689",
"0.5258199",
"0.5252834",
"0.5249189",
"0.5248889",
"0.52435815",
"0.52435815",
"0.5242843",
"0.52408755",
"0.52379423",
"0.52359456",
"0.52329606",
"0.52327514",
"0.52322674",
"0.5228282",
"0.5215206",
"0.5205626",
"0.5204444",
"0.51935536",
"0.5183323",
"0.516834",
"0.5157305",
"0.5150998",
"0.514912",
"0.5148025",
"0.5147783",
"0.5146795",
"0.51429343",
"0.5141762",
"0.51404625",
"0.51389974",
"0.5137622",
"0.5136038",
"0.51314205",
"0.5126717",
"0.5124654",
"0.5116985",
"0.5113761",
"0.51100624",
"0.51072675"
] | 0.0 | -1 |
Sets the tax type. | public function setTaxType($taxType) {
$this->taxType = $taxType;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setTaxonomyType($setTaxType) {\n $this->taxonomyType = $setTaxType;\n }",
"public function setType($type)\n {\n parent::setAttr(\"type\", $type);\n }",
"public function setTax(string $value): void\n {\n if (is_null($value)) {\n return;\n }\n\n if ($value == 0) {\n $value = 'TAX_0';\n } else {\n $value = number_format($value, 2);\n\n // not sure why has two underscores?\n if ($value < 1) {\n $value = 'TAX__' . str_replace('0.', '', $value);\n } else {\n $value = 'TAX_' . str_replace('.', '_', $value);\n }\n }\n\n $this->elements['tax-class-id'] = $value;\n }",
"public function setTax($tax)\n {\n $this->tax = $tax;\n }",
"public function setTaxNo($taxno);",
"function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type) {\n $this->type = $type;\n }",
"public function setType($type)\r\n {\r\n $this->type = $type;\r\n }",
"public function setType($t){\n $this->type = $t;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setType($type)\n {\n $this->type = $type;\n }",
"public function setTyp( $type );",
"public function setType( $type ) {\n\n\t\t$this->type = $type;\n\t}",
"function setType($type) {\n\t\t$this->_type = $type;\n\t}",
"function setType($type) {\n\t\t$this->_type = $type;\n\t}",
"public function setType($type) {}",
"public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}",
"public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}",
"public function setType(string $type);",
"public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}",
"public function setType($type)\n\t{\n\t\t$this->_type = $type;\n\t}",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function setType($type);",
"public function set_type($type) {\n $this->update([\n 'type' => $type\n ]);\n\n $this->type = $type;\n\n // finish configuring this OrderExchange\n $this->sync();\n }",
"public function SetType($type){\r\n\t\t$this->type = (string) $type;\r\n\t}",
"public function setType($type) {\n\t\t$this->data['type'] = $type;\n\t}",
"public function set_type( $type ) {\n\t\t$this->set_prop( 'type', sanitize_title( $type ) ) ;\n\t}",
"public function SetType($type){\r\r\n\t\t$this->type = (string) $type;\r\r\n\t}",
"public function setType(string $type): void\n {\n $this->type = $type;\n }",
"public function setType(string $type): void\n {\n $this->type = $type;\n }",
"public function setTax($tax)\n {\n if ($this->_validation->validateIsNumeric($tax)) {\n $this->_tax = $tax;\n } else {\n throw new PiRatepay_Paypage_Util_ValidationException(200);\n }\n }",
"public function setType(string $type)\n {\n $this->type = $type;\n }",
"function setType($type = \"\")\n\t\t{\n\t\t\t$this->type = $type;\n\t\t}",
"public function setType($type)\n {\n $this['type'] = $type;\n }",
"public function setType(?string $type): void\n {\n $this->type = $type;\n }",
"public function setType(?string $type): void\n {\n $this->type = $type;\n }",
"public function setType($type){ }",
"public function getTaxType() {\n\n\t\treturn $this->taxType;\n\t}",
"public function setType( $type )\n {\n }",
"public function setType(?string $type): void;",
"public function set_type($type)\n {\n $this->set_default_property(self::PROPERTY_TYPE, $type);\n }",
"function setTaxes($taxes)\n {\n $this->taxes = $taxes;\n }",
"public function setType(?string $type): void\n {\n }",
"public function setTax(float $tax)\n\t{\n\t\t$this->addKeyValue('Tax', $tax); \n\n\t}",
"protected function setType(int $type):void {\r\n\t\t$this->type = $type;\r\n\t}",
"public function setType(string $type) {\n $this->attributes()->set('type', $type);\n return $this;\n }",
"public function setTierType(string $tier_type): void\n {\n $this->_tier_type = $tier_type;\n }",
"public function setTypeAttribute($value)\n {\n $this->attributes['type'] = $value;\n }",
"public function setTaxAmount($amount) {\r\n $this->taxAmount = NumberDataTypeHelper::truncate(floatval($amount), 2);\r\n }",
"public function setTaxAmount($amount);",
"public function setTypeAttribute($newValue) {\n $type = NodeType::get($newValue);\n $this->attributes['type'] = $type->getValue();\n }",
"public function setTypeAttribute($type)\n {\n $this->attributes['type'] = str_replace(array(' '),'_',$type);\n }",
"public function setTaxDocument($number, $type = self::TAX_DOCUMENT)\n\t{\n\t\t$this->data->taxDocument = new stdClass();\n\t\t$this->data->taxDocument->type = $type;\n\t\t$this->data->taxDocument->number = $number;\n\n\t\treturn $this;\n\t}",
"public function setType($type)\n {\n $this->type = $type;\n\n return $this;\n }",
"abstract public function getTaxType();",
"public function setType($type)\n\t{\n\t\t$this->type = ky_assure_constant($type, $this, 'TYPE');\n\t\treturn $this;\n\t}",
"public function setType($type = null)\n {\n $this->type = $type ?? $this->default_type;\n }",
"public function setTax(?float $tax): self\n {\n $this->initialized['tax'] = true;\n $this->tax = $tax;\n\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n\n return $this;\n }",
"public function setType($type)\n {\n $this->type = $type;\n\n return $this;\n }",
"public function withTaxOverride($type, $reason, $taxAmount, $taxDate)\n {\n $this->_model['taxOverride'] = [\n 'type' => $type,\n 'reason' => $reason,\n 'taxAmount' => $taxAmount,\n 'taxDate' => $taxDate\n ];\n\n // Continue building\n return $this;\n }",
"public function setItemType(QNameType $value): void\n {\n $this->itemTypeAttr = $value;\n }",
"public function setType($type) {\n\t\tif($type == self::TYPE_TEXT){\n\t\t\t$this->type = self::TYPE_TEXT;\n\t\t} else {\n\t\t\t$this->type = self::TYPE_HTML;\n\t\t}\n\t}",
"public function setType($string)\r\n {\r\n $this->_type = $string;\r\n }",
"function setType($value)\n {\n $this->setAttribute(\"type\", $value);\n return $this;\n }",
"public function taxationType($taxationType)\n {\n $this->abonement->setTaxationType($taxationType);\n return $this;\n }",
"public function setTaxInfo(KCommandContext $context)\n\t{\n\t\t$vats = $context->data->federal_tax;\n \n\t\t$this->getItem()->setFederalTax( KConfig::unbox( $vats ) );\n\t}",
"public function setType($type)\n {\n $this->values['Type'] = $type;\n return $this;\n }",
"public function setType($type)\n {\n $this->values['Type'] = $type;\n return $this;\n }",
"public function setType(string $type): self;",
"public function setType(string $type): self;",
"public function setDefaultType($type);",
"public function setType( Quantifier $type ): void {\n\t\t\t$this->type = $type;\n\t\t}",
"public function set_type($type)\n {\n $check = '';\n\n if (empty($type)) {\n $check = new WP_Error('forgot_type',\n __('Specify the data type to sanitize.', $this->plugin_name));\n }\n\n if (is_wp_error($check)) {\n wp_die($check->get_error_message(), __('Forgot data type.', $this->plugin_name));\n }\n\n $this->type = $type;\n }",
"public function setType(string $type)\n {\n $this->type = $type;\n return $this;\n }",
"function setType($a_type)\n\t{\n\t\t$this->il_type = $a_type;\n\t}",
"public function setType($type)\n {\n $this->data['type'] = $type;\n return $this;\n }",
"function setType($type) {\n\t\treturn $this->type = $type;\n\t}",
"public function setType($type)\n {\n $this->_type = $type;\n return $this;\n }",
"public function setType($type) {\n $this->type = $type;\n return $this;\n }",
"public function setType($type)\n\t\t{\n\t\t\t$this->type = $type;\n\t\t\treturn $this;\n\t\t}",
"function variant_set_type($variant, $type) {}",
"public function setTax( array $values ) {\n\t\t\t$tax = Tax::fromArray( $values );\n\t\t\t$this->setValue( $tax->toArray() );\n\t\t}"
] | [
"0.79272294",
"0.68786734",
"0.6818581",
"0.6810209",
"0.6782779",
"0.66899186",
"0.6680075",
"0.6680075",
"0.6680075",
"0.666816",
"0.666816",
"0.66333103",
"0.662085",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6619156",
"0.6600773",
"0.659054",
"0.65740484",
"0.65740484",
"0.65539896",
"0.65438694",
"0.65438694",
"0.65058357",
"0.6500762",
"0.6500762",
"0.6464414",
"0.6464414",
"0.6464414",
"0.6464414",
"0.6464414",
"0.6464414",
"0.6464414",
"0.6464414",
"0.6444167",
"0.6440288",
"0.6436958",
"0.6435186",
"0.6434205",
"0.63963795",
"0.63963795",
"0.63885033",
"0.6376023",
"0.6370872",
"0.63680524",
"0.6365028",
"0.6365028",
"0.63514805",
"0.635085",
"0.63492006",
"0.63360095",
"0.63024586",
"0.6263031",
"0.6255465",
"0.6226365",
"0.61577094",
"0.6118676",
"0.6110915",
"0.61019",
"0.6074465",
"0.6067268",
"0.60293716",
"0.6024979",
"0.60084254",
"0.598609",
"0.5980927",
"0.5965663",
"0.59593445",
"0.59530675",
"0.5950731",
"0.59393036",
"0.5924012",
"0.5917698",
"0.58937436",
"0.588188",
"0.5878722",
"0.58748275",
"0.58620614",
"0.58582455",
"0.58582455",
"0.58576804",
"0.58576804",
"0.585264",
"0.58519375",
"0.5850928",
"0.5847797",
"0.5821203",
"0.5814964",
"0.5803883",
"0.57930523",
"0.579116",
"0.5781255",
"0.57795167",
"0.57784235"
] | 0.714825 | 1 |
used for getting the microtime primarily useful for evaluating the pageload. | function rtime ()
{
$time = explode (" ", microtime ());
return (double) ((double) $time[0] + (double) $time[1]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function microtime();",
"function pageLoadTime() {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n $start = time; // start\n}",
"function L_PageLoadTime() {\n\t\n\t/*\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\t$time = $time[1] + $time[0];\n\t\t$finish = $time;\n\t\t$total_time = round(($finish - $start), 4);\n\t\t\n\t*/\n\t\n\t/*\n\t\t$end_time = microtime(TRUE);\n\t\t$time_taken = $end_time - $start_time;\n\t\t$time_taken = round($time_taken,5);\n\t\t\n\t*/\n\t\n\t\t// Start of code\n\t\t$time = microtime(true); // Gets microseconds\n\n\t\t// End of code\n\t\t$time_taken = (microtime(true) - $time);\n\t\t\n\t\treturn _e('Page generated in ' . $time_taken . ' seconds.','leonite');\n\n\t}",
"static function microtime ()\n\t{\n\t\tlist ($usec, $sec) = explode(' ', microtime());\n\t\t$result = ((float) $usec + (float) $sec) * 1000;\n\t\t\n\t\tstatic $microtime_start;\n\t\tif (empty($microtime_start)) {\n\t\t\t$microtime_start = $result;\n\t\t}\n\t\treturn $result - $microtime_start;\n\t}",
"public function microtime()\n\t{\n\t\treturn microtime(true);\n\t}",
"private static function time()\n {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }",
"protected function getTime() {\n return microtime(true);\n }",
"protected function getTime()\n {\n return microtime(true);\n }",
"function mstime ()\r\n{\r\n\t$t = explode (' ', microtime ());\r\n\treturn (int) (($t[0] + $t[1]) * 1000);\r\n}",
"protected function startTime()\n {\n return microtime(true);\n }",
"private function _getMicroTime (){\n\t\treturn microtime(true);\n\t}",
"protected function time()\n {\n $time = microtime();\n $time = explode(' ', $time);\n $time = $time[1] + $time[0];\n return $time;\n }",
"protected static function getMicrotime() {\n\t\treturn microtime(true);\n\t}",
"public static function getTimer()\n {\n return microtime(true) - $_SERVER[\"REQUEST_TIME_FLOAT\"];\n }",
"public static function get_elapsed_time()\n {\n return microtime( true ) - $_SESSION['time']['script_start_time'];\n }",
"function timestamp()\n {\n return microtime(true);\n }",
"function process_time(){\n $time = number_format( microtime(true) - LIM_START_MICROTIME, 6);\n return($time);\n}",
"private function getCurrentTime()\n {\n return microtime(true);\n }",
"function _get_time()\n{\n $_mtime = microtime();\n $_mtime = explode(\" \", $_mtime);\n\n return (double) ($_mtime[1]) + (double) ($_mtime[0]);\n}",
"function phpTrafficA_getmicrotime() {\nlist($usec, $sec) = explode(\" \", microtime());\nreturn ((float)$usec + (float)$sec);\n}",
"function get_microtime() {\n\t$microtime = microtime();\n\t$microtime = explode(' ', $microtime);\n\t$microtime = $microtime[1] + $microtime[0];\n\treturn $microtime;\n}",
"function GetuTime()\n{\n\tlist($uSec, $Sec)=explode(\" \", microtime()); \n\treturn((float)$uSec+(float)$Sec); \n}",
"private function getCurrentTime() {\n return microtime( true );\n }",
"function calc_gen_time()\r\n{\r\n static $a = NULL;\r\n\r\n if ($a == NULL)\r\n {\r\n $a = microtime(true);\r\n }\r\n else\r\n {\r\n $b = (microtime(true) - $a);\r\n $a = NULL;\r\n\r\n log_debug('Page generated in '. number_format($b, 3) .' sec');\r\n\r\n return $b;\r\n }\r\n}",
"public function getMicrotime(){\n\t\t$time = microtime();\n\t\t$time = explode(' ', $time);\n\t\treturn $time[1] + $time[0];\n\t}",
"function getTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}",
"function now() {\n return microtime(true)*1000;\n}",
"function get_execution_time() {\n static $microtime_start = null;\n if($microtime_start === null)\n {\n $microtime_start = microtime(true);\n return 0.0;\n }\n return microtime(true) - $microtime_start;\n}",
"static private function getmicrotime()\n\t{\n\t\t\tlist($usec, $sec) = explode(\" \",microtime());\n\t\t\treturn ((float)$usec + (float)$sec); \n\t}",
"protected static function _timeToStopwatch()\n {\n return self::$_startupTime - $_SERVER['REQUEST_TIME_FLOAT'];\n }",
"function microtime(bool $get_as_float = false): string|float {}",
"function getMicroTime() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float) $usec + (float) $sec);\n }",
"private function getMicrotime()\n {\n $mtime = microtime();\n $mtime = explode(\" \",$mtime);\n $mtime = $mtime[1] + $mtime[0];\n\n return $mtime;\n }",
"function timer(){\n static $start;\n\n if (is_null($start))\n {\n $start = microtime(true);\n }\n else\n {\n $diff = round((microtime(true) - $start), 4);\n $start = null;\n return $diff;\n }\n}",
"public static function getMicrotime()\n {\n return microtime(true);\n }",
"public static function currentTimeMillis()\n {\n return microtime(true) * 10000;\n }",
"public static function time() {\n if (is_null(self::$_time)) {\n self::$_time = microtime(true);\n } else {\n echo 'Time-Consumed:- ' . (microtime(true) - self::$_time) . PHP_EOL;\n }\n }",
"static function ms(){\r\n $dm = memory_get_usage() - self::$startmem;\r\n return self::memformat($dm);\r\n }",
"static function getTimeInMs() {\n\t\treturn round(microtime(true) * 1000);\n\t}",
"function microtime_float(){\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);}",
"function get_execution_time() {\n\treturn microtime(true) - __CHV_TIME_EXECUTION_STARTS__;\n}",
"private function calculateTime()\n {\n $slowest = 1000000;\n for($i=1; $i<=12; $i++){\n if($_GET['Tr'.$i] > 0 && $slowest > $this->troopCostsProperties['Tr'.$i][5] ){\n $slowest = $this->troopCostsProperties['Tr'.$i][5];\n }\n }\n $time = $this->distance/($slowest*SERVER_SPEED_RATE);\n return $time;\n }",
"function getTime(){\n\t\t$mtime = microtime();//print(\"\\n time : \" . $mtime);\n\t\t$mtime = explode(' ', $mtime);\n\t\t$mtime = $mtime[1] + $mtime[0];\n\t\treturn $mtime;\n\t}",
"private function getTime() {\n // Get the current microtime string as `microseconds seconds`\n $time_arr = microtime();\n // Add the two numbers together\n $time = array_sum(explode(' ', $time_arr));\n // Multiply by 1000 and return a 13 digit timestamp\n $microtime = $time * 1000;\n return substr($microtime, 0, 13); \n }",
"function timequery() {\n static $querytime_begin;\n list($usec, $sec) = explode(' ', microtime());\n\n if (!isset($querytime_begin)) {\n $querytime_begin = ((float) $usec + (float) $sec);\n } else {\n $querytime = (((float) $usec + (float) $sec)) - $querytime_begin;\n echo sprintf('<br />La consulta tardó %01.5f segundos.- <br />', $querytime);\n }\n}",
"function getmicrotime() {\n list($usec, $sec) = explode(\" \",microtime());\n return ((float)$usec + (float)$sec);\n }",
"public static function getCurrentMicrotime()\n\t{\n\t\treturn microtime(true);\n\t}",
"function getmicrotime(){\r\r\n list($usec, $sec) = explode(\" \",microtime());\r\r\n return ((float)$usec + (float)$sec);\r\r\n}",
"public static function getStartTime() : float\n {\n if (!isset(static::$startTime)) {\n static::$startTime = microtime(true);\n }//end if\n \n return static::$startTime;\n \n }",
"function getmicrotime()\n{\n\tlist($usec, $sec) = explode(' ',microtime());\n\treturn ((float)$usec + (float)$sec);\n}",
"function microtime_float () {\n\tlist ($msec, $sec) = explode(' ', microtime());\n\t$microtime = (float)$msec + (float)$sec;\n\treturn $microtime;\n}",
"function getmicrotime(){\r\n\tlist($usec, $sec) = explode(\" \",microtime());\r\n\treturn ((float)$usec + (float)$sec);\r\n}",
"static function ts(){\r\n $dt = microtime(true) - self::$starttime;\r\n return self::mtformat($dt);\r\n }",
"static public function get_time() {\n // By Zach Buller ([email protected])\n $time1 = \\microtime();\n \\settype($time1, 'string'); //convert to string to keep trailing zeroes\n $time2 = explode(\" \", $time1);\n $sub_secs = \\preg_replace('/0./', '', $time2[0], 1);\n $time3 = ($time2[1].$sub_secs)/100;\n return $time3;\n }",
"protected function getElapsedTimeInMs()\n {\n return (microtime(true) - $this->start) * 1000;\n }",
"private function _upTime() \n {\n return microtime(true) - $this->_startTime;\n }",
"function microtime_float()\n {\n list( $usec, $sec ) = explode( \" \", microtime() );\n return ( ( float ) $usec + ( float ) $sec );\n }",
"public static function totalDuration()\n {\n return microtime(true) - static::initialTime();\n }",
"public function checkLoadTime($url)\n {\n $time = microtime( true);\n file_get_contents($url);\n $time = microtime( true) - $time;\n\n return round($time * 1000); //output in miliseconds\n }",
"public function getExecutionTime()/*# : float */;",
"function microtime_float()\n{\n list($usec, $sec) = explode(\" \", microtime());\n\t return ((float)$usec + (float)$sec);\n}",
"function getMilliSecond() {\n\tlist($s1, $s2) = explode(' ', microtime());\n\treturn (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);\n}",
"public function runtime ()\n {\n return time() - $this->_start_time;\n }",
"function etime($time_start){\n $time_end = microtime(true);\n $execution_time = ($time_end - $time_start);\n\n return number_format((float) $execution_time, 1);\n}",
"public static function uptime() {\n return sprintf ( '%.6f', microtime ( true ) - microtime(true) );\n }",
"public static function getExecutionTime() {\n\t\treturn (microtime(true) - $_SERVER[\"REQUEST_TIME\"]);\n\t}",
"public static function timeSinceStart(): float\n {\n return \\microtime(true) - self::getRequestTime();\n }",
"public static function ms(): int\n {\n return round((static::elapsed() * 1000), 0);\n }",
"public function getExecTime(): float\n\t{\n\t\tif ( null === $this->start_time ) {\n\t\t\t$this->start_time = microtime( true );\n\t\t\treturn 0;\n\t\t}\n\t\treturn microtime( true ) - $this->start_time;\n\t}",
"function adodb_microtime()\n{\n\treturn microtime(true);\n}",
"function GetExecutionTime($start) \r\n{\r\n\t//return sprintf('%1.6f', (microtime(true) - $start)) . ' sec';\r\n\treturn (microtime(true) - $start) . ' sec';\r\n}",
"function microtime_float() {\n\tlist($usec, $sec) = explode(' ', microtime());\n\treturn ((float)$usec + (float)$sec);\n}",
"function microtime_float(){\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}",
"private function microtime_float() \n\t{\n\t\t\n \tlist($usec, $sec) = explode(\" \", microtime());\n \treturn ((float)$usec + (float)$sec);\n \t\n\t}",
"function millitime()\n{\n\treturn (int) (microtime(1) * 1000);\n}",
"function microtime_float()\n{\n $micro = explode(' ', microtime());\n return (float)$micro[0] + (float)$micro[1];\n}",
"function good_microtime()\n{ \n list($usec, $sec) = explode(\" \",microtime()); \n return ((float)$usec + (float)$sec); \n}",
"protected function _time($reset = false)\n {\n static $start;\n\n $res = 0;\n if ($reset) {\n $res = microtime(true) - $start;\n }\n $start = microtime(true);\n\n return $res;\n }",
"function microtime_float()\n{\n\tlist($usec, $sec) = explode(\" \", microtime());\n\treturn ((float)$usec + (float)$sec);\n}",
"function microtime_float() {\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n }",
"function microtime_float()\n{\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}",
"function microtime_float()\n{\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}",
"function microtime_float()\n{\n list($usec, $sec) = explode(\" \", microtime());\n return ((float)$usec + (float)$sec);\n}",
"public function getElapsedTime();",
"private function microtime_float()\n\t{\n\t\tlist($usec, $sec) = explode(\" \", microtime());\n\t\treturn ((float)$usec + (float)$sec);\n\t}",
"public function getTime()\n {\n return (float)sprintf(\"%.1f\", 1000*(microtime(true) - $this->startTime));\n }",
"function getProfile()\n{\n\tglobal $time_start, $db;\n\n\t$start = $time_start;\n\t$end = gettimeofday();\n\t$dbcalls = count($db->queries);\n\t$dbtime = $db->time;\n\n\t$total = (float)($end['sec'] - $start['sec']) + ((float)($end['usec'] - $start['usec'])/1000000);\n\t$script = $total - $dbtime;\n\t$scriptper = $script / $total;\n\n\t$ret = round($total, 3) . 's, ' . round(100 * $scriptper, 1) . '% PHP, ' . round(100* (1 - $scriptper), 1) . '% SQL with ' . $dbcalls . ' ' . makeLink('queries', $_SERVER['QUERY_STRING'] . '&sqlprofile');\n\n\treturn $ret;\n}",
"public function runtime()\n {\n return sprintf('%.5f', ($this->endTime-$this->startTime));\n }",
"public function getTime()\n {\n return $this->platformSupportsNanoseconds()\n ? hrtime(true)\n : microtime(true);\n }",
"public static function microtimeFloat()\t{\n\t\tlist($usec, $sec) = explode(\" \", microtime());\n\t\treturn ((float)$usec + (float)$sec);\n\t}",
"public function time() {\n return $this->info['total_time'];\n }",
"public function time()\n\t{\n\t\treturn $this->endTimer-$this->startTimer;\n\t}",
"private function _getMillisecond()\n {\n\n list($s1, $s2) = explode(' ', microtime());\n return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);\n }",
"private function milliseconds()\n {\n $mt = explode(' ', microtime());\n return bcadd($mt[1], $mt[0], 8);\n }",
"protected function nowInMilliseconds(): int\n {\n $mt = explode(' ', microtime());\n return ((int) $mt[1]) * 1000 + ((int) round((int) $mt[0] * 1000));\n }",
"private function get_time_interval() {\n if ($this->microtime_start === null) {\n $this->microtime_start = microtime(true);\n return 0.0;\n }\n $now = microtime(true);\n $dif = $now - $this->microtime_start;\n $this->microtime_start = $now;\n return $dif;\n }",
"function getSystemTime()\n{\n $time = @gettimeofday();\n $resultTime = $time['sec'] * 1000;\n $resultTime += floor($time['usec'] / 1000);\n return $resultTime;\n}",
"function milliseconds()\n{\n $mt = explode(' ', microtime());\n return ((int)$mt[1]) * 1000 + ((int)round($mt[0] * 1000));\n}",
"protected static function _time()\n\t{\n\t\treturn time();\n\t}",
"public function servertime() {\n\t\tif(is_null($this->sync))\n\t\t\t$this->synchronize();\n\t\treturn (int) (microtime(true) * 1000) + $this->sync;\n\t}"
] | [
"0.8237121",
"0.8155949",
"0.79802734",
"0.78449786",
"0.77981275",
"0.7655175",
"0.76313174",
"0.7604903",
"0.7545735",
"0.7545402",
"0.75084317",
"0.7433377",
"0.74146855",
"0.73518664",
"0.7275209",
"0.72590244",
"0.72511",
"0.71914285",
"0.7182672",
"0.7179836",
"0.7178604",
"0.7156048",
"0.7155854",
"0.7133785",
"0.71186423",
"0.71024406",
"0.7081075",
"0.70418334",
"0.70018315",
"0.6991112",
"0.6928643",
"0.69268405",
"0.6908441",
"0.6905341",
"0.6904838",
"0.68603414",
"0.6837624",
"0.6834497",
"0.6810286",
"0.6799294",
"0.6798387",
"0.67747796",
"0.6769436",
"0.67600054",
"0.67348456",
"0.6728484",
"0.6693285",
"0.6687943",
"0.6684093",
"0.66804063",
"0.66780037",
"0.66736454",
"0.66639006",
"0.66564715",
"0.66438663",
"0.6642421",
"0.66330546",
"0.6617188",
"0.65954137",
"0.6591774",
"0.6588453",
"0.6582544",
"0.6573608",
"0.6539082",
"0.653667",
"0.6536452",
"0.6535375",
"0.6526004",
"0.65224874",
"0.651717",
"0.6511389",
"0.6503271",
"0.6492109",
"0.64718103",
"0.64645547",
"0.6464511",
"0.6461935",
"0.6448672",
"0.6447146",
"0.64359134",
"0.6426458",
"0.6426458",
"0.6426458",
"0.6415082",
"0.63994634",
"0.6398604",
"0.6394137",
"0.6388465",
"0.6383743",
"0.6373521",
"0.6362407",
"0.63513976",
"0.6320248",
"0.6319988",
"0.6317489",
"0.6314955",
"0.63142717",
"0.6278169",
"0.626521",
"0.62365174"
] | 0.6795104 | 41 |
used inside tpl files for printing the tpl quickly | function t ()
{
echo TPL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function print_template()\n {\n }",
"public function print_template()\n {\n }",
"public final function print_template()\n {\n }",
"public function print_templates()\n {\n }",
"private function output() {\n \n Quantum\\Output::smartyRender();\n \n }",
"function tpl_display($template)\n{\n global $config;\n\n // caching enabled?\n if ($config['http_caching'])\n {\n require_once('./core/httpcache.php');\n httpCacheCaptureStart();\n }\n\n tpl_display_show($template, !$config['http_caching']);\n\n if ($config['http_caching'])\n {\n httpCacheOutput($template, httpCacheCaptureEnd());\n }\n}",
"private function include_tpl($tpl_page){\r\n\t\r\n\t\tprint $this->show($tpl_page);\r\n\t}",
"function Template()\r\n\t{\r\n\t\t$this->out = \"\";\r\n\t\t$this->objs = array();\r\n\t\t$this->vars = array();\r\n\t\t$this->data = &$data;\r\n\t\t$this->use_getvar = false;\r\n\t}",
"public function run()\n\t{\n\t\techo vsprintf($this->template,$this->_contents);\n\t}",
"public function printConfiguration () {\n echo static::substituteTemplateVariables($this->template);\n }",
"public function printContent()\n {\n GeneralUtility::logDeprecatedFunction();\n echo $this->moduleTemplate->renderContent();\n }",
"function display($tags)\n\t{\n\t\tglobal\t$gProfiler;\n\n\t\t# substitute other tags\n\t\t$this->sub_tags($tags);\n\n\n\t\techo $this->output;\n\n\t\tif\t($gProfiler)\n\t\t{\n\t\t\t$len\t=\tnumber_format(strlen($this->output)/ 1024,2) ;\n\t\t\t$gProfiler->log(\"template page size:$len Kb\");\n\n\t\t\t# displays profiler output if turned on\n\t\t\t$gProfiler->display();\n\t\t}\n\n\t}",
"public function display (string $tpl, array $vars = NULL)\n {\n }",
"public static function pagingTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/paging.tpl.php\"); ?>\n<?php\n }",
"function tf_print($value, $die = false) {\r\n static $first_time = true;\r\n\r\n if ($first_time) {\r\n ob_start();\r\n ?><style type=\"text/css\">\r\n div.tf_print_r {\r\n max-height: 500px;\r\n overflow-y: scroll;\r\n background: #111;\r\n margin: 10px 30px;\r\n padding: 0;\r\n border: 1px solid #F5F5F5;\r\n position: relative;\r\n z-index: 10;\r\n }\r\n\r\n div.tf_print_r pre {\r\n color: #47EE47;\r\n text-shadow: 1px 1px 0 #000;\r\n font-family: Consolas, monospace;\r\n font-size: 12px;\r\n margin: 0;\r\n padding: 5px;\r\n display: block;\r\n line-height: 16px;\r\n text-align: left;\r\n }\r\n </style><?php\r\n echo str_replace(array(' ', \"\\n\"), '', ob_get_clean());\r\n }\r\n\r\n ?><div class=\"tf_print_r\"><pre><?php print htmlspecialchars(tf_print_r($value, true), null, 'UTF-8'); ?></pre></div><?php\r\n\r\n $first_time = false;\r\n\r\n if ($die) die();\r\n }",
"function BasicHead()\n{\n print LoadTemplate(\"basic_head\");\n\n $_SESSION[\"head_printed\"] = true;\n}",
"function render() {\r\n $sendOutput = true;\r\n // check if plog is configured to use conditional http headers and stuff like\r\n // that... Also, use the HttpCache class to determine whether we should send the\r\n // content or not\r\n if ($this->isCached()) {\r\n // some debug information\r\n $timestamp = $this->_templateObject->getCreationTimestamp();\r\n // and now send the correct headers\r\n if (Http_Cache::httpConditional($timestamp, $this->getCacheTimeSeconds())) $sendOutput = false;\r\n $header = \"Last-Modified: \" . gmdate('D, d M Y H:i:s', $timestamp) . ' GMT';\r\n header($header);\r\n }\r\n else {\r\n // send the results if needed\r\n $sendOutput = true;\r\n }\r\n if ($sendOutput) {\r\n // pass all the values to the template object\r\n $this->_templateObject->assign($this->_params);\r\n // and finally send them after calling the pre-processing method\r\n $content = $this->_templateObject->fetch($this->getViewId());\r\n print ($content);\r\n }\r\n }",
"function display($tpl = null) {\r\n if ($tpl != null) {\r\n $this->setTemplate($tpl);\r\n }\r\n if ($this->_raw == null) {\r\n $this->_smarty->assign('data', $this->_data);\r\n $this->_smarty->assign('tpl', $this->_tpl);\r\n $this->_smarty->assign('lang', $this->_lang);\r\n if ($this->_debug != null) {\r\n $this->_smarty->assign('debug', $this->_debug);\r\n }\r\n }\r\n else {\r\n foreach ($this->_raw as $key => $value) {\r\n $this->_smarty->assign($key, $value);\r\n }\r\n }\r\n $this->_smarty->assign('asblock', false);\r\n $this->_smarty->display($this->__tplfile);\r\n }",
"public static function indexTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/index.tpl.php\"); ?>\n<?php\n }",
"public function render() {\n $content = $this->preRender($this->lang);\n $content .= $this->renderHeader($this->lang);\n $this->bytes = memory_get_peak_usage();\n $content .= $this->internalRender($this->rootNode, $this->currentPageOnRootNode);\n//echo 'PageTree2(' . get_class($this) . '): ' . formatBytes(memory_get_peak_usage()-$this->bytes) . '<br />';\n $content .= $this->renderFooter($this->lang);\n $content .= $this->postRender($this->lang);\n return $content;\n }",
"function wp_print_revision_templates()\n {\n }",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"public function printContent() {}",
"function start_capture () {\n if ($this->display_template_output) {\n\t // ob_end_clean(); // Clear out the capture buffer. Removed in v4.3.3\n\t ob_start();\n\t}\n }",
"function customize_themes_print_templates()\n {\n }",
"function tpl_display_show($template, $flush = true)\n{\n smarty_display('header.tpl');\n\n if ($flush) flush();\n smarty_display($template);\n smarty_display('footer.tpl');\n}",
"function output() {\r\n\t\t\tforeach ($this->vars as $var =>$val)\r\n\t\t\t\t$$var = $val;\r\n\t\t\tif($this->parent_view)\r\n\t\t\t\tforeach ($this->parent_view->vars as $var =>$val)\r\n\t\t\t\t\t$$var = $val; // TODO: Check extract() for an alternative method\r\n\t\t\t\r\n\t\t\t$path = Kennel::cascade(\"{$this->view}\", 'views');\r\n\t\t\tif (!$path) return debug::error(\"View <strong>{$this->view}</strong> not found.\");\r\n\t\t\t\r\n\t\t\t//begin intercepting the output buffer\r\n\t\t\tob_start();\r\n\t\t\t\r\n\t\t\tif($path) require($path);\r\n\t\t\t\r\n\t\t\t//return the output and close the buffer\r\n\t\t\treturn ob_get_clean();\r\n\t\t\t\r\n\t\t\t//unset all template variables\r\n\t\t\tforeach ($this->vars as $var =>$val) {\r\n\t\t\t\tunset($$var);\r\n\t\t\t}\r\n\t\t}",
"public function display() {\r\n echo $this->template;\r\n }",
"function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}",
"function template_manual()\n{\n\tglobal $context, $scripturl, $txt;\n\n\techo '<table width=\"100%\" height=\"50%\" bgcolor=\"#FFCC99\"><tr><td><b><center>', $context['viber_id'], '</center></b></td></tr></table>';\n}",
"function tpl_page($help = '', $title = '')\n{\n tpl_language();\n tpl_header($help, $title);\n tpl_footer();\n}",
"public function render()\n\t{\n\t\t$this->printer->render();\n\t}",
"private function arrayToPrint()\n\t{\n\t\t$this->view->addToReplace($this->langArr);\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->arrRender['CONTENT'] = $this->view\n\t\t\t->setTemplateFile('employeeedit')->renderFile();\n\t\t$this->view->addToReplace($this->arrRender);\n\t\t$this->view->setTemplateFile('index')->templateRender();\n\t}",
"function ahr_render_tpl( $path, $data = array() ) {\r\n \r\n ob_start();\r\n include( $path );\r\n $output = ob_get_clean();\r\n echo $output;\r\n \r\n}",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"public function render_panel_templates()\n {\n }",
"public function display_template($echo = false){\n\n $this->smarty->assignLang(\"site_name\", SITE_NAME); \n $this->smarty->assignLang(\"site_tag_line\", SITE_TAG_LINE); \n $this->smarty->assign(\"root_dir\", ROOT_DIR); \n $this->smarty->assign(\"www_server\", WWW_SERVER);\n $this->smarty->assign(\"admin_server\", ADMIN_SERVER);\n $this->smarty->assign(\"domain\", DOMAIN);\n $this->smarty->assign(\"secure_server\", SECURE_SERVER);\n $this->smarty->assign(\"form_action\", htmlspecialchars($_SERVER['PHP_SELF']) . '?' . $_SERVER[\"QUERY_STRING\"]);\n $this->smarty->assign(\"onloadscript\", $this->onloadscript);\n if(sizeof($this->warn_controls) == 0){\n $this->smarty->assign(\"set_focus_control\", $this->set_focus_control);\n }else{\n $this->smarty->assign(\"set_focus_control\", $this->warn_controls[0]);\t\t\n }\n $this->smarty->assign(\"warnings\", $this->warnings);\n $this->smarty->assign(\"data\", $this->data);\n $this->smarty->assign(\"show_warnings\", sizeof($this->warnings) >0);\n $this->smarty->assign(\"warn_controls\", $this->warn_controls); \n $this->smarty->assign(\"page_title\", htmlspecialchars($this->page_title));\n $this->smarty->assign(\"menu_item\", $this->menu_item);\t\t\n $this->smarty->assign(\"tracker_location\", $this->tracker_location);\t\t\t\t\n $this->smarty->assign(\"show_tracker\",$this->show_tracker);\t\t\t\t\n $this->smarty->assign(\"viewstate\", $this->serialize_viewstate());\n\t\t$this->smarty->assign(\"rss_link\", $this->rss_link);\n\t\t$this->smarty->assign(\"current_url\", $_SERVER['REQUEST_URI']);\n\t\t$this->smarty->assign(\"google_maps_key\", GOOGLE_MAPS_KEY);\n\t\t$this->smarty->assign(\"use_body_script\", $this->use_body_script);\n\n foreach($this->warn_controls as $warn_control) {\n $this->assign('warn_' . $warn_control, true);\n }\n\n if ($echo != false){\n $this->smarty->display($this->smarty_template);\n }else{\n echo $this->smarty->fetch($this->smarty_template); \n }\n }",
"function display ( $template, $data = array() ) {\r\n $template = $this->_twig->loadTemplate( $template );\r\n\r\n // elapsed_time and memory_usage\r\n $data[ 'elapsed_time' ] = $this->CI->benchmark->elapsed_time( 'total_execution_time_start', 'total_execution_time_end' );\r\n $memory = ( !function_exists( 'memory_get_usage' ) ) ? '0' : round( memory_get_usage() / 1024 / 1024, 2 ) . 'MB';\r\n $data[ 'memory_usage' ] = $memory;\r\n $template->display( $data );\r\n }",
"protected function printTFoot()\n {\n $total = count($this->total);\n $length = strcasecmp($this->typeReport['long'], 'classes') == 0 ? -2 : -1;\n\n echo str_repeat('-', $this->width).PHP_EOL;\n echo 'A TOTAL OF ' . $total\n . ' ' . substr(strtoupper($this->typeReport['long']), 0, $length)\n . ($total > 1 ? ($length == -2 ? 'E' : '') . 'S WERE' : ' WAS')\n . ' FOUND';\n if ($this->totalExcludes > 0 || $this->totalConditions > 0) {\n echo PHP_EOL . 'WITH ';\n }\n if ($this->totalExcludes > 0) {\n echo $this->totalExcludes . ' EXCLUDED FROM PARSING';\n }\n if ($this->totalConditions > 0) {\n if ($this->totalExcludes > 0) {\n echo ', ';\n }\n echo $this->totalConditions . ' EXCLUDED ON CONDITIONAL CODE';\n }\n echo PHP_EOL;\n if ($total > 0\n && get_class($this) !== 'PHP_CompatInfo_Report_Reference'\n ) {\n echo 'REQUIRED PHP ' . $this->globalVersions[0] . ' (MIN) ';\n if (!empty($this->globalVersions[1])) {\n echo $this->globalVersions[1] . ' (MAX)';\n }\n echo PHP_EOL;\n }\n $this->printResourceUsage();\n echo str_repeat('-', $this->width) . PHP_EOL;\n }",
"protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }",
"public function print_js_template_row()\n {\n }",
"protected function content_template()\n\t{\n\t\t//\n\t}",
"public function print() {\n $output = Util::outputBufferSafe(function() {\n /** @noinspection PhpIncludeInspection */\n include $this->page_info->getSourceAbsolutePath();\n });\n $this->minifier->add($output);\n echo $this->minifier->minify();\n }",
"protected function content_template() {\n\t}",
"public function output() {\n\n if (!file_exists($this->view)) {\n \treturn \"Voeg eerst een template toe ($this->view).<br />\";\n }\n $output = file_get_contents($this->view);\n \n foreach ($this->variabeles as $key => $variable) {\n \t$tagToReplace = \"[@$key]\";\n \t$output = str_replace($tagToReplace, $variable, $output);\n }\n\n return $output;\n }",
"public static function editAllTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/edit_all.tpl.php\"); ?>\n<?php\n }",
"protected function _run()\n {\n $this->strictVars(true);\n\n //assign variables to the template engine\n $vars = get_object_vars($this);\n foreach ($vars as $key => $value) {\n if ('_' != substr($key, 0, 1)) {\n $this->_smarty->assign($key, $value);\n }\n }\n\n //why 'this'?\n //to emulate standard zend view functionality\n //doesn't mess up smarty in any way\n $this->_smarty->assign_by_ref('this', $this);\n\n //smarty needs a template_dir, and can only use templates,\n //found in that directory, so we have to strip it from the filename\n $file = func_get_arg(0);\n\n echo $this->_smarty->fetch($file);\n //process the template (and filter the output)\n }",
"function show() {\n // Abort if empty file\n if($this->oParser->oManager->tsCurDate < 1) {\n return;\n }\n \n // We want to process the output later\n ob_start();\n\n $this->printHeading();\n $this->printDailyMessages();\n $this->printAbsentTeachers();\n $this->printStandInTable();\n $this->printStandInTableFooter();\n\n $str = ob_get_clean();\n #debugPrint($str);\n echo vpBeautifyString($str);\n }",
"public function renderTemplate();",
"public static function importTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/import.tpl.php\"); ?>\n<?php\n }",
"function pied()\n\t{\n\t\techo \"\\t\".'</body>'.\"\\n\".'</html>';\n\t}",
"public static function updateTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/update.tpl.php\"); ?>\n<?php\n }",
"protected function content_template() {}",
"protected function content_template() {}",
"function smarty_modifier_debug_print_var( $var, $depth = 0, $length = 40 )\r\n{\r\n $_replace = array( \"\\n\" => \"<i>\\\\n</i>\", \"\\r\" => \"<i>\\\\r</i>\", \"\\t\" => \"<i>\\\\t</i>\" );\r\n switch ( gettype( $var ) )\r\n {\r\n case \"array\" :\r\n $results = \"<b>Array (\".count( $var ).\")</b>\";\r\n foreach ( $var as $curr_key => $curr_val )\r\n {\r\n $results .= \"<br>\".str_repeat( \" \", $depth * 2 ).\"<b>\".strtr( $curr_key, $_replace ).\"</b> => \".smarty_modifier_debug_print_var( $curr_val, ++$depth, $length );\r\n $depth--;\r\n }\r\n break;\r\n case \"object\" :\r\n $object_vars = get_object_vars( $var );\r\n $results = \"<b>\".get_class( $var ).\" Object (\".count( $object_vars ).\")</b>\";\r\n foreach ( $object_vars as $curr_key => $curr_val )\r\n {\r\n $results .= \"<br>\".str_repeat( \" \", $depth * 2 ).\"<b> ->\".strtr( $curr_key, $_replace ).\"</b> = \".smarty_modifier_debug_print_var( $curr_val, ++$depth, $length );\r\n $depth--;\r\n }\r\n break;\r\n case \"boolean\" :\r\n case \"NULL\" :\r\n case \"resource\" :\r\n if ( TRUE === $var )\r\n {\r\n $results = \"true\";\r\n }\r\n else if ( FALSE === $var )\r\n {\r\n $results = \"false\";\r\n }\r\n else if ( NULL === $var )\r\n {\r\n $results = \"null\";\r\n }\r\n else\r\n {\r\n $results = htmlspecialchars( ( boolean )$var );\r\n }\r\n $results = \"<i>\".$results.\"</i>\";\r\n break;\r\n case \"integer\" :\r\n case \"float\" :\r\n $results = htmlspecialchars( ( boolean )$var );\r\n break;\r\n case \"string\" :\r\n $results = strtr( $var, $_replace );\r\n if ( $length < strlen( $var ) )\r\n {\r\n $results = substr( $var, 0, $length - 3 ).\"...\";\r\n }\r\n $results = htmlspecialchars( \"\\\"\".$results.\"\\\"\" );\r\n break;\r\n case \"unknown type\" :\r\n default :\r\n do\r\n {\r\n $results = strtr( ( boolean )$var, $_replace );\r\n if ( $length < strlen( $results ) )\r\n {\r\n $results = substr( $results, 0, $length - 3 ).\"...\";\r\n }\r\n $results = htmlspecialchars( $results );\r\n break;\r\n } while ( 1 );\r\n }\r\n return $results;\r\n}",
"public function render (string $tpl, array $vars = NULL)\n {\n }",
"protected function template() {\n\t\treturn '';\n\t}",
"function wp_print_file_editor_templates()\n {\n }",
"public function html(){\n\n $all = [];\n $all['id'] = $this->id;\n $all['item'] = $this;\n $all['fields'] = $this->getFields();\n\n foreach ($this->getParams() as $key => $value) {\n $all['p_' . $key] = $value;\n }\n\n return view('components.' . $this->component->name . '.print' , $all)->render();\n }",
"public function print_js_templates() {\n\n\t\t$templates = apply_filters(\n\t\t\t'croco-ik/dashboard/js-page-templates',\n\t\t\tarray(\n\t\t\t\t'main' => 'common/main',\n\t\t\t\t'header' => 'common/header',\n\t\t\t\t'logger' => 'common/logger',\n\t\t\t\t'video' => 'common/video',\n\t\t\t\t'choices' => 'common/choices',\n\t\t\t\t'progress' => 'common/progress',\n\t\t\t\t'progress_alt' => 'common/progress-alt',\n\t\t\t),\n\t\t\t$this->get_subpage()\n\t\t);\n\n\t\tforeach ( $templates as $name => $path ) {\n\n\t\t\tob_start();\n\t\t\tinclude Plugin::instance()->get_view( $path );\n\t\t\t$content = ob_get_clean();\n\n\t\t\tprintf(\n\t\t\t\t'<script type=\"text/x-template\" id=\"cbw_%1$s\">%2$s</script>',\n\t\t\t\t$name,\n\t\t\t\t$content\n\t\t\t);\n\t\t}\n\n\t}",
"function init_tpl(){\n foreach($this->extra_var as $k=>$v){\n $this->ss->assign($k,$v);\n }\n if($this->action_type == 'editview'){\n/* It's for date fields - start */\n global $timedate, $current_user;\n $this->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());\n $this->ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format());\n $time_format = $timedate->get_user_time_format();\n $this->ss->assign('TIME_FORMAT', $time_format);\n\n $date_format = $timedate->get_cal_date_format();\n $time_separator = ':';\n $match='';\n if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)){\n $time_separator = $match[1];\n }\n $t23 = strpos($time_format, '23') !== false ? '%H' : '%I';\n if (!isset($match[2]) || $match[2] == ''){\n $this->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M');\n }\n else{\n $pm = $match[2] == 'pm' ? '%P' : '%p';\n $this->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M' . $pm);\n }\n $this->ss->assign('CALENDAR_FDOW', $current_user->get_first_day_of_week());\n $this->ss->assign('TIME_SEPARATOR', $time_separator);\n/* It's for date fields - end */\n }\n $this->ss->assign('count_values',$this->count_values);\n $this->ss->assign('count',count($this->count_values)-1);\n $this->ss->assign('displayParams',$this->displayParams);\n $this->ss->assign('vardef',$this->vardef);\n $this->ss->assign('module',$this->related_module);\n $this->ss->assign('values',$this->bean->{$this->value_name});\n $this->ss->assign('showSelectButton',$this->showSelectButton);\n $this->ss->assign('hideShowHideButton',$this->hideShowHideButton);\n $this->ss->assign('APP',$GLOBALS['app_strings']);\n }",
"protected function compile() {\n if (TL_MODE == 'BE') {\n $this->genBeOutput();\n } else {\n $this->genFeOutput();\n }\n }",
"function render($return = FALSE) \n\t{\t\t\n\t\t$out = '';\n\t\tob_start();\n\n\t\t// iterate through data\n\t\tforeach ($this->data as $k => $v)\t\t\t\t\n\t\t{\n\t\t\t // if data is template object\n\t\t\tif (is_object($v) && strtolower(get_class($v)) == 'template')\n\t\t\t{\n\t\t\t\t// render it\n\t\t\t\t$this->data[$k] = $v->render(TRUE);\n\n\t\t\t\t// output the part\n\t\t\t\tif (!$this->file) echo $this->data[$k];\n\t\t\t}\n\t\t}\n\n\t\tif ($this->file) echo $this->out(TRUE);\n\t\t$buffer = ob_get_contents();\n\t\t@ob_end_clean();\n\t\tif ($return) return $buffer;\n\t\techo $buffer;\n\t}",
"function PrintEot($template,$EXT=\"htm\"){\n\tglobal $tplpath;\n\tif(!$template) $template=N;\n\t$path=R_P.\"template/$tplpath/$template.$EXT\";\n\t!file_exists($path) && $path=R_P.\"template/wind/$template.$EXT\";\n\treturn $path;\n}",
"protected function _content_template() {\n\t}",
"public static function listFeedsTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/list_feeds.tpl.php\"); ?>\n<?php\n }",
"public function slate_template_debug() {\n\t\tglobal $dbs, $post;\n\t\twp_reset_query();\n\t\tif( $dbs->is_template_debug && is_me() ): ?>\n\t\t\t<div class=\"debug-current-template\">\n\t\t\t\t<strong>Current template:</strong> <?php $this->get_current_template( true ); ?>\n\t\t\t\t<span>Ran <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?>s. Ready in <span id=\"dbsready\"></span>s. Post ID: <?php echo $post->ID?></span>\n\t\t\t</div>\n\t\t\t<script>jQuery( window ).load( function() { jQuery( \"#dbsready\").html( (window.performance.timing.domContentLoadedEventStart - window.performance.timing.connectEnd) / 1000 ); }); </script>\n\t\t\t<script>jQuery( window ).load( function() { jQuery(\"img[srcset]:not('.avatar')\").each(function(){ var currentSrc = this.currentSrc.substr(this.currentSrc.lastIndexOf('/') + 1); jQuery(this).wrap('<span class=\"srcset-debug\"></span>'); jQuery(this).parent().append('<span class=\"srcset-debug__currentsrc\">Current Src: ' + currentSrc + '</span>'); }); });</script>\n\t\t\t <?php if ( defined( 'DEBUG' ) && defined( 'SAVEQUERIES' ) ) dump( $wpdb->queries ); ?>\n\t\t <?php endif;\n\t}",
"function parseTemplateText()\r\n\t{\r\n\t\t$buf = '';\r\n\t\t// we only need this if we are going to use JSP tags for wrapping\r\n\t\t// scriptlet blocks\r\n\t\t//if ($this->reader->matches('<' . '\\\\%'))\r\n\t\t//{\r\n\t\t//\t$buf .= '<' . '%';\r\n\t\t//}\r\n\r\n\t\t$buf .= $this->reader->nextContent();\r\n\r\n\t\t// don't output meaningless whitespace\r\n\t\tif (trim($buf) == '')\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\telseif ($this->ctxt->options->isElIgnored() || strpos($buf, '${') === false)\r\n\t\t{\r\n\t\t\treturn $buf;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn '<?php echo $pageContext->evaluateTemplateText(' . StringUtils::quote($buf) . ');?>';\r\n\t\t}\r\n\t}",
"public function print_out()\n {\n echo \"id: \" . $this->id . \"<br/>\";\n echo $this->rewrite;\n echo $this->extension;\n echo $this->stranglerPattern;\n echo $this->continuousEvolution;\n echo $this->split;\n echo $this->processStrategyOthers;\n echo $this->ddd;\n echo $this->functionalDecomposition;\n echo $this->existingStructure;\n echo $this->decompositionStrategyOthers;\n echo $this->SCA;\n echo $this->MDA;\n echo $this->WDA;\n echo $this->DMC;\n echo $this->techniqueOthers;\n echo $this->GR;\n echo $this->MO;\n echo $this->sourceCode;\n echo $this->useCase;\n echo $this->systemSpecification;\n echo $this->API;\n echo $this->inputOthers;\n echo $this->list;\n echo $this->archi;\n echo $this->outputOthers;\n echo $this->experiment;\n echo $this->example;\n echo $this->caseStudy;\n echo $this->noValidation;\n echo $this->maintainability;\n echo $this->performance;\n echo $this->reliability;\n echo $this->scalability;\n echo $this->security;\n echo $this->qualityOthers;\n echo $this->score;\n echo $this->matchScore;\n echo $this->misMatch . \"<br/>\";\n }",
"public static function editFeedTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/edit_feed.tpl.php\"); ?>\n<?php\n }",
"function smarty_function_echo($params, &$smarty)\n{\n if(isset($smarty->parent->tpl_vars[$params['var']]))\n {\n return $smarty->parent->tpl_vars[$params['var']]->value;\n }\n return isset($params['default'])?$params['default']:\"\";\n}",
"function int()\n {\n// $smarty->setTemplateDir(TPL_PATH);\n// $smarty->setCompileDir(COMPILE_PATH);\n// $smarty->setCacheDir(CACHE_PATH);\n// $smarty->display(\"admin/admin.html\");\n //$this->smarty->display(\"admin/admin.html\");\n $smarty=new smarty();\n }",
"public function actionGetTpl($order_id=999)\n {\n $obj = $this->c->getOrderObj($order_id);\n \n $ret = $obj->houseContract->contracts[0]->getTemplate();\n $ret = iconv('utf-8', 'gbk', $ret);\n print_r($ret);\n echo 'job done!';\n }",
"public function print();",
"function print_content()\n{\n ob_start();\n $content = $GLOBALS['content'];\n if (!isset($content))\n {\n $content .= \"No Content to display\";\n }\n print($content);\n ob_end_flush();\n}",
"function print_late_styles()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }"
] | [
"0.76623225",
"0.76619375",
"0.7503938",
"0.74810016",
"0.64501905",
"0.6390756",
"0.6383989",
"0.62984324",
"0.62812495",
"0.62311244",
"0.6227261",
"0.621729",
"0.6174669",
"0.61682355",
"0.6164689",
"0.61630076",
"0.6146603",
"0.6111265",
"0.6100565",
"0.606238",
"0.6062096",
"0.59901947",
"0.59901947",
"0.59901947",
"0.59901947",
"0.59901947",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.5989249",
"0.598896",
"0.598896",
"0.598896",
"0.59833425",
"0.59804493",
"0.59748745",
"0.5967675",
"0.59539086",
"0.5949504",
"0.59314334",
"0.59223056",
"0.59201795",
"0.59011155",
"0.58959955",
"0.5894183",
"0.58935463",
"0.58935463",
"0.58935463",
"0.58904517",
"0.58903974",
"0.5880487",
"0.5860597",
"0.5849317",
"0.58402675",
"0.5831512",
"0.58240414",
"0.58131355",
"0.58126235",
"0.5812121",
"0.5808874",
"0.580669",
"0.57975066",
"0.57709974",
"0.57643056",
"0.5761352",
"0.5761147",
"0.5761147",
"0.5746311",
"0.57411486",
"0.57369596",
"0.5734657",
"0.5726133",
"0.5725766",
"0.5719469",
"0.5711873",
"0.5706765",
"0.5700869",
"0.5687148",
"0.567939",
"0.56695396",
"0.5669142",
"0.56630117",
"0.5661366",
"0.5659004",
"0.5646607",
"0.5638059",
"0.5638041",
"0.5637847",
"0.5635133",
"0.56316555",
"0.56316555",
"0.56316555"
] | 0.0 | -1 |
used inside php files for getting the tpl quickly | function tp ()
{
return TPL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _processTpl() {\n $sResult = '';\n if (file_exists($this->_sTplName)) {\n ob_start();\n require_once $this->_sTplName;\n $sResult = ob_get_clean();\n }\n\n return $sResult;\n }",
"function get_template()\n {\n }",
"public static function indexTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/index.tpl.php\"); ?>\n<?php\n }",
"private function loadSmarty()\n {\n }",
"public function loadTemplate()\n\t\t{\n\t\t}",
"abstract public function getTemplate($tpl);",
"function getTemplate();",
"public function processaTemplate() {\n return $this->fetch('ricerca_'.$this->_layout.'.tpl');\n }",
"protected function _loadTemplates()\n {\n $this->_tpl = array();\n $dir = Solar_Class::dir($this, 'Data');\n $list = glob($dir . '*.php');\n foreach ($list as $file) {\n \n // strip .php off the end of the file name to get the key\n $key = substr(basename($file), 0, -4);\n \n // load the file template\n $this->_tpl[$key] = file_get_contents($file);\n \n // we need to add the php-open tag ourselves, instead of\n // having it in the template file, becuase the PEAR packager\n // complains about parsing the skeleton code.\n // \n // however, only do this on non-view files.\n if (substr($key, 0, 4) != 'view') {\n $this->_tpl[$key] = \"<?php\\n\" . $this->_tpl[$key];\n }\n }\n }",
"protected function _parseTemplate() {}",
"public function get_template()\n {\n }",
"public function get_template()\n {\n }",
"public function tempalte()\n \t{\n \t\t$this->load->template('index-1');\n \t}",
"function get_tem_p($m,$filename,$blockname='',$c=false){\r\n $link = $_SESSION['template'].\"/tpl/\".$m.'/'.$filename.$this->ext;\r\n // kiem tra su ton tai cua file giao dien\r\n if(!file_exists($link)){\r\n global $lang,$plugin;\r\n $link = $plugin.$m.\"/tpl/\".$filename.$this->ext;\r\n if(!file_exists($link)){\r\n die(\"Không tìm thấy file giao diện \".$link);\r\n }\r\n // load giao dien mac dinh cua plugin\r\n }\r\n if ($this->cache_tpl['file_'.$filename]) $file_content = $this->cache_tpl['file_'.$filename];\r\n\t\telse {\r\n\t\t\t$this->cache_tpl['file_'.$filename] = $file_content = file_get_contents($link);\r\n\t\t}\r\n\t\treturn $file_content;\r\n }",
"public function template();",
"function ahr_render_tpl( $path, $data = array() ) {\r\n \r\n ob_start();\r\n include( $path );\r\n $output = ob_get_clean();\r\n echo $output;\r\n \r\n}",
"private function renderTemplate(){\n\t\trequire($this->TemplateFile);\n\t}",
"public static function importTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/import.tpl.php\"); ?>\n<?php\n }",
"function st_get_template($file,$data = array()){\r $file = ST_DIR.'/templates/'.$file;\r if(file_exists($file)){\r include($file); return true;\r }\r return false;\r}",
"function tmp($tpl_name, $t, $layout = 'default') {\r\n\r\n\t$t[\"msg\"]\t\t\t=\tisset($t[\"msg\"]) ? date(\"Y-m-d H:i:s\").\" \"\r\n\t\t\t\t\t\t\t.$t[\"msg\"] : \"\";\r\n\t$t[\"tpl_name\"]\t\t=\t$tpl_name;\r\n\r\n\t$t['web_logo']\t\t=\tuser_log('web_logo');\r\n\t$t['web_header']\t=\tuser_log('web_header');\r\n\r\n\t$t['_r']\t\t\t=\tisset($t[\"_r\"]) ? $t[\"_r\"] : $GLOBALS['_r'];\r\n\t$t['_v']\t\t\t=\tisset($t[\"_v\"]) ? $t[\"_v\"] : $GLOBALS['_v'];\r\n\t$t['_a']\t\t\t=\tisset($t[\"_a\"]) ? $t[\"_a\"] : $GLOBALS['_a'];\r\n\r\n\t// load default layout\t\r\n\tif ($layout == 'default') {\r\n\t\t$layout \t\t= isset($t['layout']) ? $t['layout'] : $t[\"def_layout\"];\r\n\t}\r\n \r\n\t// no layout, just load the tpl\r\n\tif ($layout == \"\" or $layout == NULL or $layout == false) {\r\n\t\tinclude_once(path_tmp($tpl_name));\r\n\t// load the layout first\r\n\t} else {\r\n\t\tinclude_once(path_tmp($layout));\r\n\t}\r\n}",
"protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}",
"protected function content_template() {}",
"protected function content_template() {}",
"public static function pagingTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/paging.tpl.php\"); ?>\n<?php\n }",
"public static function updateTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/update.tpl.php\"); ?>\n<?php\n }",
"public function loadTemplate(){\n\t\t$tpl = $this->template;\n\t\t$file = $this->path . DIRECTORY_SEPARATOR . $tpl . '.tmpl.php';\n\t\t$exists = file_exists($file);\n\t\t// Wenn Template vorhanden\n\t\tif( $exists ){\n\n\t\t\tob_start();\n\t\t\tinclude $file;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\n\n\t\t\treturn $output;\n\t\t}else{\n\t\t\treturn 'Datei nicht gefunden!';\n\t\t}\n\t}",
"function db_get_template ($tpl_name, &$tpl_source, &$smarty_obj) {\n Global $loq;\n $rs = $loq->_adb->Execute(\"select template from \".T_TEMPLATES.\" where templatename='$tpl_id'\");\n if($rs !== false && !$rs->EOF){\n $tpl_source = $rs->fields[0];\n }\n return true;\n}",
"function tpl_load ($path, array $content, array $data) {\n \n // set up path\n $file = DIR_TPL . \"/$path.php\";\n \n if (!is_file($file)) {\n trigger_error(\"Unknown template '$path'!\");\n }\n\n // create helpers\n $cKey=function($k){echo tpl_key($k);};\n $cVal=tpl_create_content_closure($content);\n $cOut=tpl_create_content_closure($content, /*output*/true);\n \n // create scoped varibles \n extract($data);\n\n // process template\n ob_start();\n include $file;\n $output = ob_get_contents();\n ob_end_clean();\n \n // clean up\n unset($cOut, $cVal, $cKey);\n \n foreach ($data as $_k => $_v) {\n unset($$_k);\n }\n \n // done\n return $output;\n\n }",
"public static function editAllTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/edit_all.tpl.php\"); ?>\n<?php\n }",
"public function processaTemplate() {\n return $this->fetch('partita_'.$this->_layout.'.tpl');\n }",
"function Template()\r\n\t{\t\t\r\n\t\tglobal $_REQUEST;\t\t\r\n\t\t$theme = $this->theme;\r\n\t\t/*** Get Template By Page Id ***/\r\n\t\t$file = $this->get_template();\r\n\t\t\r\n\t\tif($_SETTINGS['debug'] == 1){\r\n\t\t\techo \"TEMPLATE: \".$file.\" <Br>\";\r\n\t\t}\r\n\t\t\r\n\t\t$websitepath = $this->website_path;\r\n\t\t//die(\"FILE: $file\");\r\n\t\t//exit();\r\n\t\tinclude''.$_SERVER['DOCUMENT_ROOT'].$websitepath.'themes/'.$theme.''.$file.'';\r\n\t}",
"protected function content_template() {\n\t}",
"public function getMainTpl(){\n return $this->templates['main'];\n }",
"private function include_tpl($tpl_page){\r\n\t\r\n\t\tprint $this->show($tpl_page);\r\n\t}",
"public function renderTemplate();",
"public function readtpl(string $tpl_temp):string{\n\t\t$extension = explode('.',$tpl_temp);\n\t\t$extension = end($extension);\n\t\tif(strtolower($extension) == 'tpl'){\n\t\t\tif (!file_exists($this->template_dir . Options::get('template') . '/'.$tpl_temp)) \n\t\t\t\treturn \"Error loading template file <br />\";\n\t\t\telse\n\t\t\t\treturn file_get_contents($this->template_dir . Options::get('template') . '/'.$tpl_temp);\n\t\t}\n\t}",
"abstract public function getTemplate();",
"function CK04()\n {\n global $template;\n global $id,$param, $top_url;\n\n//echo \"top: $top_url\";\n\n // 상세 정보 가져온다\n $data = $this->get_detail( $id );\n\n $master_code = substr( $template, 0,1);\n include \"template/\" . $master_code .\"/\" . $template . \".htm\";\n }",
"protected function content_template()\n\t{\n\t\t//\n\t}",
"public function getTemplate() {}",
"function getTemplate($param){\r\n global $modx;\r\n\r\n $template = '';\r\n\r\n if ($modx->getChunk($param) != '') {\r\n $template = $modx->getChunk($param);\r\n } else if(substr($param, 0, 6) == '@FILE:') {\r\n $template = $this->get_file_contents(substr($param, 6));\r\n } else if(substr($param, 0, 6) == '@CODE:') {\r\n $template = substr($param, 6);\r\n } else if(substr($param, 0, 5) == '@FILE') {\r\n $template = $this->get_file_contents(trim(substr($param, 5)));\r\n } else if(substr($param, 0, 5) == '@CODE') {\r\n $template = trim(substr($param, 5));\r\n } else {\r\n $template = '';\r\n }\r\n\r\n return $template;\r\n }",
"private function loadTemplate() {\n\t\t\tinclude('template.inc.php');\n\t\t\t$this->mainTemplate = new Template();\n\t\t\t$this->mainTemplate->readTpl('main');\n\t\t}",
"protected function getCurrentParsedTemplate() {}",
"public function actionGetTpl($order_id=999)\n {\n $obj = $this->c->getOrderObj($order_id);\n \n $ret = $obj->houseContract->contracts[0]->getTemplate();\n $ret = iconv('utf-8', 'gbk', $ret);\n print_r($ret);\n echo 'job done!';\n }",
"function renderTemplate($tID, $values, $blocks){\n\t\t $GLOBALS['extra_css'] = array_unique($GLOBALS['extra_css']);\n\t\t $GLOBALS['extra_js'] = array_unique($GLOBALS['extra_js']);\n\t\t //get the template\n\t\t $this->baseReplaces['extra_css'] = $this->renderCss($GLOBALS['extra_css']);\n $this->baseReplaces['extra_js'] = $this->renderJs($GLOBALS['extra_js']);\n\t\t\t\n $this->baseReplaces['working_dir'] = $GLOBALS['working_dir']; // add as late as possible because connector will set it very late\n// \t\t\techo $GLOBALS['working_dir'];\n $values = array_merge($values, $this->baseReplaces);\n\t\t\t\n\t\t\t\n\t\t\t//do the parsing\n\t\t\tif(!isset($this->fh)) $this->fh = $this->sp->fh;\n\n\t\t\tif($this->settings->render_cache_level == 1){\n\t\t\t\tif(!isset($this->phpTemplateCache[$tID])) {\n\t\t\t\t\t$cacheName = str_replace('/', '_', $tID);\n\t\t\t\t\t$cacheName = explode('.', $cacheName);\n\t\t\t\t\t$cacheName = $this->fh->getPath($this->settings->render_cache_folder.'/'.$cacheName[0].'.php');\n\t\t\t\t\tif(!file_exists($cacheName)){\n\t\t\t\t\t\t$tpl = $this->getRawTemplate($tID);\n\t\t\t\t\t\t$ca = fopen($cacheName, 'w');\n\t\t\t\t\t\t$tpl = str_replace('\\'', '\\\\\\'', $tpl);\n\t\t\t\t\t\t$tpl = $this->replaceValues($tpl, array());\n\t\t\t\t\t\t$tpl = $this->replaceDynamics($tpl, array(), $tID);\n\t\t\t\t\t\t$tpl = $this->parseServiceTags($tpl);\n\t\t\t\t\t\t/*fwrite($ca, '<?php $this->phpTemplateCache[\\''.$tID.'\\'] = create_function(\\'$values, $blocks\\', \\'return \\\\\\''.addcslashes($tpl, '\\'\\\\').'\\\\\\';\\');?>');*/\n\t\t\t\t\t\tfwrite($ca, '<?php use at\\foundation\\core; $this->phpTemplateCache[\\''.$tID.'\\'] = \\'render_'.str_replace('/', '_', $tID).'\\'; function render_'.str_replace('/', '_', $tID).'($values, $blocks){ return \\''.$tpl.'\\';}?>');\n\t\t\t\t\t\tfclose($ca);\n\t\t\t\t\t}\n\t\t\t\t\trequire_once($cacheName);\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$tpl = call_user_func($this->phpTemplateCache[$tID], $values, $blocks);\t\n\t\t\t} else {\n\t\t\t\t$tpl = $this->getRawTemplate($tID);\n\t\t\t\t$tpl = $this->replaceValues($tpl, $values);\n\t\t\t\t$tpl = $this->replaceDynamics($tpl, $blocks, $tID);\n\t\t\t\t$tpl = $this->cleanDynamics($tpl);\n\t\t\t\t$tpl = $this->parseServiceTags($tpl);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $tpl;\n\t\t}",
"function get_tem_m($m,$filename,$blockname='',$c=false){\r\n $link = $_SESSION['template'].\"/tpl/\".$m.'/'.$filename.$this->ext;\r\n // kiem tra su ton tai cua file giao dien\r\n if(!file_exists($link)){\r\n global $lang,$module;\r\n $link = $module.$m.\"/tpl/\".$filename.$this->ext;\r\n if(!file_exists($link)){\r\n die(\"Không tìm thấy file giao diện \".$link);\r\n }\r\n // load giao dien mac dinh cua module\r\n }\r\n if ($this->cache_tpl['file_'.$filename]) $file_content = $this->cache_tpl['file_'.$filename];\r\n\t\telse {\r\n\t\t\t$this->cache_tpl['file_'.$filename] = $file_content = file_get_contents($link);\r\n\t\t}\r\n\t\treturn $file_content;\r\n }",
"function tpl_page($help = '', $title = '')\n{\n tpl_language();\n tpl_header($help, $title);\n tpl_footer();\n}",
"function load_template()\n{\n $CI =& get_instance();\n $CI->load->library('sistema');\n $CI->parser->parse($CI->sistema->tema['template'],get_tema());\n}",
"function tpl_display($template)\n{\n global $config;\n\n // caching enabled?\n if ($config['http_caching'])\n {\n require_once('./core/httpcache.php');\n httpCacheCaptureStart();\n }\n\n tpl_display_show($template, !$config['http_caching']);\n\n if ($config['http_caching'])\n {\n httpCacheOutput($template, httpCacheCaptureEnd());\n }\n}",
"abstract public function getTemplateFile();",
"public function showTemplate(){\n\t\tinclude \"view/template.php\";\n\t}",
"public function loadTemplate()\n\t{\n\t\t$t_location = \\IPS\\Request::i()->t_location;\n\t\t$t_key = \\IPS\\Request::i()->t_key;\n\t\t\n\t\tif ( $t_location === 'block' and $t_key === '_default_' and isset( \\IPS\\Request::i()->block_key ) )\n\t\t{\n\t\t\t/* Find it from the normal template system */\n\t\t\tif ( isset( \\IPS\\Request::i()->block_app ) )\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Application::load( \\IPS\\Request::i()->block_app ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Plugin::load( \\IPS\\Request::i()->block_plugin ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\t\n\t\t\t$location = $plugin->getTemplateLocation();\n\t\t\t\n\t\t\t$templateBits = \\IPS\\Theme::master()->getRawTemplates( $location['app'], $location['location'], $location['group'], \\IPS\\Theme::RETURN_ALL );\n\t\t\t$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];\n\t\t\t\n\t\t\tif ( ! isset( \\IPS\\Request::i()->noencode ) OR ! \\IPS\\Request::i()->noencode )\n\t\t\t{\n\t\t\t\t$templateBit['template_content'] = htmlentities( $templateBit['template_content'], ENT_DISALLOWED, 'UTF-8', TRUE );\n\t\t\t}\n\t\t\t\n\t\t\t$templateArray = array(\n\t\t\t\t'template_id' \t\t\t=> $templateBit['template_id'],\n\t\t\t\t'template_key' \t\t\t=> 'template_' . $templateBit['template_name'] . '.' . $templateBit['template_id'],\n\t\t\t\t'template_title'\t\t=> $templateBit['template_name'],\n\t\t\t\t'template_desc' \t\t=> null,\n\t\t\t\t'template_content' \t\t=> $templateBit['template_content'],\n\t\t\t\t'template_location' \t=> null,\n\t\t\t\t'template_group' \t\t=> null,\n\t\t\t\t'template_container' \t=> null,\n\t\t\t\t'template_rel_id' \t\t=> null,\n\t\t\t\t'template_user_created' => null,\n\t\t\t\t'template_user_edited' => null,\n\t\t\t\t'template_params' \t => $templateBit['template_data']\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ( \\is_numeric( $t_key ) )\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key, 'template_id' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $ex )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->json( array( 'error' => true ) );\n\t\t\t}\n\n\t\t\tif ( $template !== null )\n\t\t\t{\n\t\t\t\t$templateArray = array(\n\t 'template_id' \t\t\t=> $template->id,\n\t 'template_key' \t\t\t=> $template->key,\n\t 'template_title'\t\t=> $template->title,\n\t 'template_desc' \t\t=> $template->desc,\n\t 'template_content' \t\t=> ( isset( \\IPS\\Request::i()->noencode ) AND \\IPS\\Request::i()->noencode ) ? $template->content : htmlentities( $template->content, ENT_DISALLOWED, 'UTF-8', TRUE ),\n\t 'template_location' \t=> $template->location,\n\t 'template_group' \t\t=> $template->group,\n\t 'template_container' \t=> $template->container,\n\t 'template_rel_id' \t\t=> $template->rel_id,\n\t 'template_user_created' => $template->user_created,\n\t 'template_user_edited' => $template->user_edited,\n\t 'template_params' \t => $template->params\n\t );\n\t\t\t}\n\t\t}\n\n\t\tif ( \\IPS\\Request::i()->show == 'json' )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( $templateArray );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->sendOutput( \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \\IPS\\Theme::i()->getTemplate( 'templates', 'cms', 'admin' )->viewTemplate( $templateArray ) ), 200, 'text/html', \\IPS\\Output::i()->httpHeaders );\n\t\t}\n\t}",
"protected function _content_template() {\n\t}",
"protected function _content_template()\n {\n\n }",
"public static function listFeedsTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/list_feeds.tpl.php\"); ?>\n<?php\n }",
"public static function editFeedTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/edit_feed.tpl.php\"); ?>\n<?php\n }",
"function Template()\r\n\t{\r\n\t\t$this->out = \"\";\r\n\t\t$this->objs = array();\r\n\t\t$this->vars = array();\r\n\t\t$this->data = &$data;\r\n\t\t$this->use_getvar = false;\r\n\t}",
"function smarty_resource_text_get_template($tpl_name, &$tpl_source, &$smarty_obj) {\n\t$tpl_source = $tpl_name;\n\treturn true;\n}",
"public function display_template($echo = false){\n\n $this->smarty->assignLang(\"site_name\", SITE_NAME); \n $this->smarty->assignLang(\"site_tag_line\", SITE_TAG_LINE); \n $this->smarty->assign(\"root_dir\", ROOT_DIR); \n $this->smarty->assign(\"www_server\", WWW_SERVER);\n $this->smarty->assign(\"admin_server\", ADMIN_SERVER);\n $this->smarty->assign(\"domain\", DOMAIN);\n $this->smarty->assign(\"secure_server\", SECURE_SERVER);\n $this->smarty->assign(\"form_action\", htmlspecialchars($_SERVER['PHP_SELF']) . '?' . $_SERVER[\"QUERY_STRING\"]);\n $this->smarty->assign(\"onloadscript\", $this->onloadscript);\n if(sizeof($this->warn_controls) == 0){\n $this->smarty->assign(\"set_focus_control\", $this->set_focus_control);\n }else{\n $this->smarty->assign(\"set_focus_control\", $this->warn_controls[0]);\t\t\n }\n $this->smarty->assign(\"warnings\", $this->warnings);\n $this->smarty->assign(\"data\", $this->data);\n $this->smarty->assign(\"show_warnings\", sizeof($this->warnings) >0);\n $this->smarty->assign(\"warn_controls\", $this->warn_controls); \n $this->smarty->assign(\"page_title\", htmlspecialchars($this->page_title));\n $this->smarty->assign(\"menu_item\", $this->menu_item);\t\t\n $this->smarty->assign(\"tracker_location\", $this->tracker_location);\t\t\t\t\n $this->smarty->assign(\"show_tracker\",$this->show_tracker);\t\t\t\t\n $this->smarty->assign(\"viewstate\", $this->serialize_viewstate());\n\t\t$this->smarty->assign(\"rss_link\", $this->rss_link);\n\t\t$this->smarty->assign(\"current_url\", $_SERVER['REQUEST_URI']);\n\t\t$this->smarty->assign(\"google_maps_key\", GOOGLE_MAPS_KEY);\n\t\t$this->smarty->assign(\"use_body_script\", $this->use_body_script);\n\n foreach($this->warn_controls as $warn_control) {\n $this->assign('warn_' . $warn_control, true);\n }\n\n if ($echo != false){\n $this->smarty->display($this->smarty_template);\n }else{\n echo $this->smarty->fetch($this->smarty_template); \n }\n }",
"public function print_template()\n {\n }",
"public function print_template()\n {\n }",
"protected function getPreparedTemplate() {}",
"private function getRawTemplate($tID){\n\t\t\t$tpl = '';\n\t\t\tif(isset($this->rawTemplateCache[$this->template.'::'.$tID])){\n\t\t\t\t$tpl = $this->rawTemplateCache[$this->template.'::'.$tID];\n\t\t\t} else {\n\t\t\t\t$file = $GLOBALS['config']['root'].$this->getTemplateDir().$tID.'.html';\n\t\t\t\tif(!is_file($file)) $file = $GLOBALS['config']['root'].'_templates/'.$this->settings->tpl_base_template.'/'.$tID.'.html';\n\t\t\t\t//echo $file.'<br />';\n\t\t\t\t//print_r($this->config);\n\t\t\t\tif(is_file($file)){\n\t\t\t\t\t$tpl = $this->loadFile($file);\n\t\t\t\t\t$tpl = $this->generateFullyQualifiedNames($tpl, '');\n\t\t\t\t\t$this->rawTemplateCache[$this->template.'::'.$tID] = $tpl;\n\t\t\t\t} else {\n\t\t\t\t\t$this->_msg(str_replace(array('{file}'), array($file),$this->_('FILE_NOT_FOUND', 'core')), Messages::DEBUG_ERROR);\n\t\t\t\t\treturn str_replace(array('{file}'), array($file),$this->_('FILE_NOT_FOUND', 'core'));\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $tpl;\n\t\t}",
"function tpl_include(Template $that, string $tpl): string\n{\n $matches = null;\n if (false === preg_match_all('/<include\\s+(.*)\\s*\\/>/', $tpl, $matches)) {\n throw new Exception(\"Template error\");\n }\n foreach ($matches[0] as $key => $match) {\n $arg = $matches[1][$key];\n //$tpl = str_replace($match, \"<?php \\$this->show($arg, \\$__data); ? >\", $tpl);\n $tpl = str_replace($match, \"<?php \\$__cacheFile = \\$this->getCachefile($arg); if (!file_exists(\\$__cacheFile )) \\$this->process($arg, get_defined_vars()); include \\$this->getCachefile($arg); ?>\", $tpl);\n }\n\n return $tpl;\n}",
"public function render()\n {\n \n $v = $this->vars;\n \n ob_start();\n foreach( $this->templates as $template )\n {\n if( Fs::exists( GAIA_PATH.'modules/'.$template.'.tpl' ) )\n include GAIA_PATH.'modules/'.$template.'.tpl';\n elseif( Fs::exists( GAIA_PATH.'wbf/'.$template.'.tpl' ) )\n include GAIA_PATH.'wbf/'.$template.'.tpl';\n else \n echo 'Missing Template '.$template.NL;\n }\n \n $maincontent = ob_get_contents();\n ob_end_clean();\n \n $this->renderedContent = $maincontent;\n\n return $this->renderedContent;\n\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"protected function render_template()\n {\n }",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"public function getTemplate();",
"private function loadMasterTemplate() {\n\t\t//SOME_THEMES should be defined in SOME_PATH/includes/defines.php\n\t\t$path_and_file = SOME_THEMES.DS.$this->template.DS.$this->file.'.php';\n\t\tif (!file_exists($path_and_file)) {\n\t\t\tthrow new SomeFileNotFoundException(\"Master template file {$this->file} for {$this->template} not found\");\n\t\t}\n\t\t\n\t\tob_start();\n\t\t//$content = file_get_contents(SOME_THEMES.DS.'default'.DS.'index.php');\n\t\t$templatefile = $path_and_file;\n\t\trequire_once($templatefile);\n\t\t$content = ob_get_clean();\n\t\treturn $content;\n\t}",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"function find_template (){\n $scriptbasename = basename ($_SERVER['PHP_SELF']);\n\n// Disable STS for popups: moved to sts_default module since v4.4\n\n // Check for module that will handle the template (for example module sts_index takes care of index.php templates)\n\t$check_file = 'sts_'.$scriptbasename;\n\t$modules_installed = explode (';', MODULE_STS_INSTALLED);\n\tif (!in_array($check_file, $modules_installed)) $check_file = 'sts_default.php';\n\n include_once (DIR_WS_MODULES.'sts/'.$check_file);\n\t$classname=substr($check_file,0,strlen($check_file)-4);\n\t$this->script=new $classname; // Create an object from the module\n\t\n// If module existes but is disabled, use the default module.\n\tif ($this->script->enabled==false) {\n\t unset ($this->script);\n include_once (DIR_WS_MODULES.'sts/sts_default.php');\n\t $this->script=new sts_default; // Create an object from the module\t \n\t}\n\t\n\t$this->template_file = $this->script->find_template($scriptbasename); // Retrieve the template to use, $scriptbasename added in v4.4\n\treturn $this->template_file ;\n }",
"public function fetch($tpl);",
"function fileaccess_gettemplatehtml($directory)\r\n{\r\n\t#Deze staat onder de root als er sprake is van een template dat niet verandert bij verschillende tagen\r\n\t#Wanneer er wel taalverschillen zijn dan zijn er subdirectories met de naam van de talen en die worden \r\n\t#afgezocht naar template.htm. Vanzelfsprekend wordt enkel de html file geopend van de taal die actief is.\r\n\t\r\n\t#Zit er een template.htm of html file in de root\r\n\tif(file_exists($directory.\"/template.htm\"))\r\n\t{\r\n\t\t$templatefilepath=$directory.\"/template.htm\";\r\n\t}\r\n\telseif(file_exists($directory.\"/template.html\"))\r\n\t{\r\n\t\t$templatefilepath=$directory.\"/template.html\";\r\n\t}\r\n\telse\r\n\t{\r\n\t\t#Geen templatefile in de root => taal ophalen en nakijken of er een taaldirectory is\r\n\t\trequire_once $_SERVER['DOCUMENT_ROOT'].\"/core/logic/parameters.php\";\r\n\t\t$languagestring = getlanguage();\r\n\t\t\r\n\t\t#het templatepad moet dan /templates/$directory/$languagestring/template.htm of html zijn\r\n\t\t$templatedirectory = $directory.\"/\".$languagestring;\r\n\r\n\t\tif(file_exists($templatedirectory.\"/template.htm\"))\r\n\t\t{\r\n\t\t\t$templatefilepath=$directory.\"/\".$languagestring.\"/template.htm\";\r\n\t\t}\r\n\t\telseif(file_exists($templatedirectory.\"/template.html\"))\r\n\t\t{\r\n\t\t\t$templatefilepath=$directory.\"/\".$languagestring.\"/template.htmL\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tthrow new Exception(\"Unable to find template.htm / template.html under $directory\");\r\n\t\t}\r\n\t}\r\n\t\r\n\t#Op dit punt is de uitvoering gestopt wegens een exception of is de templatefile bekend.\r\n\t#Nu moet de htmlingelezen worden en teruggegeven.\r\n\t$filehandler = fopen($templatefilepath,'r',0);\r\n\t$html = fread($filehandler,filesize($templatefilepath));\r\n\t#De HTML is ingeladen en wordt teruggegeven naar het templatesysteem voor verdere verwerking.\r\n\treturn $html;\r\n}",
"function fetch($tpl_name = null) {\n if(!$tpl_name) {\n $file = $this->file;\n } else {\n $file = $this->_get_path($tpl_name);\n }\n extract($this->vars); // Extract the vars to local namespace\n ob_start(); // Start output buffering\n include($file); // Include the file\n $contents = ob_get_contents(); // Get the contents of the buffer\n ob_end_clean(); // End buffering and discard\n return $contents; // Return the contents\n }",
"public static function addFeedTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/add_feed.tpl.php\"); ?>\n<?php\n }",
"public function Fetch_Php()\n {\n if ( 0 == count($this->_Template) )\n return '';\n\n $path = [];\n foreach ($this->_Template as $template)\n {\n $path = self::Search_Template_Extension($template, '.php');\n if ( $path )\n {\n break;\n }\n }\n if ( !$path )\n {\n Zero_Logs::Set_Message_Error('NOT FOUND view [' . implode(', ', $this->_Template) . ']');\n return '';\n }\n extract($this->_Data);\n $this->_Data = [];\n return require $path;\n }",
"function CI_Template() {\n $this->_ci_ob_level = ob_get_level();\n\t\t\n // Copy an instance of CI so we can use the entire framework.\n $this->CI = & get_instance();\n\n // Load the template config file and setup our master template and regions\n include(APPPATH . 'config/template' . EXT);\n if (isset($template)) {\n $this->config = $template;\n $this->set_template($template['active_template']);\n }\n }",
"function int()\n {\n// $smarty->setTemplateDir(TPL_PATH);\n// $smarty->setCompileDir(COMPILE_PATH);\n// $smarty->setCacheDir(CACHE_PATH);\n// $smarty->display(\"admin/admin.html\");\n //$this->smarty->display(\"admin/admin.html\");\n $smarty=new smarty();\n }",
"private function initTemplateEngine()\n {\n include_once basedir.'classes/lib/raintpl.php';\n //raintpl::$tpl_dir = \"view/\"; // template directory\n //raintpl::$cache_dir = \"tmp/\"; // cache directory\n $this->tpl = new RainTPL();\n $this->tpl->configure('tpl_dir', basedir.'view/');\n $this->tpl->configure('cache_dir', basedir.'tmp/');\n }",
"public function initTemplate() {}",
"function load_template_from_php( $name='skin_global', $full_name='skin_global_1', $id='1' )\n\t{\n\t\t$_NOW = $this->memory_debug_make_flag();\n\t\t\n\t\t//-----------------------------------------\n\t\t// File exist?\n\t\t//-----------------------------------------\n\t\t\n\t\tif( !file_exists( CACHE_PATH.\"cache/skin_cache/cacheid_\".$id.\"/\".$name.\".php\" ) )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// IN_DEV?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( IN_DEV AND $id == 1 )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Get data...\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\t$data = implode( '', file( CACHE_PATH.\"cache/skin_cache/cacheid_\".$id.\"/\".$name.\".php\" ) );\n\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Get template class\n\t\t\t//-----------------------------------------\n\t\t\n\t\t\tif ( ! is_object( $this->work_classes['class_template_engine'] ) )\n\t\t\t{\n\t\t\t\trequire_once( KERNEL_PATH . 'class_template_engine.php' );\n\n\t\t\t\t$this->work_classes['class_template_engine'] = new class_template();\n\t\t\t}\n\t\t\t\n\t\t\t$toeval = $this->work_classes['class_template_engine']->convert_cache_to_eval( $data, $full_name );\n\t\t\t\n\t\t\t#if ( $name == 'skin_topic' ) { print $toeval; exit(); }\n\t\t\t\n\t\t\teval( $toeval );\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire_once( CACHE_PATH.\"cache/skin_cache/cacheid_\".$id.\"/\".$name.\".php\" );\n\t\t}\n\t\t\n\t\t$this->compiled_templates[ $name ] = new $full_name();\n\t\t$this->compiled_templates[ $name ]->ipsclass =& $this;\n\t\n\t\t# Add to loaded templates\n\t\t$this->loaded_templates[ $full_name ] = $full_name;\n\t\n\t\t$this->memory_debug_add( \"IPSCLASS: Loaded skin file - $name\", $_NOW );\n\t\t\n\t\treturn TRUE;\n\t}",
"public function include_template_functions() {\n\n\t}",
"function getTemplate(){\n\t\treturn $this->html_result;\n\t}",
"public static function listItemsTpl()\n {\n extract(FeedPage::$var);\n?>\n<?php include(\"tpl/list_items.tpl.php\"); ?>\n<?php\n }",
"function templateLoader($html_file){\n\t\t$this->html_file=$html_file;\n\t\t$this->html_result=file_get_contents($this->html_file);\n\t}",
"private function load_template()\r\n\t{\r\n\t\tif(! $this -> loaded)\r\n\t\t{\r\n\t\t\t$controller = $this -> sp -> targetdir().\"/\".sp_StaticProjector::templates_dir.\"/\".$this->name.\"_controller.php\";\r\n\t\t\tsp_StaticRegister::push_object(\"sp\", $this -> sp);\r\n\t\t\t\r\n\t\t\tif(!file_exists($controller))\r\n\t\t\t{\r\n $controller = $this -> sp -> coretemplatesdir().\"/\".$this->name.\"_controller.php\";\r\n if(! file_exists($controller)) {\r\n $controller = $this -> sp -> coretemplatesdir().\"/default_controller.php\";\r\n }\r\n\t\t\t\t/*if($this -> name == \"default\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$default_controller = $this -> sp -> defaultsdir().\"/default_controller.php\";\r\n\t\t\t\t\t@copy($default_controller, $controller);\r\n\t\t\t\t\tchmod($controller,sp_StaticProjector::file_create_rights);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$base_code = file_get_contents($this -> sp -> defaultsdir().\"/new_controller.txt\");\r\n\t\t\t\t\t$controller_code = str_replace(\"%controller_name%\", $this->name.\"_controller\", $base_code);\r\n\t\t\t\t\tfile_put_contents($controller, $controller_code);\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\trequire_once($controller);\r\n\r\n\t\t\t$template = $this -> sp -> targetdir().\"/\".sp_StaticProjector::templates_dir.\"/\".$this->name.\"_template.php\";\r\n\t\t\tif(!file_exists($template))\r\n\t\t\t{\r\n $template = $this -> sp -> coretemplatesdir().\"/\".$this->name.\"_template.php\";\r\n if(! file_exists($template)) {\r\n $template = $this -> sp -> coretemplatesdir().\"/default_template.php\";\r\n }\r\n\t\t\t\t/*if($this -> name == \"default\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$default_template = $this -> sp -> defaultsdir().\"/default_template.php\";\r\n\t\t\t\t\t@copy($default_template, $template);\r\n\t\t\t\t\tchmod($template,sp_StaticProjector::file_create_rights);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$chunks_code = \"\";\r\n\t\t\t\t\t$chunk_base = file_get_contents($this -> sp -> defaultsdir().\"/new_template_chunk.txt\");\r\n\t\t\t\t\tforeach($this -> sp -> get_config() -> default_templates_chunks() as $chunk)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$chunks_code .= str_replace(\"%chunk_name%\",$chunk,$chunk_base);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$template_base = file_get_contents($this -> sp -> defaultsdir().\"/new_template.txt\");\r\n\t\t\t\t\t$template_code = str_replace(\"%template_name%\", $this -> name.\"_template\", $template_base);\r\n\t\t\t\t\t$template_code = str_replace(\"%template_chunks%\", $chunks_code, $template_code);\r\n\t\t\t\t\tfile_put_contents($template, $template_code);\r\n\t\t\t\t}*/\r\n\t\t\t}\r\n\t\t\trequire_once($template);\r\n\t\t\tsp_StaticRegister::pop_object(\"sp\");\r\n\t\t\t\r\n\t\t\t$this -> loaded = true;\r\n\t\t}\r\n\t}",
"function init_tpl(){\n foreach($this->extra_var as $k=>$v){\n $this->ss->assign($k,$v);\n }\n if($this->action_type == 'editview'){\n/* It's for date fields - start */\n global $timedate, $current_user;\n $this->ss->assign('CALENDAR_DATEFORMAT', $timedate->get_cal_date_format());\n $this->ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format());\n $time_format = $timedate->get_user_time_format();\n $this->ss->assign('TIME_FORMAT', $time_format);\n\n $date_format = $timedate->get_cal_date_format();\n $time_separator = ':';\n $match='';\n if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)){\n $time_separator = $match[1];\n }\n $t23 = strpos($time_format, '23') !== false ? '%H' : '%I';\n if (!isset($match[2]) || $match[2] == ''){\n $this->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M');\n }\n else{\n $pm = $match[2] == 'pm' ? '%P' : '%p';\n $this->ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . '%M' . $pm);\n }\n $this->ss->assign('CALENDAR_FDOW', $current_user->get_first_day_of_week());\n $this->ss->assign('TIME_SEPARATOR', $time_separator);\n/* It's for date fields - end */\n }\n $this->ss->assign('count_values',$this->count_values);\n $this->ss->assign('count',count($this->count_values)-1);\n $this->ss->assign('displayParams',$this->displayParams);\n $this->ss->assign('vardef',$this->vardef);\n $this->ss->assign('module',$this->related_module);\n $this->ss->assign('values',$this->bean->{$this->value_name});\n $this->ss->assign('showSelectButton',$this->showSelectButton);\n $this->ss->assign('hideShowHideButton',$this->hideShowHideButton);\n $this->ss->assign('APP',$GLOBALS['app_strings']);\n }",
"protected function _content_template() {\n \n }",
"public function getGathercontentTemplate();"
] | [
"0.7122619",
"0.70603067",
"0.6981215",
"0.6967004",
"0.693553",
"0.69192785",
"0.6873383",
"0.6774718",
"0.6772257",
"0.6717482",
"0.6704554",
"0.67036736",
"0.6674561",
"0.66715604",
"0.6669176",
"0.66512686",
"0.66210294",
"0.6606519",
"0.66039765",
"0.6580662",
"0.6579661",
"0.65674806",
"0.65674806",
"0.656181",
"0.65597117",
"0.65590286",
"0.6557555",
"0.65564644",
"0.6553014",
"0.65409243",
"0.6539501",
"0.6512977",
"0.65068424",
"0.64974165",
"0.6490317",
"0.6487852",
"0.6470414",
"0.6469654",
"0.64665407",
"0.64650816",
"0.6450076",
"0.64499784",
"0.6448287",
"0.64449537",
"0.64361733",
"0.64230967",
"0.64193285",
"0.64173454",
"0.64036196",
"0.6401998",
"0.6396244",
"0.63931674",
"0.6380264",
"0.6372518",
"0.6336783",
"0.6324534",
"0.6310318",
"0.63060564",
"0.63058764",
"0.63019645",
"0.6299879",
"0.6296858",
"0.6289669",
"0.6284804",
"0.6264517",
"0.6253185",
"0.62528366",
"0.62528366",
"0.62528366",
"0.6251315",
"0.6251315",
"0.6251315",
"0.6251315",
"0.6251315",
"0.6251315",
"0.62512165",
"0.62491024",
"0.62491024",
"0.62491024",
"0.62491024",
"0.62491024",
"0.62491024",
"0.6248763",
"0.6246927",
"0.6246718",
"0.62437844",
"0.6235107",
"0.6226656",
"0.6224193",
"0.62237096",
"0.6219596",
"0.6219475",
"0.62186503",
"0.62176126",
"0.6211202",
"0.620396",
"0.62012744",
"0.6201024",
"0.61985445",
"0.6194894",
"0.6194552"
] | 0.0 | -1 |
used inside tpl files for printing a language var! | function __ ($var, $rpl = null)
{
global $main;
if (array_key_exists ($var, $main->template->vars_l))
{
if (is_array ($rpl))
$cnt = vsprintf ($main->template->vars_l[$var], $rpl);
else
$cnt = $main->template->vars_l[$var];
echo $cnt;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function printVar($varName) {\n if ( isset($this->templateVars[$varName]) ) {\n echo $this->templateVars[$varName];\n }\n }",
"function smarty_function_echo($params, &$smarty)\n{\n if(isset($smarty->parent->tpl_vars[$params['var']]))\n {\n return $smarty->parent->tpl_vars[$params['var']]->value;\n }\n return isset($params['default'])?$params['default']:\"\";\n}",
"function tpl_language()\n{\n global $smarty, $lang, $config;\n\n $smarty->assign('lang', $lang);\n $smarty->assign('config', $config);\n}",
"function smarty_function_var($params, &$smarty) {\n\tif($params['var']) {\n\t\treturn $smarty->getTemplateVars($params['var']);\n\t}\n\t\n\treturn \"\";\n}",
"function smarty_modifier_debug_print_var( $var, $depth = 0, $length = 40 )\r\n{\r\n $_replace = array( \"\\n\" => \"<i>\\\\n</i>\", \"\\r\" => \"<i>\\\\r</i>\", \"\\t\" => \"<i>\\\\t</i>\" );\r\n switch ( gettype( $var ) )\r\n {\r\n case \"array\" :\r\n $results = \"<b>Array (\".count( $var ).\")</b>\";\r\n foreach ( $var as $curr_key => $curr_val )\r\n {\r\n $results .= \"<br>\".str_repeat( \" \", $depth * 2 ).\"<b>\".strtr( $curr_key, $_replace ).\"</b> => \".smarty_modifier_debug_print_var( $curr_val, ++$depth, $length );\r\n $depth--;\r\n }\r\n break;\r\n case \"object\" :\r\n $object_vars = get_object_vars( $var );\r\n $results = \"<b>\".get_class( $var ).\" Object (\".count( $object_vars ).\")</b>\";\r\n foreach ( $object_vars as $curr_key => $curr_val )\r\n {\r\n $results .= \"<br>\".str_repeat( \" \", $depth * 2 ).\"<b> ->\".strtr( $curr_key, $_replace ).\"</b> = \".smarty_modifier_debug_print_var( $curr_val, ++$depth, $length );\r\n $depth--;\r\n }\r\n break;\r\n case \"boolean\" :\r\n case \"NULL\" :\r\n case \"resource\" :\r\n if ( TRUE === $var )\r\n {\r\n $results = \"true\";\r\n }\r\n else if ( FALSE === $var )\r\n {\r\n $results = \"false\";\r\n }\r\n else if ( NULL === $var )\r\n {\r\n $results = \"null\";\r\n }\r\n else\r\n {\r\n $results = htmlspecialchars( ( boolean )$var );\r\n }\r\n $results = \"<i>\".$results.\"</i>\";\r\n break;\r\n case \"integer\" :\r\n case \"float\" :\r\n $results = htmlspecialchars( ( boolean )$var );\r\n break;\r\n case \"string\" :\r\n $results = strtr( $var, $_replace );\r\n if ( $length < strlen( $var ) )\r\n {\r\n $results = substr( $var, 0, $length - 3 ).\"...\";\r\n }\r\n $results = htmlspecialchars( \"\\\"\".$results.\"\\\"\" );\r\n break;\r\n case \"unknown type\" :\r\n default :\r\n do\r\n {\r\n $results = strtr( ( boolean )$var, $_replace );\r\n if ( $length < strlen( $results ) )\r\n {\r\n $results = substr( $results, 0, $length - 3 ).\"...\";\r\n }\r\n $results = htmlspecialchars( $results );\r\n break;\r\n } while ( 1 );\r\n }\r\n return $results;\r\n}",
"function PrintVar(&$var, $template_safe = true)\n {\n if( !CCDebug::IsEnabled() )\n return;\n\n $t =& CCDebug::_textize($var);\n\n $html = '<pre style=\"font-size: 10pt;\">' .\n htmlspecialchars($t) .\n '</pre>';\n\n if( $template_safe )\n {\n CCPage::PrintPage( $html );\n }\n else\n {\n print(\"<html><body>$html</body></html>\");\n }\n exit;\n }",
"function print_lang($name) {\n global $lang;\n echo $lang->get_phrase($name);\n}",
"protected function getDynamicVariableHeader()\n {\n return '<br><p><p><b><u>' . __('Dynamic Template variables:') . '</u></b>' .\n ' <font color = \"#ea7601\">' . __('their values will only be seen on the frontend. In the backend you’ll see the variables themselves.') . '</font>' .\n ' ' . __('Here randomizer values will change with every page refresh.');\n }",
"function make_lang_var()\n\t{\n\t\t// Pfad einbinden\n\t\tglobal $pfad;\n\n\t\t// Backend Sprache\n\t}",
"function userpage_lang($id)\r\n{\r\n\tglobal $AVE_Template;\r\n\r\n\techo $AVE_Template->get_config_vars($id);\r\n}",
"function lang($variable, $default_text, $lang=''){\n\t\t\t\tglobal $eventon_rs;\n\t\t\t\treturn $eventon_rs->lang($variable, $default_text, $lang);\n\t\t\t}",
"function smarty_function_echo_r($params, &$smarty)\n{\n\tif(is_null($params['var']))\n\t{\n\t\techo 'NULL';\n\t\treturn;\n\t}\n\t\n if(!isset($params['var']))\n {\n\t\ttrigger_error(\"assign: missing 'var' parameter\");\n return;\n }\n\t\n\techo_r($params['var']);\n}",
"function pr($var) {\n\t\t\t\n\t\t\tob_start();\n\t\t\tprint_r($var);\n\t\t\t$content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\t\n\t\t\techo \"<pre>\";\n\t\t\techo htmlentities($content);\n\t\t\techo \"</pre>\";\n\t}",
"function ___ ($var, $rpl = null)\n{\n global $main;\n if (array_key_exists ($var, $main->template->vars_l))\n {\n if (is_array ($rpl))\n $cnt = vsprintf ($main->template->vars_l[$var], $rpl);\n else\n $cnt = $main->template->vars_l[$var];\n return $cnt;\n }\n}",
"function echo_var($var, $type='str')\n\t{\n\t\tif(exists($var))\n\t\t\techo $var;\n\t\telse\n\t\t\tswitch($type)\n\t\t\t{\n\t\t\t\tcase 'str':\n\t\t\t\t\techo '';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'num':\n\t\t\t\t\techo 0; \n\t\t\t\t\tbreak;\n\t\t\t}\t\n\t}",
"protected function getStaticVariableHeader()\n {\n return '<p><p><b><u>' . __('Static Template variables:') . '</u></b>' . ' ' .\n __('their values are written in landing page attributes in the backend.') . ' ' .\n __('The values of randomizer feature will also be written in the attibutes.');\n }",
"function yy_r169()\n {\n if (empty($this->db_quote_code_buffer)) {\n $this->_retvalue = '(string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value';\n } else {\n $this->db_quote_code_buffer .= 'echo (string)$_scope->_tpl_vars->' . substr($this->yystack[$this->yyidx + 0]->minor, 1) . '->value;';\n $this->_retvalue = false;\n }\n }",
"final private function printVariable($type, $name, $default){\n\t\t$return=$default;\n\t\t$source=false;\n\t\t$types=array(\n\t\t\t\t'get'=>$_GET,\n\t\t\t\t'post'=>$_POST,\n\t\t\t\t'session'=>(!empty($_SESSION) ? $_SESSION : null),\n\t\t\t\t'server'=>$_SERVER,\n\t\t\t\t'cookie'=>$_COOKIE,\n\t\t\t\t'files'=>$_FILES,\n\t\t\t\t'request'=>$_REQUEST,\n\t\t\t\t'env'=>$_ENV,\n\t\t\t\t);\n\t\tif(isset($types[$type])){\n\t\t\t$source=$types[$type];\n\t\t}\n\t\telse{\n\t\t\tthrow new Exception('Unknown type of data source \"'.$type.'\".');\n\t\t}\n\t\tif($source){\n\t\t\t$return=(!empty($source[$name]) ? $source[$name] : $default);\n\t\t}\n\t\treturn $return;\n\t}",
"public function display (string $tpl, array $vars = NULL)\n {\n }",
"function render(string $type=\"vars\") {\r\n $parsedStructure = $this->structureSample;\r\n switch($type) {\r\n case \"vars\":\r\n $this->templaterInstance->getVarValue();\r\n $parsedStructure = str_replace('$debug', \"\", $parsedStructure);\r\n break;\r\n case \"globalVars\":\r\n \r\n break;\r\n case \"localVars\":\r\n \r\n break;\r\n }\r\n return $parsedStructure;\r\n \r\n }",
"function pr($var)\n{\n $var_name = return_var_name($var);\n echo \"<pre> \\n\";\n echo '==============================';\n echo \"\\nBEGIN print_r of \\\"\\${$var_name}\\\"\";\n echo \"\\n------------------------------\\n\";\n print_r($var);\n echo \"\\n------------------------------\\n\";\n echo \"END print_r of \\\"\\${$var_name}\\\"\\n\";\n echo \"==============================\\n\";\n echo '</pre>' . PHP_EOL . PHP_EOL;\n}",
"function lang($var)\n\t{\n\t\tglobal $lang;\n\t\tif(substr($var, 0, 2) === 'L_')\n\t\t{\n\t\t\t$var = substr($var, 2);\n\t\t\t// check variable as it is\n\t\t\tif(isset($lang[$var]))\n\t\t\t{\n\t\t\t\treturn $lang[$var];\n\t\t\t}\n\t\t\t// check variable in lower case\n\t\t\tif(isset($lang[strtolower($var)]))\n\t\t\t{\n\t\t\t\treturn $lang[strtolower($var)];\n\t\t\t}\n\t\t\t// check variable with first letter in upper case\n\t\t\t$str = ucfirst(strtolower($var));\n\t\t\tif(isset($lang[$str]))\n\t\t\t{\n\t\t\t\treturn $lang[$str];\n\t\t\t}\n\t\t\treturn ''; //str_replace('_', ' ', $var);\n\t\t}\n\t\treturn '';\n\t}",
"private function msg($k){\r\n global $language;\r\n\r\n return $language[$k];\r\n\r\n\r\n }",
"function smarty_compiler_L($tag_arg, &$smarty)\n{\n\tglobal $user;\n\t$tag_arg = preg_replace('/[^A-Z_]*/', '', $tag_arg);\n\tif (isset($user->lang[$tag_arg]))\n\t{\n\t\treturn \"?>{$user->lang[$tag_arg]}<?php\";\n\t}\n\telse\n\t{\n\t\treturn 'echo(isset($this->_tpl_vars[\\'L_' . $tag_arg . '\\']) ? $this->_tpl_vars[\\'L_' . $tag_arg . '\\'] : \\'{L ' . $tag_arg . '}\\');';\n\t}\n}",
"function _phptemplate_variables($hook, $vars) {\n if ($hook == 'page') {\n\n if ($secondary = menu_secondary_local_tasks()) {\n $output = '<span class=\"clear\"></span>';\n $output .= \"<ul class=\\\"tabs secondary\\\">\\n\". $secondary .\"</ul>\\n\";\n $vars['tabs2'] = $output;\n }\n\n // Hook into color.module\n if (module_exists('color')) {\n _color_page_alter($vars);\n }\n return $vars;\n }\n return array();\n}",
"static function var_dump (\n\t\t$var, \n\t\t$max_levels = null, \n\t\t$label = '$',\n\t\t$return_content = null)\n\t{\n\t\tif ($return_content === 'text') {\n\t\t\t$as_text = true;\n\t\t} else {\n\t\t\t$as_text = Pie::textMode();\n\t\t}\n\t\t\n\t\t$scope = false;\n\t\t$prefix = 'unique';\n\t\t$suffix = 'value';\n\t\t\n\t\tif ($scope) {\n\t\t\t$vals = $scope;\n\t\t} else {\n\t\t\t$vals = $GLOBALS;\n\t\t}\n\t\t\n\t\t$old = $var;\n\t\t$var = $new = $prefix . rand() . $suffix;\n\t\t$vname = FALSE;\n\t\tforeach ($vals as $key => $val)\n\t\t\tif ($val === $new) // ingenious way of finding a global var :)\n\t\t\t\t$vname = $key;\n\t\t$var = $old;\n\t\t\n\t\tif ($return_content) {\n\t\t\t$ob = new Pie_OutputBuffer();\n\t\t}\n\t\tif ($as_text) {\n\t\t\techo PHP_EOL;\n\t\t} else {\n\t\t\techo \"<pre style='margin: 0px 0px 10px 0px; display: block; background: white; color: black; font-family: Verdana; border: 1px solid #cccccc; padding: 5px; font-size: 10px; line-height: 13px;'>\";\n\t\t}\n\t\tif (!isset(self::$var_dump_max_levels)) {\n\t\t\tself::$var_dump_max_levels = Pie_Config::get('pie', 'var_dump_max_levels', 5);\n\t\t}\n\t\t$current_levels = self::$var_dump_max_levels;\n\t\tif (isset($max_levels)) {\n\t\t\tself::$var_dump_max_levels = $max_levels;\n\t\t}\n\t\tself::do_dump($var, $label . $vname, null, null, $as_text);\n\t\tif (isset($max_levels)) {\n\t\t\tself::$var_dump_max_levels = $current_levels;\n\t\t}\n\t\tif ($as_text) {\n\t\t\techo PHP_EOL;\n\t\t} else {\n\t\t\techo \"</pre>\";\n\t\t}\n\t\t\n\t\tif ($return_content) {\n\t\t\treturn $ob->getClean();\n\t\t}\n\t}",
"function globalvariable($name, $tooltiptext, $first = false){\n if(!$first){ echo \", \";}\n $tooltiptext = str_replace(\"*\", \" (for debugging purposes)\", $tooltiptext);\n echo '<SPAN TITLE=\"' . $tooltiptext . '\">%' . $name . \"%</SPAN>\";\n}",
"function _renderVarDisplayBegin($form, $var)\n {\n return $this->_renderVarInputBegin($form, $var, true);\n }",
"function v($variable) {\tdie( var_dump($variable) ); }",
"function print_pre($label, $var) {\n ?>\n<p><fieldset><legend><?php echo $label; ?></legend><p><pre>\n<?php echo print_r($var, true); ?>\n</pre></p></fieldset></p>\n<?php }",
"public function getVar($var) {\n\t\tif (isset($this->tpl_vars[$var])) {\n\t\t\treturn $this->tpl_vars[$var];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}",
"public function formatVariable(){\r\n\t\t\r\n\t\tforeach($this->template as $k=>$v){\r\n\t\t\tif(preg_match('/{\\s+\\$(\\w+)}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'{\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\$(\\w+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t\tif(preg_match('/{\\s+\\$(\\w+)\\s+}/', $v, $matches)){\r\n\t\t\t\t$this->variable_lines = ($k+1);\r\n\t\t\t\t$this->error_notice[($k+1)] = 'Variable format error: The blank is not allowed with \\'{}\\' near '.$matches[1].' in '.$this->template_file.$this->template_postfix.' on line '.($k+1);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function tlogVariable($name, $variable);",
"public function dump($variable) {}",
"function var_show($var)\n{\n echo '<pre>';\n var_dump($var);\n echo '</pre>';\n}",
"function preVar($variable){\n\techo \"<pre>\";\n\tvar_dump($variable);\n\techo \"</pre>\";\n}",
"protected function debugVar($var){\n \tob_start(); \n \t$this->debug(nl2br(ob_get_clean()));\n }",
"function dump($variable)\n {\n echo '<pre>';\n print_r($variable);\n }",
"public function visitVariableAstNode( ezcTemplateVariableAstNode $var )\n {\n $this->write( '$' . $var->name );\n }",
"function get($var) {\n\t\treturn $this->_viewVars[$var];\n\t}",
"public function output_custom_fields_variables() {\n\t\t$external_fields = $this->get_all_external_fields();\n\t\t$suffix = '_' . get_the_ID();\n\n\t\techo $this->get_custom_fields_variables( $external_fields, $suffix );\n\t}",
"protected function generateLocalLang() {}",
"public function print_template()\n {\n }",
"public function print_template()\n {\n }",
"function d($var, $var_name = null) {\n?>\n <pre style=\"word-wrap: break-word; white-space: pre; font-size: 11px;\">\n<?php\n if (isset($var_name)) {\n echo \"<strong>$var_name</strong>\\n\";\n }\n if (is_null($var) || is_string($var) || is_int($var) || is_bool($var) || is_float($var)) {\n var_dump($var);\n } else {\n print_r($var);\n }\n?>\n </pre><br>\n<?php\n}",
"function ourInsideTpl($array, $content)\n {\n if (!isset($_COOKIE['char'])) { $array['char']['name'] = 'не выбран';} \n $content = str_replace(array(\"{TITLE}\", \"{USERNAME}\", \"{PROJECT}\", \"{VERSION}\", \"{CHAR}\"), array($array['title'], $array['username'], $array['system']['title_project'], $array['system']['version_cms'], $array['char']['name']), $content);\n foreach ($array['lang'] as $key => $value) {\n $content = str_replace(\n '{' . strtoupper($key) . '}',\n $value,\n $content\n );\n }\n echo $content;\n }",
"protected function getVariablesComment()\n {\n return '<p><p><b>' . __('Template variables') . '</b><br>' .\n '<p>[attribute] — e.g. [name], [price], [manufacturer], [color] — '\n . __('will be replaced with the respective product attribute value or removed if value is not available') . '<br>' .\n '<p>[attribute1|attribute2|...] — e.g. [manufacturer|brand] — ' .\n __('if the first attribute value is not available for the product the second will be used and so on untill it finds a value') . '<br>' .\n '<p>[prefix {attribute} suffix] or<br><p>[prefix {attribute1|attribute2|...} suffix] — e.g. [({color} color)] — ' .\n __('if an attribute value is available it will be prepended with prefix and appended with suffix, either prefix or suffix can be used alone') . '.<br>';\n }",
"function yy_r76(){if ($this->yystack[$this->yyidx + 0]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + 0]->minor['index']);} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + 0]->minor['var'] .')->value'.$this->yystack[$this->yyidx + 0]->minor['index']; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor['var'],\"'\"))->nocache;} }",
"function m($t, $key = '')\r\n\t{\r\n\t\t$this->arMessages[] = $t;\r\n\t\tif ($this->varMode == 'names')\r\n\t\t{\r\n\t\t\treturn (isset($this->lang[$t]) && is_array($this->lang[$t]) && isset($this->lang[$t][$key]))\r\n\t\t\t\t\t? $this->lang[$t][$key]\r\n\t\t\t\t\t: (isset($this->lang[$t]) ? $this->lang[$t] : $t);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn defined($t) ? eval(\"print $t;\") : $t;\r\n\t\t}\r\n\t}",
"function dumpvar($mixed)\n\t\t{\n\t\t\t$this->vardump($mixed);\n\t\t}",
"private function replaceLangVars($lang) {\r\n $this->template = preg_replace(\"/\\{L_(.*)\\}/isUe\", \"\\$lang[strtolower('\\\\1')]\", $this->template);\r\n }",
"protected function _injectTplVariable()\r\n {\r\n $oConfig = oxRegistry::getConfig();\r\n $sTplVariableName = $oConfig->getConfigParam('sTplVariable');\r\n if ($sTplVariableName) {\r\n $oConfig->getActiveView()->addTplParam($sTplVariableName, $this->getToxid());\r\n }\r\n }",
"function display(){\n\t//never available in any language outside of the function\n\t$data = 20;\n\techo(\"inside function Data is $data<br>\");\n}",
"function locale_variable_options_language($variable, $options) {\n return locale_language_list('name', TRUE);\n}",
"public function PrintData() {\r\n echo \"\".\"<br/>\";\r\n echo $this->string_var.\"<br/>\";\r\n echo $this->int_var.\"<br/>\";\r\n }",
"function show_ProductVariables($product_id)\n\t\t{\n\t\t\tglobal $db,$ecom_siteid;\n\t\t\t//$_REQUEST['product_id'] = $product_id;\n\t\t\t// ######################################################\n\t\t\t// Check whether any variables exists for current product\n\t\t\t// ######################################################\n\t\t\t$sql_var = \"SELECT var_id,var_name,var_value_exists, var_price \n\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\tproduct_variables \n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\tproducts_product_id = \".$product_id.\" \n\t\t\t\t\t\t\tAND var_hide= 0\n\t\t\t\t\t\tORDER BY \n\t\t\t\t\t\t\tvar_order\";\n\t\t\t$ret_var = $db->query($sql_var);\n\t\n\t\t\t\n\t\t\tif ($db->num_rows($ret_var))\n\t\t\t{\n\t\t\t\t\n\t\t ?>\n\t\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\t// Case of variables\n\t\t\t\t\tif ($db->num_rows($ret_var) or $db->num_rows($ret_msg))\n\t\t\t\t\t{\n\t\t\t\t\t\twhile ($row_var = $db->fetch_array($ret_var))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($row_var['var_value_exists']==1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// check whether values exists current variable\n\t\t\t\t\t\t\t\t$sql_vals = \"SELECT var_value_id, var_addprice,var_value \n\t\t\t\t\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct_variable_data \n\t\t\t\t\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\t\t\t\t\tproduct_variables_var_id =\".$row_var['var_id'].\" \n\t\t\t\t\t\t\t\t\t\t\t\tORDER BY \n\t\t\t\t\t\t\t\t\t\t\t\t\tvar_order\";\n\t\t\t\t\t\t\t\t$ret_vals = $db->query($sql_vals);\n\t\t\t\t\t\t\t\tif ($db->num_rows($ret_vals))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$var_Proceed = true;\n\t\t\t\t\t\t\t\t}\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$var_Proceed = true;\n\t\t\t\t\t\t\tif ($var_Proceed)// Show the variable if it is valid to show\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($row_var['var_value_exists']==1)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$var_vals='';\n\t\t\t\t\t?>\n\t\t\t\t\t\t\t <span style=\"display:block\"><strong><?php echo stripslashes($row_var['var_name'])?>:</strong>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\twhile ($row_vals = $db->fetch_array($ret_vals))\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\t//echo stripslashes($row_vals['var_value']).\",\";\n\t\t\t\t\t\t\t\t\t\t\t\tif($var_vals!='')\n\t\t\t\t\t\t\t\t\t\t\t\t$var_vals .= \",\".$row_vals['var_value'];\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t$var_vals = $row_vals['var_value'];\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\techo $var_vals;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/*?>\n\t\t\t\t\t\t\t\t\t\t\t<select name=\"var_<?php echo $row_var['var_id']?>\">\n\t\t\t\t\t\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t\t\t\t\t\twhile ($row_vals = $db->fetch_array($ret_vals))\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\t\t\t\t\t\t\t\t\t<option value=\"<?php echo $row_vals['var_value_id']?>\"><?php echo stripslashes($row_vals['var_value'])?><?php echo Show_Variable_Additional_Price($row_vals['var_addprice'])?></option>\n\t\t\t\t\t\t\t\t\t\t\t<?php\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\t\t\t\t\t\t\t</select>\t\t\t*/\t?>\t</span>\t\t\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t?> \n\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t// ######################################################\n\t\t\t\t// End of variables section\n\t\t\t\t// ######################################################\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t?>\t\n\t\t\t\n\t\t\t<?php\n\t\t\t\t\n\t\t\t}\n\t\t}",
"function logvar($v)\r\n{\r\n global $logval_level;\r\n $logval_level++;\r\n if (is_array($v)) {\r\n $m = \"[ \";\r\n $first = true;\r\n foreach ($v as $a) {\r\n if ($first)\r\n $first = false; else $m .= \", \";\r\n $m .= logvar($a);\r\n }\r\n $m .= \" ]\";\r\n\r\n } else\r\n if (is_object($v))\r\n $m = (get_class($v)); else\r\n if (is_numeric($v))\r\n $m = $v;\r\n else $m = '\"' . htmlspecialchars($v) . '\"';\r\n\r\n $logval_level--;\r\n //echo \"LV:\".$logval_level;\r\n if (!$logval_level)\r\n if (strlen($m)>32) { // Let's hide it\r\n $r=rand(1,1000000);\r\n $m= \"<span id='s$r'>\".substr($m,0,16).\"<span onclick='document.getElementById(\\\"s$r\\\").style.display=\\\"none\\\";document.getElementById(\\\"f$r\\\").style.display=\\\"inline\\\"' style='cursor:pointer; background-color:yellow'>[...]</span></span><span id='f$r' style='display:none'>$m</span>\";\r\n }\r\n\r\n return $m;\r\n}",
"public function pr($var) \n\t{\n\t\techo '<pre>';\n\t\tprint_r($var);\n\t\techo '</pre>';\n\t}",
"public function getVariable(): string\n {\n return $this->variable;\n }",
"public function display($varName , $defVaule = null)\n {\n\n if (isset($this->{$varName}) && !is_null($this->{$varName})) {\n return '\\\\setkomavar{'.$varName.'}{'.$this->{$varName}.'}'.NL;\n } elseif (!is_null($defVaule)) {\n return '\\\\setkomavar{'.$varName.'}{'.$defVaule.'}'.NL;\n } else {\n return null;\n }\n\n }",
"static function getLangVars()\n\t{\n\t\treturn array(\"pc_vacc\", \"pc_hacc\");\n\t}",
"public function updateVaribles(){\n foreach( $this->globalVars as $key=>$val ){\n $this->template = str_replace( '%'. $key .'%', $val, $this->template );\n }\n }",
"public abstract function printValue($value);",
"function get_var($value) {\n\t\tglobal $agi;\n\n\t\t$r = $agi->get_variable( $value );\n\t\tif ($r['result'] == 1) {\n\t\t\t$result = $r['data'];\n\t\t\treturn trim($result);\n\t\t}\n\t\treturn '';\n\t}",
"function vd($var) {\n\techo '<hr><pre>';\n\tvar_dump($var);\n\techo '</pre><hr>';\n}",
"function PageVariableValue($variableName, $value = UNDEFINED);",
"public function var_display_field($data)\n {\n return $this->display_field($data);\n }",
"public final function print_template()\n {\n }",
"function L($key)\n{\n global $language;\n if (empty($key)) {\n return '';\n }\n if (isset($language[$key])) {\n return $language[$key];\n }\n return \"[[$key]]\";\n}",
"public function debugprint($variable,$desc=\"\",$exit=0) {\n\t}",
"protected function setVarToTemplates()\n {\n $this->templates->set_tpl($this->varName, $this->checkNewCommondaty());\n }",
"function dump2(&$variable, $info = false) {\n $backup = $variable;\n $variable = $seed = md5(uniqid() . rand());\n $variable_name = 'unknown';\n foreach ($GLOBALS as $key => $value) {\n if ($value === $seed) { $variable_name = $key; }\n }\n $variable = $backup;\n\n echo '<pre style=\"\n font: 9pt sans-serif;\n text-align: left;\n margin: 25px;\n display: block;\n background: white;\n color: black;\n border:1px solid #ccc;\n padding:5px;\n margin: 25px;\n font-size: 11px;\n line-height: 14px;\n \">';\n\n $info = ($info) ? $info : '$' . $variable_name;\n echo '<b style=\"color:red;\">' . $info . ':</b><br>';\n do_dump($variable, '$' . $variable_name);\n echo '<b style=\"color:red;\">End ' . $info . '</b></pre>';\n}",
"function vd($var): void{\n\tvar_dump($var);\n}",
"public function output() {\n\n if (!file_exists($this->view)) {\n \treturn \"Voeg eerst een template toe ($this->view).<br />\";\n }\n $output = file_get_contents($this->view);\n \n foreach ($this->variabeles as $key => $variable) {\n \t$tagToReplace = \"[@$key]\";\n \t$output = str_replace($tagToReplace, $variable, $output);\n }\n\n return $output;\n }",
"function vlang_vars_name($str, $array){\n\t\n\tforeach($array as $k => $v){\n\t\t\n\t\t$str = str_replace('{{'.$k.'}}', $v, $str);\n\t\n\t}\n\t\n\treturn $str;\n\n}",
"function myVar_dump($var)\n{\n echo sprintf('<pre>%s</pre>', print_r($var, true));\n}",
"function yy_r91(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\'][\\'index\\']').']'; }",
"function generateTemplateVariableHTML($rec,$cntr) {\n global $_TABLES,$_CONF;\n\n $p = new Template($_CONF['path_layout'] . 'nexflow/admin');\n $p->set_file ('variables','template_variables.thtml');\n $p->set_file ('variable_rec','template_variable_record.thtml');\n\n $p->set_var('template_id',$rec);\n $p->set_var('cntr',$cntr);\n\n $sql = \"SELECT * FROM {$_TABLES['nftemplatevariables']} WHERE nf_templateID='{$rec}' ORDER BY id\";\n $query = DB_Query($sql);\n $numrows = DB_numrows($query);\n if ($numrows > 0) {\n $j=1;\n $p->set_var('show_vars','');\n $p->set_var('vdivid','');\n\n while ( $A = DB_fetchArray($query) ) {\n $edit_link = \"[ <a href=\\\"#\\\" onClick='ajaxUpdateTemplateVar(\\\"edit\\\",{$rec},{$cntr},{$j});'\\\">Edit</a> ]\";\n $del_link = \"[ <a href=\\\"#\\\" onClick='ajaxUpdateTemplateVar(\\\"delete\\\",{$rec},{$cntr},{$j});'\\\">Delete</a> ]\";\n $p->set_var('variable_name',$A['variableName']);\n $p->set_var('variable_value',$A['variableValue']);\n $p->set_var('var_id',$j);\n $p->set_var('edit_link',$edit_link);\n $p->set_var('delete_link',$del_link);\n if ($j == 1) {\n $p->parse('template_variable_records','variable_rec');\n } else {\n $p->parse('template_variable_records','variable_rec',true);\n }\n $j++;\n }\n } else {\n $p->set_var('show_vars','none');\n $p->set_var('vdivid',\"vars{$cntr}\");\n $p->set_var('template_variable_records','');\n }\n $p->parse ('output', 'variables');\n $html = $p->finish ($p->get_var('output'));\n $html = htmlentities($html);\n\n return $html;\n}",
"public function getVarForDisplay($name) {\n\t\treturn $this->_vars[$name]->getForDisplay();\n\t}",
"function translate_variable( $tag )\n{\n global $wgParser, $wgUser;\n \n switch ( strtoupper($tag) ) {\n \n case 'USERGROUPS': // @@USERGROUPS@@ pseudo-variable: Groups this user belongs to\n $wgParser->disableCache(); // Mark this content as uncacheable\n return( implode( \",\", $wgUser->getGroups() ) );\n \n case 'USERID': // @@USERID@@ pseudo-variable: User Name, blank if anonymous\n $wgParser->disableCache(); // Mark this content as uncacheable\n # getName() returns IP for anonymous users, so check if logged in first\n return( $wgUser->isLoggedIn() ? $wgUser->getName() : '' );\n \n }\n}",
"function tr($key){\n// global $lang;\n $lang = \"nl\";\n if (isset($_COOKIE['lng']))\n $lang = $_COOKIE['lng'];\n switch($key){\n case 'Prijzen' :\n\t\t\tswitch($lang){\n\t\t\t\tcase 'nl':\n\t\t\t\t\treturn \"Prijzen\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fr':\n\t\t\t\t\treturn \"Prix\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\treturn 'Rates';\n\t\t\t} \n break;\n case 'Omgeving' :\n\t\t\tswitch ($lang){\n\t\t\t\tcase 'nl':\n\t\t\t\t\treturn \"Omgeving\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'fr' :\n\t\t\t\t\treturn \"Environs\";\n \tdefault :\n\t\t\t\t\treturn \"Surroundings\";\n\t\t\t}\n break;\n }\n return \"\";\n}",
"function yy_r160(){$this->_retvalue = '\".'.'$_smarty_tpl->getVariable(\\''. substr($this->yystack[$this->yyidx + 0]->minor,1) .'\\')->value'.'.\"'; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + 0]->minor,\"'\"))->nocache; $this->compiler->has_variable_string = true; }",
"function dump($var) {\n\t\t\techo '<pre>';\n\t\t\tvar_dump($var);\n\t\t\techo '</pre>';\n\t\t}",
"function langEcho($string, $language = '', $lower = false, $replace = array(), $deleteEnters = false){\n\tGLOBAL $LANG;\n\tGLOBAL $DEFAULTLANG;\n\t$langToUse = $LANG;\n\tif ($language && ($language != getLanguage()) && languageEnabled($language)) {\n\t\t$langToUse = includeLanguage($language);\n\t}\n\t$key = $string;\n\tif($lower){\n\t\t$key = strtolower($string);\n\t}\n\tif($langToUse && array_key_exists($key, $langToUse)){\n\t\t$string = $langToUse[$key];\n \t}\n\telse if (array_key_exists($key, $DEFAULTLANG)){\n \t\t$string = $DEFAULTLANG[$key];\n \t}\n\n \tif($replace){\n \t\t$matches = array();\n \t\tpreg_match_all(\"/{_([^}]*)_}/\", $string, $matches);\n\n \t\t$valuesToSearch = array();\n \t\tforeach($matches[1] as $match){\n \t\t\t$parts = explode(\".\", $match);\n \t\t\t$entity = \"\";\n \t\t\t$attribute = \"\";\n\n \t\t\tif(count($parts) > 1){\n \t\t\t\t$entity = $parts[0];\n \t\t\t\t$attribute = $parts[1];\n \t\t\t}else{\n \t\t\t\t$entity = \"custom_variables_without_entity\";\n \t\t\t\t$attribute = $parts[0];\n \t\t\t}\n\n \t\t\tif(!array_key_exists($entity, $valuesToSearch)){\n \t\t\t\t$valuesToSearch[$entity] = array();\n \t\t\t}\n \t\t\t$valuesToSearch[$entity][] = $attribute;\n \t\t}\n\n \t\tforeach($valuesToSearch as $entity => $attributes){\n\n \t\t\t$replaceEntity = null;\n \t\t\tif($entity == \"custom_variables_without_entity\"){\n \t\t\t\tforeach($attributes as $attribute){\n\t \t\t\t\tif(array_key_exists($attribute, $replace)){\n\t \t\t\t\t\t$string = str_replace(\"{_\" . $attribute . \"_}\", $replace[$attribute], $string);\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t}else if(array_key_exists($entity, $replace)){\n \t\t\t\t$replaceEntity = $replace[$entity];\n \t\t\t}else{\n\t \t\t\tforeach($replace as $object){\n\t \t\t\t\tif(strtolower(get_class($object)) == strtolower($entity)){\n\t \t\t\t\t\t$replaceEntity = $object;\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($replaceEntity){\n \t\t\t\tif(is_array($replaceEntity)){\n \t\t\t\t\tforeach($attributes as $attribute){\n \t\t\t\t\t\tif(array_key_exists($attribute, $replaceEntity)){\n \t\t\t\t\t\t\t$string = str_replace(\"{_\" . $entity . \".\" . $attribute . \"_}\", $replaceEntity[$attribute], $string);\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}else{\n \t\t\t\t\tforeach($attributes as $attribute){\n \t\t\t\t\t\tif(isset($replaceEntity->$attribute)){\n \t\t\t\t\t\t\t$string = str_replace(\"{_\" . $entity . \".\" . $attribute . \"_}\", $replaceEntity->$attribute, $string);\n \t\t\t\t\t\t}else{\n \t\t\t\t\t\t\tif($replaceEntity->attributes && isset($replaceEntity->attributes->$attribute)){\n \t\t\t\t\t\t\t\t$string = str_replace(\"{_\" . $entity . \".\" . $attribute . \"_}\", $replaceEntity->attributes->$attribute, $string);\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 \t}\n\n \tif ($deleteEnters){\n \t\t$string = str_replace(\"\\n\", \"\", $string);\n \t}\n\treturn $string;\n}",
"function dump(&$var, $info = FALSE)\n{\n\t$scope = false;\n\t$prefix = 'unique';\n\t$suffix = 'value';\n\n\tif($scope) $vals = $scope;\n\telse $vals = $GLOBALS;\n\n\t$old = $var;\n\t$var = $new = $prefix . rand() . $suffix; $vname = FALSE;\n\tforeach($vals as $key => $val) if($val === $new) $vname = $key;\n\t$var = $old;\n\n\techo \"<pre style='margin: 0px 0px 10px 0px; display: block; background: white; color: black; font-family: Verdana; border: 1px solid #cccccc; padding: 5px; font-size: 10px; line-height: 13px;'>\";\n\tif($info != FALSE) echo \"<b style='color: red;'>$info:</b><br>\";\n\tdo_dump($var, '$'.$vname);\n\techo \"</pre>\";\n}",
"public function out($var){\n\t\t\techo \"<br><br><pre>\";\n\t\t\tprint_r($var);\n\t\t\techo \"</pre><br><br>\";\n\t\t}",
"public function out($var){\n\t\t\techo \"<br><br><pre>\";\n\t\t\tprint_r($var);\n\t\t\techo \"</pre><br><br>\";\n\t\t}",
"protected function renderVar($var, array &$context, $encode)\n\t{\n\t\t// sanitise $var\n\t\t$var = strtr($var, array('\\'' => '\\\\\\'', '\\\\' => '\\\\\\\\'));\n\t\t$result = $this->openPhp();\n\t\t$result .= '$d->'.($encode?'echo':'echoRaw').'(\\'' . $var . '\\');';\n\t\treturn $result;\n\t}",
"public function render_variable_name($str, $option = NULL)\n\t{\n\t\tif ($option === NULL)\n\t\t{\n\t\t\t$option = $this->config->get_options('names.variable');\n\t\t}\n\t\treturn '$'.$this->render_name($str, $option);\n\t}",
"function var_dump_pre ($input_variable)\n{\n print(\"<pre>\");\n var_dump($input_variable);\n print(\"</pre>\");\n}",
"static function dump($var) {\n\t\tif (is_null($var)) {\n\t\t\treturn self::em('null');\n\t\t} elseif (is_scalar($var)) {\n\t\t\tif (is_string($var)) {\n\t\t\t\treturn $var;\n\t\t\t} elseif (is_numeric($var)) {\n\t\t\t\treturn $var;\n\t\t\t} elseif (is_bool($var)) {\n\t\t\t\treturn ($var) ? 'true' : 'false';\n\t\t\t} else {\n\t\t\t\treturn 'scalar but non string / numeric / bool';\n\t\t\t}\n\t\t} else {\n\t\t\tif (is_array($var)) {\n\t\t\t\tif (a::associative($var)) {\n\t\t\t\t\t$return = '<table cellpadding=\"5\" border=\"1\" style=\"margin:20px;font:12px helvetica;\">';\n\t\t\t\t\tforeach ($var as $key=>$value) {\n\t\t\t\t\t\t$return .= '<tr><td style=\"background-color:#eee;font-weight:bold;\">' . $key . '</td><td>' . self::dump($value) . '</td></tr>';\n\t\t\t\t\t}\n\t\t\t\t\treturn $return . '</table>';\n\t\t\t\t} else {\n\t\t\t\t\tforeach ($var as &$value) $value = self::dump($value);\n\t\t\t\t\treturn self::ol($var, array('start'=>0));\n\t\t\t\t}\n\t\t\t} elseif (is_object($var)) {\n\t\t\t\treturn 'object' . self::dump(a::object($var));\n\t\t\t} elseif (is_resource($var)) {\n\t\t\t\treturn 'resource';\n\t\t\t} else {\n\t\t\t\treturn 'non-scalar but not array, object or resource';\n\t\t\t}\n\t\t}\n\t}",
"function print_tag($var, $default = '—') {\n echo isset($var) ? $var : $default;\n}",
"function prot(string $var, int $lth) {\t// protected text\n\tif (!isset($P[$var])) $P[$var] = str_pad('',$lth,'_');\n\techo substr($P[$var],0,$lth);\n}",
"function tf_print($value, $die = false) {\r\n static $first_time = true;\r\n\r\n if ($first_time) {\r\n ob_start();\r\n ?><style type=\"text/css\">\r\n div.tf_print_r {\r\n max-height: 500px;\r\n overflow-y: scroll;\r\n background: #111;\r\n margin: 10px 30px;\r\n padding: 0;\r\n border: 1px solid #F5F5F5;\r\n position: relative;\r\n z-index: 10;\r\n }\r\n\r\n div.tf_print_r pre {\r\n color: #47EE47;\r\n text-shadow: 1px 1px 0 #000;\r\n font-family: Consolas, monospace;\r\n font-size: 12px;\r\n margin: 0;\r\n padding: 5px;\r\n display: block;\r\n line-height: 16px;\r\n text-align: left;\r\n }\r\n </style><?php\r\n echo str_replace(array(' ', \"\\n\"), '', ob_get_clean());\r\n }\r\n\r\n ?><div class=\"tf_print_r\"><pre><?php print htmlspecialchars(tf_print_r($value, true), null, 'UTF-8'); ?></pre></div><?php\r\n\r\n $first_time = false;\r\n\r\n if ($die) die();\r\n }",
"function yy_r79(){$this->_retvalue = '$_smarty_tpl->getConfigVariable(\\''. $this->yystack[$this->yyidx + -1]->minor .'\\')'; }",
"function yy_r99(){ if ($this->yystack[$this->yyidx + -1]->minor['var'] == '\\'smarty\\'') { $this->_retvalue = $this->compiler->compileTag('special_smarty_variable',$this->yystack[$this->yyidx + -1]->minor['index']).$this->yystack[$this->yyidx + 0]->minor;} else {\r\n $this->_retvalue = '$_smarty_tpl->getVariable('. $this->yystack[$this->yyidx + -1]->minor['var'] .')->value'.$this->yystack[$this->yyidx + -1]->minor['index'].$this->yystack[$this->yyidx + 0]->minor; $this->compiler->tag_nocache=$this->compiler->tag_nocache|$this->template->getVariable(trim($this->yystack[$this->yyidx + -1]->minor['var'],\"'\"))->nocache;} }",
"function yy_r92(){ $this->_retvalue = '['.$this->compiler->compileTag('special_smarty_variable','[\\'section\\'][\\''.$this->yystack[$this->yyidx + -3]->minor.'\\'][\\''.$this->yystack[$this->yyidx + -1]->minor.'\\']').']'; }",
"function ourExternalTpl($array, $content)\n {\n $content = str_replace(array(\"{TITLE}\", \"{PROJECT}\", \"{VERSION}\"), array($array['title'], $array['system']['title_project'], $array['system']['version_cms']), $content);\n foreach ($array['lang'] as $key => $value) {\n $content = str_replace(\n '{' . strtoupper($key) . '}',\n $value,\n $content\n );\n }\n echo $content;\n }",
"function dumpVar($var)\n\t{\n\t\tif (is_array($var) || is_object($var))\n\t\t\t$var = trim(preg_replace(\"/\\n */\", \" \", print_r($var, true)));\n\t\treturn htmlspecialchars($var, ENT_NOQUOTES);\n\t}",
"function gettitle() {\n\n\t\tglobal $pagetiltle;\n\n\t\tif (isset($pagetiltle)) {\n\n\t\t\techo $pagetiltle;\n\t\t} else {\n\n\t\t\techo lang('DEFAULT');\n\t\t}\n\t}"
] | [
"0.68632007",
"0.65400785",
"0.6516672",
"0.640604",
"0.6392407",
"0.6390279",
"0.6366419",
"0.6308931",
"0.6266653",
"0.62535924",
"0.6250491",
"0.6240815",
"0.62307215",
"0.6152823",
"0.614948",
"0.61203",
"0.6116076",
"0.60377604",
"0.5987073",
"0.5979091",
"0.59756446",
"0.5974553",
"0.5953601",
"0.59340787",
"0.59215486",
"0.5907495",
"0.59010774",
"0.58973557",
"0.5895831",
"0.58785975",
"0.5866217",
"0.5864796",
"0.58639675",
"0.5850054",
"0.5846584",
"0.58272725",
"0.5815815",
"0.58073986",
"0.5788296",
"0.5781919",
"0.5752963",
"0.5742266",
"0.5739628",
"0.5737831",
"0.5729816",
"0.5723479",
"0.5720525",
"0.5719243",
"0.5717541",
"0.570979",
"0.5705474",
"0.5702835",
"0.5696522",
"0.56961566",
"0.56960493",
"0.5695235",
"0.56873196",
"0.5680205",
"0.5679053",
"0.56730545",
"0.56721115",
"0.5670662",
"0.56673956",
"0.5664026",
"0.5663914",
"0.5660683",
"0.56572264",
"0.565609",
"0.5640496",
"0.5631275",
"0.56250864",
"0.5622317",
"0.56205016",
"0.5620025",
"0.56140727",
"0.561073",
"0.5609721",
"0.5603565",
"0.5601516",
"0.55981314",
"0.55944675",
"0.55869085",
"0.5579221",
"0.5576587",
"0.55593544",
"0.55588865",
"0.55588865",
"0.55567646",
"0.555673",
"0.555095",
"0.5545163",
"0.55425394",
"0.5539181",
"0.5536332",
"0.55359006",
"0.5533376",
"0.55272907",
"0.5519339",
"0.55166435",
"0.5505649"
] | 0.68552977 | 1 |
used inside php files for getting a language var! | function ___ ($var, $rpl = null)
{
global $main;
if (array_key_exists ($var, $main->template->vars_l))
{
if (is_array ($rpl))
$cnt = vsprintf ($main->template->vars_l[$var], $rpl);
else
$cnt = $main->template->vars_l[$var];
return $cnt;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_lang ()\r\n {\r\n return $_SESSION[\"lang\"];\r\n }",
"function get_libLangue($chaine) {\r\n\tglobal ${$chaine.\"_\".$_SESSION['ses_langue']};\r\n\r\n\treturn ${$chaine.\"_\".$_SESSION['ses_langue']};\r\n}",
"function make_lang_var()\n\t{\n\t\t// Pfad einbinden\n\t\tglobal $pfad;\n\n\t\t// Backend Sprache\n\t}",
"function codepress_get_lang($filename)\n {\n }",
"public function language();",
"public function language();",
"protected function getLanguageParameter() {}",
"static function get()\n\t{\n\t\treturn self::$lang;\n\t}",
"function includeLocalLang()\t{\n\t\t$llFile = t3lib_extMgm::extPath('f2contentce').'Resources/Private/Language/locallang.xml';\n\t\t$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);\n\t\treturn $LOCAL_LANG;\n\t}",
"function themes_get_language($script = 'global')\n{\n}",
"function pnUserGetLang()\r\n{\r\n $lang = pnSessionGetVar('lang');\r\n if (!empty($lang)) {\r\n return $lang;\r\n } else {\r\n return pnConfigGetVar('language');\r\n }\r\n}",
"function get_lang($name) {\n global $lang;\n return $lang->get_phrase($name);\n}",
"function lixgetlang() {\n $lang = 'rus';\n \n if ($_GET[lang] != 'rus' && $_GET[lang] != 'eng' && $_GET[lang] != 'deu') {\n if (lixlpixel_detect_lang() != 'ru') { $lang = 'eng'; }\n else { $lang = 'rus'; }\n } else {\n $lang = $_GET[lang];\n }\n \n return $lang;\n}",
"public function getFromLanguage(): string;",
"public function getLang();",
"function userpage_lang($id)\r\n{\r\n\tglobal $AVE_Template;\r\n\r\n\techo $AVE_Template->get_config_vars($id);\r\n}",
"function common_current_language(){\r\n\tif($_SESSION['lang'] == 'id'){\r\n\t\treturn 'Bahasa Indonesia';\r\n\t}\r\n\telse if($_SESSION['lang'] == 'en'){\r\n\t\treturn 'English';\r\n\t}\r\n}",
"public function lang(): string;",
"static function getLangVars()\n\t{\n\t\treturn array(\"pc_vacc\", \"pc_hacc\");\n\t}",
"public function getLang()\n {\n \t$lang_path = 'lang/';\n if(isset($_GET['lang']))\n {\n Yii::app()->session[\"lang\"] = $_GET['lang']; \n }\n \n if(!file_exists($lang_path.Yii::app()->session[\"lang\"].'.ini'))\n {\n\t\t\tYii::app()->session[\"lang\"] = 'sr';\n }\n\t\t\n\t\t$this->langArray= parse_ini_file($lang_path.Yii::app()->session[\"lang\"].'.ini'); \n }",
"function __($word) {\n global $cfg;\n if (isset($_GET['lang'])) {\n include(\"langs/\".$_GET['lang'].\".php\");\n } else include(\"langs/\".$cfg[\"default_language\"].\".php\"); \n\n return isset($translations[$word]) ? $translations[$word] : $word;\n}",
"function lang($key){\n\tglobal $lang;\n\treturn isset($lang[$key])?$lang[$key]:$key;\n}",
"function lang($variable, $default_text, $lang=''){\n\t\t\t\tglobal $eventon_rs;\n\t\t\t\treturn $eventon_rs->lang($variable, $default_text, $lang);\n\t\t\t}",
"public function get_language()\n {\n }",
"static function getLanguage (){\n return self::$language;\n }",
"function includeLocalLang()\t{\r\n\t\tglobal $LANG;\r\n\t\t$LOCAL_LANG = $LANG->includeLLFile('EXT:f4_lucene_workshop/locallang.xml',FALSE);\r\n\t\treturn $LOCAL_LANG;\r\n\t}",
"function print_lang($name) {\n global $lang;\n echo $lang->get_phrase($name);\n}",
"public function getLanguage() {}",
"private function lang($string='')\n {\n return $this->language->get($string);\n }",
"public function getLangcode() {\n }",
"function lang($key = '')\r\n{\r\n\t$CI =& get_instance();\r\n\t$line = $CI->lang->line($key);\r\n\t$line = ($line == '') ? $key : $line;\r\n\treturn $line;\r\n}",
"abstract public function get_app_language();",
"function l ($str) {\r\n\t$reval \t= $str;\r\n\t$path \t= PATH_THEME . 'lang/' . $GLOBALS['cfg']['def_lang'] . '.php';\r\n\tif (file_exists($path)) {\r\n\t\trequire $path;\r\n\t\tif (isset($lang[$str])) {\r\n\t\t\tif ( $lang[$str] != '' ) {\r\n\t\t\t\t$reval = $lang[$str];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $reval;\r\n}",
"public static function get() {\n\t\treturn self::$lang;\n\t}",
"function modules_get_language($script = 'global')\n{\n $currentlang = pnSessionGetVar('lang');\n $language = pnConfigGetVar('language');\n\n\tif (!isset($GLOBALS['ModName'])) {\n\t\t$modname = pnModGetName();\n\t} else {\n\t\t$modname = $GLOBALS['ModName'];\n\t}\n\t$modinfo = pnModGetInfo(pnModGetIDFromName($modname));\n\n \tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).\"/$script.php\")) {\n\t\t@include_once 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).\"/$script.php\";\n \t} elseif (!empty($language)) {\n\t \tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).\"/$script.php\")) {\n\t\t\t@include_once 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).\"/$script.php\";\n\t \t}\n \t} else {\n \t// nothing found, use english translation stuff\n\t\tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).\"/lang/eng/$script.php\")) {\n\t\t\t@include_once 'modules/'.pnVarPrepForOS($modinfo['directory']).\"/lang/eng/$script.php\";\n \t}\n \t}\n \treturn;\n}",
"static function getLangVars()\n\t{\n\t\treturn array(\"pc_mob\");\n\t}",
"protected function _getLang()\n\t{\n\t\t$lang = new stdClass;\n\t\treturn $lang;\n\t}",
"function tpl_language()\n{\n global $smarty, $lang, $config;\n\n $smarty->assign('lang', $lang);\n $smarty->assign('config', $config);\n}",
"public function getLang(): string {\n return $this->lang;\n }",
"function language($lang)\n\t{\n\t\treturn lava_instance()->lang->language($lang);\n\t}",
"protected function generateLocalLang() {}",
"public static function getLang(){\n\t\tif(!isset(self::$_config['lang'])) return null;\n\t\telse return $_COOKIE['lang'];\n\t}",
"function httpbl_lang()\n {\n foreach(explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language)\n { if ($language=='fr') { return 'fr'; } }\n return 'en';\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"protected function getLanguageService()\n {\n return $GLOBALS['LANG'];\n }",
"public static function getLanguageName(){\n if(Cache::isStored('website_lang')) return Cache::get('website_lang'); \n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'website_lang'\");\n Cache::store('website_lang', $row['value']);\n return $row['value'];\n }",
"private function msg($k){\r\n global $language;\r\n\r\n return $language[$k];\r\n\r\n\r\n }",
"function lang($key, $params = NULL)\n\t{\n\t\t$ci = get_instance()->load->helper('mylanguage');\n\t\treturn mylang($key, $params);\n\t}",
"public function get_language()\n\t{\n\t\tif ($this->userdata['language'] != '')\n\t\t{\n\t\t\treturn $this->userdata['language'];\n\t\t}\n\t\tif (ee()->input->cookie('language'))\n\t\t{\n\t\t\treturn ee()->input->cookie('language');\n\t\t}\n\t\telse if (ee()->config->item('deft_lang') != '')\n\t\t{\n\t\t\treturn ee()->config->item('deft_lang');\n\t\t}\n\n\t\treturn 'english';\n\t}",
"function getCurrentLanguage() {\n if(strtolower($_SERVER['HTTP_HOST'][0].$_SERVER['HTTP_HOST'][1]) == \"en\") {\n return \"en\";\n }\n return \"cs\";\n}",
"function getPNlanguage()\n{\n\tpnBlockLoad('Core', 'thelang');\n// All entries use ISO 639-2/T\n\t$lang['ara'] = \"Arabic\";\n\t$lang['alb'] = \"Albanian\"; \n\t$lang['bul'] = \"Bulgarian\";\n\t$lang['zho'] = \"Chinese\";\n\t$lang['cat'] = \"Catalan\";\n\t$lang['ces'] = \"Czech\";\n\t$lang['hrv'] = \"Croatian HRV\";\n\t$lang['cro'] = \"Croatian CRO\";\n\t$lang['dan'] = \"Danish\";\n\t$lang['nld'] = \"Dutch\";\n\t$lang['eng'] = \"English\";\n\t$lang['epo'] = \"Esperanto\";\n\t$lang['est'] = \"Estonian\";\n\t$lang['fin'] = \"Finnish\";\n\t$lang['fra'] = \"French\";\n\t$lang['deu'] = \"German\";\n\t$lang['ell'] = \"Greek\";\n\t$lang['heb'] = \"Hebrew\";\n\t$lang['hun'] = \"Hungarian\";\n\t$lang['isl'] = \"Icelandic\";\n\t$lang['ind'] = \"Indonesian\";\n\t$lang['ita'] = \"Italian\";\n\t$lang['jpn'] = \"Japanese\";\n\t$lang['kor'] = \"Korean\";\n\t$lang['lav'] = \"Latvian\";\n\t$lang['lit'] = \"Lithuanian\";\n\t$lang['mas'] = \"Malay\";\n\t$lang['mkd'] = \"Macedonian\";\n\t$lang['nor'] = \"Norwegian\";\n\t$lang['pol'] = \"Polish\";\n\t$lang['por'] = \"Portuguese\";\n\t$lang['ron'] = \"Romanian\";\n\t$lang['rus'] = \"Russian\";\n\t$lang['slv'] = \"Slovenian\";\n\t$lang['spa'] = \"Spanish\";\n\t$lang['swe'] = \"Swedish\";\n\t$lang['tha'] = \"Thai\";\n\t$lang['tur'] = \"Turkish\";\n\t$lang['ukr'] = \"Ukrainian\";\n\t$lang['yid'] = \"Yiddish\";\n\n\treturn strtolower($lang[pnSessionGetVar('lang')]);\n}",
"function get($key)\r\n\t\t{\r\n\t\t\treturn @$this->lang[$key];\r\n\t\t}",
"function lng($text, $lng = '') {\n\tglobal $_base_path_cms, $_lang_cms, $_lang_array;\n\n\tif(empty($lng)) {\n\t\tif($_lang_cms == \"\") $_lang_cms = \"ro\";\n\t\t$return = lng($text, $_lang_cms);\n\n\t\tif(!empty($return)) {\n\t\t\treturn $_lang_array[$return];\n\t\t}\n\n\t\treturn $text;\n\t} else {\n\t\t/*\n\t\tinclude $_base_path_cms.'lang/'.$lng.'.php';\n\t\tif(is_file($_base_path_cms . 'lang/extra/'.$lng.'.php')){\n\t\t\tinclude $_base_path_cms . 'lang/extra/'.$lng.'.php';\n\t\t}\n\t\t*/\n\t\tif(isset($_lang_array[$text])) return $text;\n\n\t\t$key = array_search($text, $_lang_array);\n\t\tif(!empty($key)) return $key;\n\t}\n}",
"public function incLocalLang() {}",
"function SM_getVar($varName) {\n global $SM_siteManager;\n return $SM_siteManager->inVarH->getVar($varName);\n}",
"function lang($var)\n\t{\n\t\tglobal $lang;\n\t\tif(substr($var, 0, 2) === 'L_')\n\t\t{\n\t\t\t$var = substr($var, 2);\n\t\t\t// check variable as it is\n\t\t\tif(isset($lang[$var]))\n\t\t\t{\n\t\t\t\treturn $lang[$var];\n\t\t\t}\n\t\t\t// check variable in lower case\n\t\t\tif(isset($lang[strtolower($var)]))\n\t\t\t{\n\t\t\t\treturn $lang[strtolower($var)];\n\t\t\t}\n\t\t\t// check variable with first letter in upper case\n\t\t\t$str = ucfirst(strtolower($var));\n\t\t\tif(isset($lang[$str]))\n\t\t\t{\n\t\t\t\treturn $lang[$str];\n\t\t\t}\n\t\t\treturn ''; //str_replace('_', ' ', $var);\n\t\t}\n\t\treturn '';\n\t}",
"function lang()\n\t{\n\t\t$args = func_get_args();\n\t\t$key = $args[0];\n\n\t\t$context_vars = $this->context->get_root_ref();\n\n\t\tif (isset($context_vars['L_' . $key]))\n\t\t{\n\t\t\treturn $context_vars['L_' . $key];\n\t\t}\n\n\t\t// LA_ is transformed into lang(\\'$1\\')|escape('js'), so we should not\n\t\t// need to check for it\n\n\t\treturn call_user_func_array(array($this->language, 'lang'), $args);\n\t}",
"public function language(){\n\t\tdefined('MGK_LANGUAGE')\n\t\t || define('MGK_LANGUAGE', $this->lang );\n\n\t\t$language = MGK_LANGUAGE;\t\n\t\t$file_lang = MGK_APPLICATION_DIRECTORY.'/_language/'.$language.'.json';\n\t\t$this->mgkLang = new Amaguk_lang( $language );\t\t\t\n\t\t$this->mgkLang->read_lang($file_lang);\t\t\t\n\t}",
"function get_lang_txt($lang_string) {\n\tglobal $lang, $backup_lang;\n\treturn (check_value($lang[$lang_string])) ? $lang[$lang_string] : $backup_lang[$lang_string];\n}",
"public function loadLang(){\n\n if($this->id == -1 || empty($this->databasePath))\n return \"\";\n\n $sqlQuery = 'SELECT L.lang_code as lang FROM books_languages_link BLL, languages L WHERE BLL.lang_code = L.id AND BLL.book = '.$this->id;\n\n $pdo = new SPDO($this->databasePath);\n foreach ($pdo->query($sqlQuery) as $row)\n return $row['lang'];\n \n return \"\";\n }",
"private static function getLanguage()\n {\n if (isset($_COOKIE[\"language\"]))\n {\n return $_COOKIE[\"language\"];\n }\n else\n {\n // Default is Czech\n return \"cs\";\n }\n }",
"function getLang() {\n\tif (request()->cookie(config('translate.su_cookie_name'))) {\n\t\t$cookie = request()->cookie(config('translate.su_cookie_name'));\n\t} else {\n\t\tif (request()->cookie(config('translate.cookie_name'))) {\n\t\t\t$cookie = request()->cookie(config('translate.cookie_name'));\n\t\t} else {\n\t\t\tif (substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2)) {\n\t\t\t\t$cookie = substr(request()->server('HTTP_ACCEPT_LANGUAGE'), 0, 2);\n\t\t\t} else {\n\t\t\t\t$cookie = config('translate.default_locale');\n\t\t\t}\n\t\t}\n\t}\n\treturn $cookie;\n}",
"function pnLangLoad()\n{\n\t// See if a language update is required\n $newlang = pnVarCleanFromInput('newlang');\n if (!empty($newlang)) {\n $lang = $newlang;\n pnSessionSetVar('lang', $newlang);\n } else {\n $detectlang = pnConfigGetVar('language_detect');\n $defaultlang = pnConfigGetVar('language');\n\n switch ($detectlang) { \n case 1: // Detect Browser Language\n\t\t $cnvlanguage=cnvlanguagelist();\n $currentlang='';\n \t $langs = preg_split ('/[,;]/',$_SERVER['HTTP_ACCEPT_LANGUAGE']);\n \t foreach ($langs as $lang) {\n \t \t if (isset($cnvlanguage[$lang]) && file_exists('language/' . pnVarPrepForOS($cnvlanguage[$lang]) . '/global.php')) {\n \t \t $currentlang=$cnvlanguage[$lang];\n \t \t break;\n \t \t }\n \t }\n if ($currentlang=='')\n \t $currentlang=$defaultlang;\n \t \t break;\n default:\n $currentlang=$defaultlang; \n }\n $lang = pnSessionGetVar('lang');\n }\n \n // Load global language defines\n\t// these are deprecated and will be moved to the relevant modules\n\t// with .8x\n if (isset ($lang) && file_exists('language/' . pnVarPrepForOS($lang) . '/global.php')) {\n $currentlang = $lang;\n } else {\n $currentlang = pnConfigGetVar('language');\n pnSessionSetVar('lang', $currentlang);\n }\n\t$oscurrentlang = pnVarPrepForOS($currentlang);\n\tif (file_exists('language/' . $oscurrentlang . '/global.php')) {\n\t include 'language/' . $oscurrentlang . '/global.php';\n\t}\n\n\t// load the languge language file\n\tif (file_exists('language/languages.php')) {\n\t\tinclude 'language/languages.php';\n\t}\n\n\t// load the core language file\n\tif (file_exists('language/' . $oscurrentlang . '/core.php')) {\n\t\tinclude 'language/' . $oscurrentlang . '/core.php';\n\t}\n\n\t// V4B RNG\n\tif (file_exists('language/' . $oscurrentlang . '/v4blib.php')) {\n\t\tinclude 'language/' . $oscurrentlang . '/v4blib.php';\n\t}\n\t// V4B RNG\n\n\t// set the correct locale\n\t// note: windows has different requires for the setlocale funciton to other OS's\n\t// See: http://uk.php.net/setlocale\n\tif (stristr(getenv('OS'), 'windows')) {\n\t\t// for windows we either use the _LOCALEWIN define or the existing language code\n\t\tif (defined('_LOCALEWIN')) {\n\t\t\tsetlocale(LC_ALL, _LOCALEWIN);\n\t\t} else {\n\t\t\tsetlocale(LC_ALL, $currentlang);\n\t\t}\n\t} else {\n\t\t// for other OS's we use the _LOCALE define\n\t\tsetlocale(LC_ALL, _LOCALE);\n\t}\n}",
"function langflag() {\n\n\t\tglobal $lang, $muniUrl, $typeUrl, $id;\n\n\t\tswitch($lang){\n\n\t\tcase 'en':\n\n\t\t$langFlags ='<a href=\"/es/'. $muniUrl . '/' . $typeUrl . '/' . $id . '.html\"><img src=\"/ddtabmenufiles/media/en.gif\" alt=\"Espa�ol\" width=\"62\" height=\"23\" border=\"0\" align=\"right\" /></a>';\n\n\t\tbreak;\n\n\t\tcase 'es':\n\t\t$langFlags ='<a href=\"/en/'. $muniUrl . '/' . $typeUrl . '/' . $id . '.html\"><img src=\"/ddtabmenufiles/media/es.gif\" alt=\"English\" width=\"62\" height=\"23\" border=\"0\" align=\"right\" /></a>';\n\t\tbreak;\n\n\t\t}\n\n\t\treturn $langFlags;\n\n\t\t}",
"function getdirlang() {\n $script = $_SERVER['PHP_SELF'];\n\n if (isset($script) && preg_match('^/[a-z][a-z]/', $script)) {\n $lang = substr($script, 1, 2);\n if (file_exists(BASEDIR . $lang . '/index.php'))\n return $lang;\n }\n\n /* Return \"en\" (English) by default just like getlang() */\n return null;\n}",
"private function get_language ()\n {\n $lang = filter_input ( INPUT_COOKIE, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\t$new_lang = filter_input ( INPUT_GET, 'lang', FILTER_CALLBACK, [ 'options' => [ $this, 'filter_lang' ] ] );\n\tif ( $new_lang ) {\n\t\t$lang = $new_lang;\n\t\tsetcookie( \"lang\", substr ( $lang, 0, 2 ), time() + 3600 * 24 * 365, '/' );\n\t}\n\t\n\treturn $lang ?? 'uk';\n }",
"public static function loadLang() {\n\t\tif (!is_object($GLOBALS['LANG'])) {\n\n\t\t\trequire_once t3lib_extMgm::extPath('lang') . 'lang.php';\n\t\t\t//TODO see pt_tool smarty!\n\t\t\t$GLOBALS['LANG'] = t3lib_div::makeInstance('language');\n\t\t\t$GLOBALS['LANG']->csConvObj = t3lib_div::makeInstance('t3lib_cs');\n\t\t}\n\t\tif (is_object($GLOBALS['TSFE']) && $GLOBALS['TSFE']->config['config']['language']) {\n\t\t\t$LLkey = $GLOBALS['TSFE']->config['config']['language'];\n\t\t\t$GLOBALS['LANG']->init($LLkey);\n\t\t}\n\n\t}",
"protected function getLocalLangFileName() {}",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"public function getLanguage();",
"function lang()\n {\n global $CFG; \n $language = $CFG->item('language');\n \n $lang = array_search($language, $this->languages);\n if ($lang)\n {\n return $lang;\n }\n \n return NULL; // this should not happen\n }",
"public function lang()\n {\n return $this->currlang();\n }",
"protected function _extractLanguage() {\n // Default lanuage is always Lao\n $lang = 'lo';\n\n // Set the cookie name\n //$this->Cookie->name = '_osm_la';\n //echo $this->response->cookie(\"_osm_la\");\n \n // First check if the language parameter is set in the URL. The URL\n // parameter has first priority.\n $paramLang = $this->request->query(\"lang\");\n if (isset($paramLang)) {\n // Check if the URL parameter is a valid language identifier\n if (array_key_exists($paramLang, $this->_languages)) {\n // Set the language to the URL parameter\n $lang = $paramLang;\n }\n } else if ($this->Cookie->read($this->_languageCookie) != null) {\n // Check if a cookie is set and set its value as language. A Cookie\n // has second priority\n $cookieValue = $this->Cookie->read($this->_languageCookie);\n // Check if the URL parameter is a valid language identifier\n if (array_key_exists($cookieValue, $this->_languages)) {\n // Set the language to the Cookie value\n $lang = $cookieValue;\n }\n }\n\n // If neither the lang parameter nor a cookie is set, set and return\n // Lao as language.\n //$this->log(var_dump($this));\n //$this->response->cookie($this->_languageCookie => $lang ]);\n return $lang;\n }",
"function get_lang_key($key) {\n $CI = &get_instance();\n return $CI->lang->line($key);\n}",
"function findLanguage() {\n\t\tif ((LANGUAGE == 'NULL') || (LANGUAGE === NULL)) {\n\t\t\treturn null;\n\t\t}\n\t\t/*\n\t\t\t\tif (isset ($this->Session)) {\n\t\t\t\t\t$code= $this->Session->read('Lang.Code');\n\t\t\t\t\tif (isset ($code) && !empty ($code)) {\n\t\t\t\t\t\treturn $code;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t*/\n\t\tif (LANGUAGE == 'VHOST') {\n\t\t\t$l= $this->getVhostLang();\n\t\t\tif (empty ($l)) {\n\t\t\t\t$l= $this->getBrowserLang();\n\t\t\t}\n\t\t\treturn $l;\n\t\t}\n\t\tif (LANGUAGE == 'BROWSER') {\n\t\t\treturn $this->getBrowserLang();\n\t\t}\n\t\treturn LANGUAGE;\n\t}",
"function __($text)\n{\n $sys = getSysInfo();\n $lang = $sys[\"lang\"];\n //set_include_path(get_include_path() . PATH_SEPARATOR . $_SERVER['DOCUMENT_ROOT'].getPathFromDocRoot().'locales'.FILE_SEPARATOR.$lang);\n if ($lang == \"\") {\n //do nothing\n return $text;\n } else {\n require_once('locales'.FILE_SEPARATOR.$lang.FILE_SEPARATOR.$lang.'.php');\n //$translation = getTranslation($text);\n $translation = call_user_func('getTranslation_'.$lang, $text);\n if ($translation == \"\") {\n return $text;\n //maybe send an error email to admin?\n } else {\n return $translation;\n }\n }\n}",
"function GetDefaultLang() : string\n{\n return 'ar';\n}",
"function parselang()\n{\n $langdir = realpath(__DIR__ . \"/../../lang\") . DIRECTORY_SEPARATOR;\n $langfile = $langdir . \"lang.json\";\n $langfile = file_get_contents($langfile);\n $lang = json_decode($langfile, true);\n $lfile = $langdir . 'language.' . $lang[\"lang\"] . '.php';\n return (file_exists($lfile)) ? $lfile : $langdir . 'language.en.php';\n}",
"public static function getLocallangVarName()\n\t{\n\t\tif(is_null(self::$_locallangVarName)) {\n\t\t\tself::$_locallangVarName = trim(self::getConfValue('locallangVarName'));\n\t\t\tif(!self::$_locallangVarName) self::$_locallangVarName = self::DEFAULT_LANG_VAR_NAME;\n\t\t}\n\t\treturn self::$_locallangVarName; \n\t}",
"function lang()\n\t{\n\t\t$lang = (empty($_COOKIE['lang'])) ? 'italiano' : $_COOKIE['lang'];\n\t\t$this->lang=$lang;\n\t\t$this->lang_frequency=$lang.$this->lang_frequency_suffix;\n\t\t\n\t\t\n\n\t\t$n=\"\";\n\t\t$i=1;\n\t\twhile (isset($_COOKIE['lang'.$n]))\n\t\t{\n\t\t\t$i++;\n\t\t\t\t\n\t\t\t$this->lang_a[$i][0]=$_COOKIE['lang'.$n];\n\t\t\t$this->lang_a[$i][1]=$_COOKIE['lang'.$n].\"_frequency\"; //Non sò a cosa serva però...\n\t\t\t$n=$i;\n\t\t}\n\n\t\n\t\n\t\n\t}",
"protected function loadJavaScriptLanguageStrings() {}",
"public static function get_lang() {\n\t\t$language = \\Config::get ( 'language' );\n\t\tempty ( $language ) and $language = static::$fallback [0];\n\t\treturn $language;\n\t}",
"public function languages();",
"protected function getSystemLanguage()\n {\n return (int) GeneralUtility::_GP('L');\n }",
"function getlang() {\n $cooklang = $_COOKIE['cooklang'];\n $accept = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n $lang = $_GET['lang'];\n $dirlang = getdirlang();\n\n if (!isset ($lang)) {\n /* no language selection in http request */\n\n \n if (isset($dirlang)) {\n /* Language taken from path e.g., /fr/index.php -> fr */\n $lang = $dirlang;\n } else if (isset($cooklang)) {\n /* Language taken from cookie */\n $lang = $cooklang;\n } else {\n /* not even a cookie. Choose from http_accept_language --REWRITE this part!-- */\n/* while (\n empty($lang) &&\n preg_match('([a-z][a-z](-[A-Z][A-Z])?)', $accept, $res)\n ) {\n $lang = $res[1];\n $accept = ereg_replace(\"$lang\", '', $accept);\n } */\n }\n }\n\n if (!isset($lang) || !file_exists(BASEDIR . $lang . '/index.php')) {\n /* Use English as default */\n $lang = 'en';\n }\n\n /* Set the cookie only for the default path / but not e.g., /fr/ */\n if (!isset($dirlang))\n setcookie('cooklang', $lang, time() + 31536000);\n\n return $lang;\n}",
"function addLanguage(){\n $currentLanguage=\"\";\n if(!empty($_GET)){\n $currentLanguage = $_GET[\"lang\"];\n return \"lang=\".$currentLanguage; \n }\n else {\n return \"lang=\".\"eng\"; \n }\n \n }",
"function get_current_language() {\n $ci = & get_instance();\n if ($ci->session->userdata('lang')) {\n return $ci->session->userdata('lang');\n } else {\n return DEF_LANGUAGE;\n }\n}",
"final public function getLang(): string {\n $this->init();\n return $this->language;\n }",
"public function lang() {\n\t\t\tload_plugin_textdomain( 'cherry-site-shortcodes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}",
"function language($language)\n{\n\tif(in_array($language, languages()))\n\t{\n\t\t// Include language\n\t\tinclude(BASEPATH . 'languages/' . $language . EXT);\n\t}\n\telse\n\t{\n\t\t// Include language\n\t\tinclude(BASEPATH . 'languages/en' . EXT);\n\t}\n\t\n\t// Return language\n\treturn $lang;\n}",
"function &happy_linux_get_lang_name_ja()\n{\n $arr = array('japanese', 'japaneseutf', 'ja_utf8');\n return $arr;\n}",
"public function getMultilingual();",
"function getRespectSysLanguage() ;",
"function get_lang_locale() {\n\tglobal $lang_code;\n\t$localeMap = array(\n\t\t'ca' => 'ca_ES',\n\t\t'cs' => 'cs_CZ',\n\t\t'cy' => 'cy_GB',\n\t\t'da' => 'da_DK',\n\t\t'de' => 'de_DE',\n\t\t'eu' => 'eu_ES',\n\t\t'en' => 'en_US',\n\t\t'es' => 'es_ES',\n\t\t'fi' => 'fi_FI',\n\t\t'fr' => 'fr_FR',\n\t\t'gl' => 'gl_ES',\n\t\t'hu' => 'hu_HU',\n\t\t'it' => 'it_IT',\n\t\t'ja' => 'ja_JP',\n\t\t'ko' => 'ko_KR',\n\t\t'nb' => 'nb_NO',\n\t\t'nl' => 'nl_NL',\n\t\t'pl' => 'pl_PL',\n\t\t'pt' => 'pt_BR',\n\t\t'ro' => 'ro_RO',\n\t\t'ru' => 'ru_RU',\n\t\t'sk' => 'sk_SK',\n\t\t'sl' => 'sl_SI',\n\t\t'sv' => 'sv_SE',\n\t\t'th' => 'th_TH',\n\t\t'tr' => 'tr_TR',\n\t\t'ku' => 'ku_TR',\n\t\t'zh_CN' => 'zh_CN',\n\t\t'zh_TW' => 'zh_TW',\n\t\t'af' => 'af_ZA',\n\t\t'sq' => 'sq_AL',\n\t\t'hy' => 'hy_AM',\n\t\t'az' => 'az_AZ',\n\t\t'be' => 'be_BY',\n\t\t'bs' => 'bs_BA',\n\t\t'bg' => 'bg_BG',\n\t\t'hr' => 'hr_HR',\n\t\t'eo' => 'eo_EO',\n\t\t'et' => 'et_EE',\n\t\t'fo' => 'fo_FO',\n\t\t'ka' => 'ka_GE',\n\t\t'el' => 'el_GR',\n\t\t'hi' => 'hi_IN',\n\t\t'is' => 'is_IS',\n\t\t'id' => 'id_ID',\n\t\t'ga' => 'ga_IE',\n\t\t'jv' => 'jv_ID',\n\t\t'kk' => 'kk_KZ',\n\t\t'la' => 'la_VA',\n\t\t'lv' => 'lv_LV',\n\t\t'lt' => 'lt_LT',\n\t\t'mk' => 'mk_MK',\n\t\t'mg' => 'mg_MG',\n\t\t'ms' => 'ms_MY',\n\t\t'mt' => 'mt_MT',\n\t\t'mn' => 'mn_MN',\n\t\t'ne' => 'ne_NP',\n\t\t'rm' => 'rm_CH',\n\t\t'sr' => 'sr_RS',\n\t\t'so' => 'so_SO',\n\t\t'sw' => 'sw_KE',\n\t\t'tl' => 'tl_PH',\n\t\t'uk' => 'uk_UA',\n\t\t'uz' => 'uz_UZ',\n\t\t'vi' => 'vi_VN',\n\t\t'zu' => 'zu_ZA',\n\t\t'ar' => 'ar_AR',\n\t\t'he' => 'he_IL',\n\t\t'ur' => 'ur_PK',\n\t\t'fa' => 'fa_IR',\n\t\t'sy' => 'sy_SY',\n\t\t'gn' => 'gn_PY'\n\t);\n\treturn (check_value($localeMap[$lang_code])) ? $localeMap[$lang_code] : 'en_US';\n}",
"function getvar($varname){\n\t\t// for example, getvar('name') will return 'name_fr' (provided it exists and is non-empty) in a french context\n\t\t$locname = $varname.'_'.CURLANG;\n\t\t$otherlang = $varname.'_'.(CURLANG=='fr'?'de':'fr');\n\t\tif(isset($this->$locname)){\n\t\t\tif($this->$locname == '' && $this->$otherlang != ''){\n\t\t\t\t// if the current language variable is empty, return the other language's value\n\t\t\t\treturn $this->$otherlang;\n\t\t\t}else{\n\t\t\t\treturn $this->$locname;\n\t\t\t}\n\t\t}elseif(isset($this->$varname)){\n\t\t\treturn $this->$varname;\n\t\t}\n\t\treturn false;\n\t}",
"private function getLanguageId()\n {\n $languageId = \"\";\n if (isset($_SESSION['Shopware'][\"Auth\"]->localeID) && $_SESSION['Shopware'][\"Auth\"]->localeID != \"\") {\n $languageId = $_SESSION['Shopware'][\"Auth\"]->localeID;\n }\n return $languageId;\n }"
] | [
"0.7663165",
"0.76119184",
"0.7602177",
"0.75445026",
"0.74048465",
"0.74048465",
"0.74046314",
"0.7392626",
"0.7298465",
"0.7252755",
"0.72225285",
"0.7175835",
"0.716529",
"0.71583045",
"0.71408236",
"0.71367925",
"0.71259207",
"0.7098571",
"0.7063948",
"0.705879",
"0.7058533",
"0.704672",
"0.7034223",
"0.70125127",
"0.6991665",
"0.69601965",
"0.69566244",
"0.69552976",
"0.6952564",
"0.69511884",
"0.69398844",
"0.69346005",
"0.69228154",
"0.6908079",
"0.6846388",
"0.68250614",
"0.6812879",
"0.6808544",
"0.6774057",
"0.675391",
"0.674187",
"0.672657",
"0.6715158",
"0.6710431",
"0.6710431",
"0.6710431",
"0.6706108",
"0.67010957",
"0.6693538",
"0.6690719",
"0.6667512",
"0.66641504",
"0.66593164",
"0.6652398",
"0.6640205",
"0.6637962",
"0.6622731",
"0.66226685",
"0.6611288",
"0.6609088",
"0.66025794",
"0.65937644",
"0.6593552",
"0.65851176",
"0.65829915",
"0.6582438",
"0.6581497",
"0.65687037",
"0.6565952",
"0.65653026",
"0.65653026",
"0.65653026",
"0.65653026",
"0.65653026",
"0.65653026",
"0.65649074",
"0.65625954",
"0.653822",
"0.65359694",
"0.6535295",
"0.65245867",
"0.6523283",
"0.65202934",
"0.6509674",
"0.650832",
"0.6479338",
"0.6476484",
"0.64657456",
"0.64515305",
"0.64505374",
"0.6447337",
"0.64397377",
"0.64316964",
"0.64309067",
"0.64275014",
"0.642538",
"0.6424302",
"0.6414768",
"0.6386588",
"0.6383783",
"0.6377684"
] | 0.0 | -1 |
used to sanitize accounts | function doMkAccount ($string)
{
return preg_replace ('/[^a-z0-9\-_:\.]/i', '', trim (substr ($string, 0, 21)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __sanitise() { $this->username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $hashed_password = password_hash($password, PASSWORD_BCRYPT);\n $this->email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->usertype = filter_input(INPUT_POST, 'lib_code', FILTER_SANITIZE_SPECIAL_CHARS);\n }",
"protected function sanitize() {}",
"private static function sanitize(){\n $_SERVER[\"PHP_AUTH_USER\"] = filter_var(filter_var($_SERVER[\"PHP_AUTH_USER\"], FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL);\n\n\t\tif (!$_SERVER[\"PHP_AUTH_USER\"]){\n\t\t\t// if email validation has failed\n\t\t\tthrow new UsernameNotAValidEmailAddress (\"Submitted UserName is not a valid email address\");\n\t\t}\n\n // sanitise POST data UserName\n Connection::$input['UserName'] = $_SERVER[\"PHP_AUTH_USER\"]; // This should never be sent in the post variables, instead, username should be sent in the header.\n Connection::$input['Password'] = $_SERVER[\"PHP_AUTH_PW\"]; // This also prevents UserName being updated.\n // A new password may be (in the future) sent via POST, but for now, this should not be updatable through this method.\n\n }",
"public function sanitize() {\n }",
"abstract public function sanitize();",
"function the_champ_sanitize_user($username, $rawUsername, $strict){\r\n\t$username = wp_strip_all_tags($rawUsername);\r\n\t$username = remove_accents($username);\r\n\t$username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);\r\n\t$username = preg_replace('/&.+?;/', '', $username);\r\n\t// If strict, reduce to ASCII and Cyrillic characters for max portability.\r\n\tif($strict){\r\n\t\t$settings = get_option('wscu_settings');\r\n\t\t$username = preg_replace('|[^a-z\\p{Arabic}\\p{Cyrillic}0-9 _.\\-@]|iu', '', $username);\r\n\t}\r\n\t$username = trim($username);\r\n\t// Consolidate contiguous whitespace\r\n\t$username = preg_replace('|\\s+|', ' ', $username);\r\n\r\n\treturn $username;\r\n}",
"function sanitizeName() {\n $pattern = \"/[0-9`!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?~]/\";\n if (!preg_match($pattern, $this->fname) && !preg_match($pattern, $this->lname)) {\n $this->fname = trim($this->fname);\n $this->lname = trim($this->lname);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function sanitizeEmail() {\n $pattern = \"/^[A-Z0-9._%+\\-]+@[A-Z0-9.\\-]+\\.[A-Z]{2,}$/i\";\n if (preg_match($pattern, $this->email)) {\n $this->email = filter_var($this->email, FILTER_SANITIZE_EMAIL);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function sanitize_user_field($field, $value, $user_id, $context)\n {\n }",
"function sanitizePassword() {\n // If there is a password confirmation we put it to the checker, too\n $passCheckerInput = (strlen($this->passwordConf) > 0) ?\n array($this->password, $this->passwordConf) : $this->password;\n $passwordChecker = new PasswordChecker($passCheckerInput);\n if ($passwordChecker->getRelevance()) {\n $this->password = htmlspecialchars($this->password);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function sanitize_validate_input($data){\n\t\t \t \t$data = filter_var($data, FILTER_SANITIZE_STRING);\n\t\t \t \t//$data = filter_var($data, FILTER_VALIDATE_EMAIL);\n\t\t \t \t$data = stripcslashes($data);\n\t\t \t \t$data = trim($data);\n\t\t \t \t$data = htmlspecialchars($data);\n\t\t \t \t\n\t\t \t \treturn $data; }",
"function sanitize ($data, $type) {\n if($type == 1){\n for($i = 0; $i < count($data); $i++) {\n $data[$i] = (string)$data[$i]; //ensure is string$\n $data[$i] = preg_replace(\"/[^a-zA-Z0-9 .!\\/]*/\",\"\", $data[$i]); //remove any characters that are not a-z, A-Z, 0-9...\n $data[$i] = substr($data[$i], 0, 20);//restrict length to 20 characters\n $data[$i] = htmlentities($data[$i], ENT_QUOTES, 'utf-8');\n $data[$i] = filter_var($data[$i], FILTER_SANITIZE_STRING);\n }\n //username must be longer than 5 \n //password must be 8 characters or more\n\n if(strlen($data[0]) < 5 || strlen($data[1]) < 8) {\n return false;\n }\n else {\n return $data;\n }\n }\n}",
"function sanitizeDBData($input) {\n $halfSan = filter_var($input, FILTER_SANITIZE_EMAIL);\n\n //sets slashes infront of \" ' and \\\n $output = filter_var($halfSan, FILTER_SANITIZE_MAGIC_QUOTES);\n\n return $output;\n}",
"function sanitize($dataArray)\n\t{\n\t\t$this->data[\"username\"] = filter_var($dataArray[\"username\"], FILTER_SANITIZE_STRING);\n\t\t$this->data[\"password\"] = filter_var($dataArray[\"password\"], FILTER_SANITIZE_STRING);\n\t\t$this->data[\"description\"] = filter_var($dataArray[\"description\"], FILTER_SANITIZE_STRING);\n\t\t$this->data[\"quote\"] = filter_var($dataArray[\"quote\"], FILTER_SANITIZE_STRING);\n\t\t\n\t\t/* if(isset($this->data[\"user_level\"]))\n\t\t{\n\t\t\t$this->data[\"user_level\"] = filter_var($dataArray[\"user_level\"], FILTER_SANITIZE_STRING);\n\t\t} */\n\t\treturn $dataArray;\n\t}",
"function sanitize_email($email)\n {\n }",
"function account_namevalid() {\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-\") == 0) {\n return false;\n }\n \n // must contain all legal characters\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\") != strlen($_POST['clientusername'])) {\n return false;\n }\n\n // min and max length\n if (strlen($_POST['clientusername']) < 5) {\n return false;\n }\n if (strlen($_POST['clientusername']) > 25) {\n return false;\n }\n\n // illegal names\n if (eregi(\"^((root)|(bin)|(daemon)|(adm)|(lp)|(sync)|(shutdown)|(halt)|(mail)|(news)|(uucp)|(operator)|(games)|(mysql)|(httpd)|(nobody)|(dummy)|(www)|(cvs)|(shell)|(ftp)|(irc)|(debian)|(ns)|(download))$\", $_POST['username'])) {\n return false;\n }\n if (eregi(\"^(anoncvs_)\", $_POST['clientusername'])) {\n return false;\n }\n\nreturn true;\n}",
"function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}",
"function cleanup($user, $pass)\r\n {\r\n\r\n //$combo = array($user, $pass);\r\n\r\n\r\n /*-+=+-*-+=+-*-+=+-*-+=+-*-+=+-*-+=+-*-+=+-*-+=+-+-*-+=+-+-*-+\r\n * Validity Checks, entropy check, blacklists\r\n */\r\n\r\n\r\n // Trim\r\n $user = trim($user);\r\n $pass = trim($pass);\r\n\r\n // Remove line numbers from usernames\r\n $pattern = '/^\\d{1,4}[\\s\\.\\:\\-]{0,2}/';\r\n $user = preg_replace($pattern, '', $user);\r\n\r\n if (strstr($user,'&')) {\r\n $user = preg_replace_callback(\"/(&#[0-9]+;)/\", function($m) { return mb_convert_encoding($m[1], \"UTF-8\", \"HTML-ENTITIES\"); }, $user);\r\n $user = html_entity_decode($user);\r\n }\r\n\r\n if (strstr($pass,'&')) {\r\n $pass = preg_replace_callback(\"/(&#[0-9]+;)/\", function($m) { return mb_convert_encoding($m[1], \"UTF-8\", \"HTML-ENTITIES\"); }, $pass);\r\n $pass = html_entity_decode($pass);\r\n }\r\n\r\n // Min and max lengths\r\n if ($this->mStrLen($user) > 60) {\r\n $this->skipped['Username too long']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Username too long: $user\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n if ($this->mStrLen($user) < 3) {\r\n $this->skipped['Username too short']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Username too short: $user\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n if ($this->mStrLen($pass) > 40) {\r\n $this->skipped['Password too long']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Password too long: $user\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n if ($this->mStrLen($pass) < 3) {\r\n $this->skipped['Password too short']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Password too short: $user\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Entropy checks\r\n if ($this->doEntropyCheck) {\r\n $x = $this->checkEntropy($user);\r\n $y = $this->checkEntropy($pass);\r\n\r\n // High entropy or (medium entropy and both username and password are the same length)\r\n if (($x > .8 && $y > .8) || ($x > .5 && $y > .5 && strlen($user) == strlen($pass))) {\r\n $this->skipped['Entropy too high']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (High entropy)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Is hash and medium entropy\r\n if ($this->isHash($pass) && $y > .5) {\r\n $this->skipped['Password is a hash']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Hash)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Numeric username and high entropy pass\r\n if (is_numeric($user) && $y > .8) {\r\n $this->skipped['Entropy too high']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Numeric user, high entropy pass)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n }\r\n\r\n // Discard usernames or passwords that contain linefeeds or carriage returns\r\n if (strstr($user, \"\\r\") || strstr($pass, \"\\n\") || strstr($pass, \"\\r\") || strstr($pass, \"\\n\")) {\r\n $this->skipped['Invalid characters']++;\r\n if (PARSER_DEBUG) {\r\n echo ' Invalid characters - User: ' . $user . ' Pass: ' . $pass . \"\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Remove quotes and commas\r\n //list($user, $pass) = str_replace(array(\"'\", '\"', ','), '', $combo);\r\n $user = str_replace(array(\"'\", '\"', ','), '', $user);\r\n $pass = str_replace(array(\"'\", '\"', ','), '', $pass);\r\n\r\n\r\n // Strip out email addresses\r\n //$data = preg_replace('/\\b([A-Z0-9._%+-]+)@[A-Z0-9.-]+\\.[A-Z]{2,6}\\b/', '$1', $data);\r\n\r\n // Convert e notation to numbers\r\n if (preg_match('/\\d\\.\\d+E\\+\\d+/i', $pass)) {\r\n $pass = (float)$pass;\r\n $pass = (string)$pass;\r\n }\r\n\r\n\r\n // TEMP HACK Todo: Fix this\r\n if (strstr($pass, ':')) {\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping password $pass (Contains a colon)\\n\";\r\n }\r\n return null;\r\n }\r\n\r\n\r\n // For now just reject combos that looks like ●\r\n If ((preg_match('/&#\\d{3,4};/i', $user) || (preg_match('/&#\\d\\d\\d\\d;/i', $pass)))) {\r\n return null;\r\n }\r\n\r\n\r\n // remove stuff that looks like a url (=)\r\n if (preg_match('#:\\/\\/|@[^\\.]*\\.\\.#', $user, $matches) || preg_match('#:\\/\\/|@[^\\.]*\\.\\.#', $pass, $matches)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping (URI)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Catch member URLs\r\n // Is this a duplicate of the previous check?\r\n if ((preg_match('~h?..p~i', $user) && substr($pass, 0, 2) == '//')\r\n || (preg_match('~.*(?:/?member|/login|/premium)|/.*/[^\\s]*\\s|\\.[a-z][a-z]+[\\/|:]~im', $user . ' ' . $pass))\r\n || (preg_match('~(?:www\\.|members\\.)[-A-Z0-9+&@#/%=_|$?!:,.]*[A-Z0-9+&@#/%=_|$]~im', $user . ' ' . $pass))\r\n ) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (URL)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Data is an IP address\r\n if (preg_match('#(?:[0-9]{1,3}\\.){3}[0-9]{1,3}#', $user) || preg_match(\r\n '#(?:[0-9]{1,3}\\.){3}[0-9]{1,3}#',\r\n $pass\r\n )\r\n ) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (IP Address)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Password is an email address\r\n // This will have false positives because the password really could be an email address\r\n // but it will eliminate tens of thousands of parsing errors.\r\n\r\n if (preg_match(\"/[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&\\'*+\\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/im\", $pass)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping $pass (Email Address)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Username is truncated email address\r\n if (preg_match(\"/^.?@[^\\.]*\\./im\", $user)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping $user (Truncated Email Address)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Username or password starts with \"(\" or ends with \")\"\r\n // Discard them for now but these may be able to be stripped out\r\n\r\n if ($user[0] == '(' || $pass[0] == '(' ||\r\n $pass[strlen($pass) - 1] == ')' || $pass[strlen($pass) - 1] == ')'\r\n ) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Parenthesis)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Both username and password contain a space\r\n if (strstr($user, ' ') && strstr($pass, ' ')) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Spaces)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Kill usernames like \"Database\" or \"Table\r\n if (preg_match('/^database|table|system|server|hostname|target$/smi', $user)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Reserved word)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Catch ellipses\r\n if (strstr($user, '...') || strstr($pass, '...')) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Elipses)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Catch html tags in username or password\r\n if (preg_match(\r\n '~</?\\s?(?:s(?:t(?:r(?:ike|ong)|yle)|(?:crip|elec|qr)t|pa(?:cer|n)|u[bp]|mall|ound|amp)?|b(?:l(?:ockquote|ink)|ase(?:font)?|o(?:dy|x)|gsound|utton|do|ig|r)?|t(?:[dr]|ext(?:area)?|(?:ab|it)le|(?:foo)?t|h(?:ead)?|body)|a(?:b(?:ove|br)|r(?:ray|ea)|cronym|ddress|pplet)?|c(?:o(?:l(?:group)?|mment|de)|aption|enter|ite)|n(?:o(?:(?:laye|b)r|frames|script|te)|extid)|f(?:i(?:eldset|g)|rame(?:set)?|o(?:nt|rm))|i(?:n(?:put|s)|sindex|frame|layer|mg)?|l(?:i(?:sting|nk)?|a(?:bel|yer)|egend)|m(?:a(?:rquee|p)|e(?:nu|ta)|ulticol)|o(?:pt(?:group|ion)|bject|l)|d(?:[dt]|i[rv]|e?l|fn)|h(?:[123456r]|ead|tml)|p(?:aram|re)?|r(?:ange|oot)|(?:va|wb)r|em(?:bed)?|q(?:uote)?|kbd|ul?|xmp)|color|clear|font-.*|list-.*|margin-.*|float|vertical-.*|padding-.*~im',\r\n $pass . ' ' . $user\r\n )\r\n ) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (HTML tag)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // More HTML/CSS stuff\r\n if (preg_match('~.*transition|return|(?:.*background.*)|#\\d+|(?:\\d+(em|px|pt|%))|(?:left|right|top|bottom|middle|normal|italic|bold|none|both);|-(?:style|size|align|weight|width|height|spacing|color)~im',\r\n $pass . ' ' . $user\r\n )\r\n ) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (HTML/CSS tag)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /* Get rid of stuff that looks like code\r\n * define(\"DB_PREFETCH_ALL\",0);\r\n * define(\"FROMEMAILNAME\",'RPPC');\r\n */\r\n\r\n if (preg_match('/\\([\\'\"]|[\"\\',\\s]{3,6}|define\\(/im', $pass . ' ' . $user)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Source code)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // OS and file system stuff\r\n if (preg_match('/\\.\\.\\/|;echo|;ls/im', $pass . ' ' . $user)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Source code)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Kill all usernames that start with 3 or more symbols, may kill a few legit usernames but most are bad\r\n if (preg_match('/^[^a-zA-Z0-9\\s]{3,}/m', $user)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Source code)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Blacklists\r\n if ($this->useBlacklist) {\r\n\r\n // Known hackers\r\n $blacklist = 'x{1,3}.*pass.*|premium|2sexy2hot|4zima|arangarang|azzbite|babemagnet|c0ldsore|candoit0|capthowdy|cr3at0r|dabest|dawggyloves|ddenys|denyde|dreamv|drhacker|forxhq|xxxhq|forzima|fromajaxxx|frompwbb|gigacrap|h4x0r3d|h4x0r3d|hackedit|hackerz|hacksquat|hax411|heka6w2|hunterdivx|hxpduck|iownbuz|ischrome|ishere|jules\\d\\d|justone|lawina|mp3fanis|myownpass|neohack|niprip|onmeed|opsrule|ownzyou|ownzyou|pass4life|passbots|passfan|pr0t3st|pro@long|probot|prolong|realxxx|reduser\\d\\d|regradz|ripnip|rulzgz|strosek|surgict|suzeadmin|tama|tawnyluvs|valentijn|vbhacker|verygoodbot|wapbbs|washere|wazhere|webcracker|webcrackers|xcarmex2|xxxcrack|xxxhack|xxxpass|zcoolx|zealots|zolushka|ccbill|4xhq|\\$andman|\\[hide\\]|ranger67|xv16n35h';\r\n if (preg_match('~' . $blacklist . '~', $user, $matches)) {\r\n $this->skipped['Blacklisted username']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Known hackers blacklist)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Known hacker passwords\r\n $blacklist = '.*pas.*bot|forx.*|(?:is|w[u|a][z|s]|iz|)_?(?:here|back|numberone|thebest|dabest)|(?:greet[s|z]|l[0|o]ves|[0|o]wn[s|z])you.*';\r\n if (preg_match('~' . $blacklist . '~', $pass, $matches)) {\r\n $this->skipped['Blacklisted username']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Known hackers blacklist)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Usernames blacklist\r\n // Discards these: user, username, pass, password, email, login\r\n if (preg_match('#^(pass(word)?|user(name)?|email|login|from|Computer|Program):?$#i', $user, $matches)) {\r\n $this->skipped['Blacklisted username']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Username blacklist)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Passwords blacklist\r\n // Discards these: user, username, email, login\r\n if (preg_match('#^(user(name)?|email|login):?$#i', $pass, $matches)) {\r\n $this->skipped['Blacklisted password']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (password blacklist)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n\r\n // Misc stuff\r\n $blacklist = '\\*\\.\\*|76n74link|-box|Computername|text\\/javascript|\\(?null\\)?|\\#NAME|\\d\\d\\d\\d-\\d\\d-\\d\\d.*\\d\\d:\\d\\d:\\d\\d| |\\{float|\\{text-align|\\{height|\\{display|function\\(|height=|\\(HIT|(em|p[xt]);?\\s*\\}|this\\.|^link|»|^http';\r\n\r\n if (preg_match('~' . $blacklist . '~i', $user, $matches)) {\r\n $this->skipped['Blacklisted username']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping user $user (Blacklisted username)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n if (preg_match('~' . $blacklist . '~i', $pass, $matches)) {\r\n $this->skipped['Blacklisted password']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping password $pass (Blacklisted password)\\n\";\r\n }\r\n\r\n return null;\r\n };\r\n\r\n // CSS stuff\r\n\r\n // Start with a quick check on obvious matches to avoid a regex on every combo\r\n //if (substr($user, 5) == '-moz-' || substr($user, 8) == '-webkit-') {\r\n if (stristr($user, '-moz-') || stristr($user, '-webkit-') || stristr($user, '-ms-')) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping $user (Username contains CSS)\\n\";\r\n }\r\n return null;\r\n }\r\n\r\n $blacklist = '(?:t(?:r(?:ee(?:header(?:sortarrow|cell)|twisty(?:open)?|item|view)|a(?:ns(?:ition|form)|d)|im)|o(?:ol(?:b(?:ar(?:button)?|ox)|tip))?|a(?:b(?:panels|le)?|rget|mil)|i(?:gr(?:inya|e)|betan)|e(?:xt(?:field)?|lugu)|hai|b)|s(?:t(?:r(?:i(?:ct|ng)|ength|ong)|a(?:rt[xy]|tusbar)|yle|em)|p(?:ac(?:es?|ing)|eek)|cr(?:oll(?:bar)?|ipt)|i(?:d(?:ama|e)|mp|ze)|e(?:parator|lf|t)|a(?:turation|me)|o(?:mali|urce)|li[cd]e|hifts?|yriac|mall|RGB)|c(?:o(?:n(?:t(?:e[nx]t|ainer)|s(?:onant|ider))|l(?:or(?:imetric)?|lapse|umns?)?|unter|py)|h(?:eck(?:box)?|a(?:nge|r)|inese)|a(?:p(?:tion|s)|mbodian)|e(?:ntral|lls?)|l(?:ear|ip)|ro(?:ss|p)|ircled|ursor|jk)|p(?:r(?:o(?:g(?:ressbar|id)|file)|e(?:se(?:ntation|rve))?)|er(?:s(?:pective|ian)|ceptual)|o(?:s(?:iti(?:on|ve))?|int)|h(?:onemes|ase)|a(?:dding|ge)|unctuation|itch)|d(?:i(?:s(?:(?:(?:reg|c)ar|able)d|pla(?:ce|y)|tribute)|a(?:mond|log)|rection|gits)|o(?:(?:cume|mina)nt|t(?:ted)?|uble|wn)|e(?:vanagari|cimal)|ash|rop)|a(?:l(?:i(?:gn(?:ment)?|as)|l(?:owed)?|phabetic)|(?:ppearanc|beged)e|r(?:menian|abic)|f(?:te|a)r|nimation|sterisks|mharic|djust|head|uto)|b(?:a(?:ck(?:ground|wards|face)|seline)|o(?:okmark|unding|rder|x)|e(?:havior|ngali|fore)|r(?:eaks?|anch)|in(?:ding|ary)|utton|lock|t)|m(?:a(?:(?:thematic|nu)al|r(?:quee|gin|k)|layalam|x)|e(?:n(?:u(?:popup|item|list)?|t)|et)|o(?:de(?:rate|l)?|ngolian|ve|z)|yanmar|in)|i(?:n(?:d(?:e(?:nt|x)|ic)|c(?:rement|lude)|(?:activ|lin)e|(?:form|iti)al|(?:ten|se)t|k)|m(?:ages?|e)|deograph)|f(?:i(?:nish(?:(?:opacit)?y|x)|l(?:l(?:ed)?|ter)|t)|o(?:r(?:ma[lt]|wards)|otnotes|nt)|loat|req)|r(?:e(?:s(?:olution|izer?|e?t)|(?:lativ|plac)e|ndering|duced|ct)|o(?:tation|ws?|le)|adio|uby|l)|e(?:n(?:(?:able)?d|grave)|(?:xclud|dg)e|a(?:rthly|ch)|m(?:boss|pty)|thiopic|pub|w)|l(?:i(?:ghtstrength|n[ek]|teral|st)|a(?:(?:you|s)t|o)|o(?:ose|wer)|e(?:vel|ft)|r)|o(?:r(?:i(?:(?:entatio|gi)n|ya)|omo)|ff(?:[xy]|set)|verflow|pacity|utline|ctal)?|n(?:e(?:w(?:spaper)?|ver|sw)|o(?:rwegian|t)?|a(?:me|v)|umeral|wse|s)|h(?:e(?:xadecimal|avenly|ight|re)|an(?:g(?:ing|ul)|d)|yphen)|v(?:(?:o(?:lum|ic)|alu)e|isibility|ertical)|w(?:r(?:iting|ap)|hite|idth|eak|ord)|g(?:u(?:jarat|rmukh)i|r(?:eek|id))|D(?:XImageTransform|ropShadow)|u(?:p(?:per)?|rdu|se)|k(?:annada|hmer|eep)|M(?:icrosoft|ask)|(?:japanes|Wav)e|(?:Chrom|Alph)a|(?:Shad|Gl)ow|z(?:oom)?|Flip[HV]|quotes|Blur|XRay|xv?)';\r\n\r\n if (preg_match('~' . $blacklist . '~i', $user, $matches)) {\r\n // only check the password regex if a username matches\r\n $blacklist = '^(?:above|absolute|absolute-colorimetric|ActiveBorder|ActiveCaption|adjacent|AliceBlue|all|allow-end|alternate|alternate-reverse|always|AntiqueWhite|AppWorkspace|aqua|Aquamarine|armenian|ascent|attr|auto|avoid|Azure|back|background.*|balance|baseline|behind|Beige|below|bidi-override|Bisque|black|BlanchedAlmond|blink|block|block-axis|blue|BlueViolet|bold|bolder|border-box|both|bottom|break-word|Brown|BurlyWood|Button.*|CadetBlue|cap-height|capitalize|CaptionText|center|center-left|center-right|centerline|Chartreuse|child|Chocolate|circle|close-quote|collapse|compact|condensed|contain|content-box|continuous|Coral|CornflowerBlue|Cornsilk|counter|cover|Crimson|crosshair|cubic-bezier|current|cursive|Cyan|DarkBlue|DarkCyan|DarkGoldenrod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|dashed|decimal|decimal-leading-zero|DeepPink|DeepSkyBlue|default|definition-src|descent|digits|DimGray|disc|distribute|DodgerBlue|dotted|double|e-resize|ease|ease-in|ease-in-out|ease-out|ellipsis|embed|end|expanded|extra-condensed|extra-expanded|fantasy|far-left|far-right|fast|faster|female|field|Firebrick|fixed|flat|FloralWhite|force-end|ForestGreen|front|fuchsia|Gainsboro|georgian|GhostWhite|Gold|Goldenrod|gray|GrayText|green|GreenYellow|groove|hebrew|help|hidden|hide|high|higher|Highlight|HighlightText|hiragana|hiragana-iroha|Honeydew|horizontal|HotPink|icon|InactiveBorder|InactiveCaption|InactiveCaptionText|IndianRed|Indigo|infinite|InfoBackground|InfoText|inherit|inline|inline-axis|inline-block|inline-table|inset|inside|inter-cluster|inter-ideograph|inter-word|invert|italic|Ivory|justify|kashida|katakana|katakana-iroha|Khaki|landscape|large|larger|Lavender|LavenderBlush|LawnGreen|left|left-side|leftwards|LemonChiffon|level|LightBlue|LightCoral|LightCyan|lighter|LightGoldenrodYellow|LightGray|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlue|LightYellow|Lime|LimeGreen|line-through|linear|Linen|list-item|local|low|lower|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|ltr|Magenta|male|marker|marker-offset|marks|Maroon|mathline|medium|MediumAquamarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|menu|MenuText|message-box|middle|MidnightBlue|MintCream|MistyRose|mix|Moccasin|modal|monospace|move|multiple|n-resize|narrower|NavajoWhite|Navy|ne-resize|new|no-close-quote|no-content|no-display|no-open-quote|no-repeat|none|normal|nowrap|nw-resize|oblique|old|OldLace|Olive|OliveDrab|once|open-quote|Orange|OrangeRed|Orchid|outset|outside|overline|padding-box|PaleGoldenrod|PaleGreen|PaleTurquoise|PaleVioletRed|panose-1|PapayaWhip|parent|paused|PeachPuff|Peru|Pink|Plum|pointer|portrait|PowderBlue|pre-line|pre-wrap|preserve-3d|progress|Purple|rect|Red|relative|repeat|repeat-x|repeat-y|reverse|rgb|ridge|right|right-side|rightwards|root|RosyBrown|round|RoyalBlue|rtl|run-in|running|s-resize|SaddleBrown|Salmon|SandyBrown|sans-serif|scroll|Scrollbar|se-resize|SeaGreen|SeaShell|semi-condensed|semi-expanded|separate|serif|show|Sienna|silent|Silver|single|size|SkyBlue|SlateBlue|SlateGray|slope|slow|slower|small-caps|small-caption|smaller|Snow|soft|solid|spell-out|SpringGreen|square|src|start|static|status-bar|SteelBlue|stemh|stemv|stretch|super|suppress|sw-resize|tab|table-caption|table-cell|table-column|table-column-group|table-footer-group|table-header-group|table-row|table-row-group|Tan|Teal|text|text-bottom|text-top|thick|thin|Thistle|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Tomato|top|topline|transparent|trim|Turquoise|ultra-condensed|ultra-expanded|underline|unicode-range|units-per-em|unrestricted|upper-.*|url|vertical|Violet|visible|w-resize|wait|Wheat|White|WhiteSmoke|wider|Window.*|x-.*|xx-.*|Yellow.*|-webkit.*)$';\r\n if (preg_match('~' . $blacklist . '~i', $pass, $matches)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping password $pass (Blacklisted password)\\n\";\r\n }\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n // Below are specific cases found that are false positives or bad matches by the parser\r\n\r\n // Specific case: Code:10846\r\n if (preg_match('/code|pin^/i', $user) && is_numeric($pass)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Code)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n // Specific case: l:drooga:super150\r\n if (substr($user, 0, 2) == 'l:') {\r\n $user = substr($user, 2, strlen($user) - 2);\r\n }\r\n\r\n /* Catch stuff like this:\r\n Found:password=mikeData\r\n Found:password=mikeTurning\r\n password=sunjava:name=Daniel\r\n */\r\n if (preg_match('/[a-zA-Z]*=/m', $user) || preg_match('/[a-zA-Z]*=/m', $pass)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (equals sign)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Specific case: ???:???\r\n if (preg_match('/\\?+/', $user) || preg_match('/\\?\\?+/', $user)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Question marks)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Specific case: ______________________ or ------------------------\r\n if (preg_match('/([^a-zA-Z0-9])\\1{7,}/', $user) || preg_match('/([^a-zA-Z0-9])\\1{7,}/', $pass)) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Repeated symbol)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Specific case: ------USERNAME:PASSWORDS\r\n if (stristr($user, 'username') && stristr($pass, 'password')) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Invalid)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // Specific case: sabre13;mustang\t55nude55;8363eddy or sabre13:mustang\t55nude55:8363eddy\r\n if ((strstr($user, ';') && strstr($pass, ';'))\r\n || (strstr($user, ':') && strstr($pass, ':')))\r\n {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Invalid)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n // Bad parse results\r\n // username:password password etc.\r\n\r\n if ((strstr($user, ':') || strstr($user, ',')) && strlen($user) > 20) {\r\n $this->skipped['Invalid data']++;\r\n if (PARSER_DEBUG) {\r\n echo \" Skipping combo $user:$pass (Bad parsing)\\n\";\r\n }\r\n\r\n return null;\r\n }\r\n\r\n\r\n\r\n\r\n /////// Saving stuff\r\n\r\n // Save e-mails\r\n if ($this->saveEmails) {\r\n if (preg_match('/\\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}\\b/i', $user, $email)) {\r\n $this->emails[] = $email;\r\n }\r\n }\r\n\r\n $return['user'] = $user;\r\n $return['pass'] = $pass;\r\n\r\n return $return;\r\n }",
"public function sanitize_input_fields()\n {\n }",
"function sanitizeFormUsername($inputText)\n{\n\n //The strip_tags() function strips a string from HTML, XML, and PHP tags. Strips all html elements that may be on a string \n //this is a security measure. Users can alter the site if they can submit html elements in a form. \n $inputText = strip_tags($inputText);\n\n //finding every single space in the string and replacing it with no space. Needed if a user enters a username with a space. \n //takes eveything in the first parameter and replaces it with whatever is located in the second parameter\n $inputText = str_replace(\" \", \"\", $inputText);\n\n return $inputText;\n}",
"function sanitize_user( $username, $strict = false ) {\n\t$raw_username = $username;\n\t$username = wp_strip_all_tags( $username );\n\t$username = remove_accents( $username );\n\t// Kill octets\n\t$username = preg_replace( '|%([a-fA-F0-9][a-fA-F0-9])|', '', $username );\n\t$username = preg_replace( '/&.+?;/', '', $username ); // Kill entities\n\n\t// If strict, reduce to ASCII for max portability.\n\tif ( $strict )\n\t\t$username = preg_replace( '|[^a-z0-9 _.\\-@]|i', '', $username );\n\n\t$username = trim( $username );\n\t// Consolidate contiguous whitespace\n\t$username = preg_replace( '|\\s+|', ' ', $username );\n\n\t/**\n\t * Filter a sanitized username string.\n\t *\n\t * @since 2.0.1\n\t *\n\t * @param string $username Sanitized username.\n\t * @param string $raw_username The username prior to sanitization.\n\t * @param bool $strict Whether to limit the sanitization to specific characters. Default false.\n\t */\n\treturn apply_filters( 'sanitize_user', $username, $raw_username, $strict );\n}",
"public function sanitize( $input ) {\n }",
"function sanitizeFormPassword($inputText){ //green coloer = function name, Orange = parameter with variable\n\t$inputText = strip_tags($inputText);\t\n\treturn $inputText;\n}",
"function protect1($protected) {\n\t$banlist = array (\"'\", \"\\\"\", \"<\", \"\\\\\", \"|\", \"/\", \"=\", \"insert\", \"select\", \"update\", \"delete\", \"distinct\", \"having\", \"truncate\", \"replace\", \"handler\", \"like\", \"procedure\", \"limit\", \"order by\", \"group by\", \"asc\", \"desc\"); \n\t//$banlist is the list of words you dont want to allow.\n\tif ( eregi ( \"[a-zA-Z0-9@]+\", $protected ) ) { // Makes sure only legitimate Characters are used.\n\t\t$protected = trim(str_replace($banlist, '', $protected)); // Takes out whitespace, and removes any banned words.\n\t\treturn $protected;\n\t\t//echo \"+\";\n\t} else {\n\t\t//echo \"-\";\n\t\techo $protected;\n\t\tdie ( ' Is invalid for that spot, please try a different entry.' ); // Message if thier is any characters not in [a-zA-Z0-9].\n\t} // ends the if ( eregi ( \"[a-zA-Z0-9]+\", $this->protected ) ) {\n}",
"function FilterData()\n\t{\n\t\t// Username and password should be trimmed, because we trim it on authentication\n\t\t$this->username = trim($this->username);\n\t\t$this->password = trim($this->password);\n\t}",
"public function validate_account(){ \n\t\tif($this->data['Client']['account_holder'][0] != ''){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"function eralha_crowdfunding_account(){\n\t\t\t\n\t\t}",
"public function it_can_be_sanitized()\n {\n $this->markTestSkipped('Sanitization is not implemented yet.');\n }",
"function sanitize_username($s) {\n\treturn preg_replace(\"/[^a-zA-Z0-9-_]/\", '', trim($s));\n}",
"function sanitize_user_object($user, $context = 'display')\n {\n }",
"public function sanitize()\n {\n parent::sanitize();\n\n foreach ($this->_cleanData as $key => $value) {\n $this->_cleanData[$key] = strip_tags($value);\n }\n }",
"function phpbb_clean_username($username)\n{\n\t$username = htmlspecialchars(rtrim(trim($username), \"\\\\\"));\n\t$username = substr(str_replace(\"\\\\'\", \"'\", $username), 0, 25);\n\t$username = str_replace(\"'\", \"\\\\'\", $username);\n\n\treturn $username;\n}",
"function getSignUpSanitized() {\n $this->sanitizeName();\n $this->sanitizeEmail();\n $this->sanitizePassword();\n return array($this->fname, $this->lname, $this->email, $this->password);\n }",
"function xss_clean($str, $is_image = FALSE)\n{ \n $security =& load_class('Security','core');\n return $security->xss_clean($str, $is_image);\n}",
"public abstract function sanitize($string);",
"public function sanitize()\n {\n return false;\n }",
"public function sanitize()\n {\n return false;\n }",
"public function sanitize()\n {\n return false;\n }",
"function sanitize($dirty){\n return htmlentities($dirty,ENT_QUOTES,\"UTF-8\");\n}",
"function xss_clean_data($string)\n{\n $CI = & get_instance();\n $return = $CI->security->xss_clean($string);\n return $return;\n}",
"function sanitize_input($data) { \r\n $data = trim($data); \r\n $data = stripslashes($data); \r\n $data = htmlspecialchars($data); \r\n return $data; \r\n }",
"function _xss_clean($field, $is_image = FALSE)\r\n\t{\r\n\t\t$this->{$field} = xss_clean($this->{$field}, $is_image);\r\n\t}",
"function sanitize_text_field($str)\n {\n }",
"public function sanitize($value)\n {\n }",
"function gratis_preprocess_username(&$vars) {\n // Update the username so it's the full name of the user.\n $account = $vars['account'];\n\n // Revise the name trimming done in template_preprocess_username.\n $name = $vars['name_raw'] = format_username($account);\n\n // Trim the altered name as core does, but with a higher character limit.\n if (drupal_strlen($name) > 35) {\n $name = drupal_substr($name, 0, 18) . '...';\n }\n\n // Assign the altered name to $vars['name'].\n $vars['name'] = check_plain($name);\n}",
"function secure_input($input) {\n\t\t\t$input = trim($input);\n\t\t\t$input = htmlspecialchars($input);\n\t\t\treturn $input;\n\t\t}",
"public function sanitize()\n {\n $purifier = $this->_purifier;\n $this->_sanitized_data = array_map(\n function ($field) use ($purifier) {\n return $purifier->purify($field);\n },\n $this->_data\n );\n }",
"public function sanitize() {\n\n\t\t// load the tool that we want to use in the xss filtering process\n\t\t$this->loadTool();\n\n\t\tif (is_array($_GET) AND count($_GET) > 0) {\n\n\t\t\t$_GET = $this->clean_input_data($_GET);\n\t\t}\n\t\tif (is_array($_POST) AND count($_POST) > 0) {\n\n\t\t\t$_POST = $this->clean_input_data($_POST);\n\t\t}\n\t\tif (is_array($_COOKIE) AND count($_COOKIE) > 0) {\n\n\t\t\t$_COOKIE = $this->clean_input_data($_COOKIE);\n\t\t}\n\t\tif (is_array($_FILES) AND count($_FILES) > 0) {\n\n\t\t\t//$_FILES = $this->clean_input_data($_FILES, true);\n\t\t}\n\n\t}",
"function cleanInput($data){ //sanitize data \n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function security($input)\n{\n $input = mysql_real_escape_string($input);\n $input = strip_tags($input);\n $input = stripslashes($input);\n return $input;\n}",
"function sanitizeString($var)\n{\nglobal $connection;\n$var = strip_tags($var);\n$var = htmlentities($var);\n$var = stripslashes($var);\nreturn $connection->real_escape_string($var);\n}",
"function secure_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n // tbd mysql_real_escape_string\r\n return $data;\r\n}",
"function sanitize_email($value)\n{\n return filter_var($value, FILTER_SANITIZE_EMAIL);\n}",
"function phpbb_clean_username($username)\n{\n\t$username = substr(htmlspecialchars(str_replace(\"\\'\", \"'\", trim($username))), 0, 25);\n\t$username = phpbb_rtrim($username, \"\\\\\");\n\t$username = str_replace(\"'\", \"\\'\", $username);\n\n\treturn $username;\n}",
"function modify_exceptPassword($firstname, $lastname, $birthday, $address, $town, $postal_code, $telephone, $credit_card, $username){\n\t\t$conn \t= connectDB();\n\t\t$sth \t= $conn \t-> prepare('UPDATE `clients`\n\t\t\t\t\t\t\t\t\t\tSET `firstname` = ?, `lastname` = ?, `birthday` = ?, `address` = ?, `town` = ?, `postal_code` = ?, `telephone` = ?, `credit_card` = ?\n\t\t\t\t\t\t\t\t\t\tWHERE `username` = ?');\n\t\t$sth \t-> execute(array($firstname, $lastname, $birthday, $address, $town, $postal_code, $telephone, $credit_card, $username));\n\t}",
"function sanitizeUserInput(string $userInput) : string {\n $userInput = trim($userInput);\n return htmlspecialchars($userInput);\n}",
"function sanitize_password(string $text = '')\n{\n return filter_var($text, FILTER_SANITIZE_STRING);\n}",
"function secure($input)\n {\n\n $input = trim($input);\n $input = htmlentities($input);\n return $input;\n }",
"function sanitise_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitize($data)\n{\n$data = trim($data);\n \n// apply stripslashes if magic_quotes_gpc is enabled\nif(get_magic_quotes_gpc())\n{\n$data = stripslashes($data);\n}\n \n// a mySQL connection is required before using this function\n$data = mysql_real_escape_string($data);\n \nreturn $data;\n}",
"function sanitizeCallback(\n $var, \n $options = array('options' => 'isLowerAlpha'), \n $filterType = FILTER_CALLBACK)\n{\n\n $varOutput = filter_var( $var, $filterType, $options);\n\n return stripslashes(strip_tags(htmlentities($varOutput, ENT_QUOTES)));\n\n}",
"function filterUsername($username) {\r\n \treturn $username;\r\n }",
"function quake_sanitize_twitter_handler( $input ){\n $output = sanitize_text_field( $input ); // for html charcters\n $output = str_replace('@', '', $output); // for @ chracter\n return $output;\n}",
"function _uid_filter ($dn) { return('(uid='.dn2uid($dn).')'); }",
"function sanitizeFields()\n\t{\n\t\tif(isset($this->sanitize) && isset($this->data[$this->name]))\n\t\t{\n\t\t\tforeach($this->data[$this->name] as $field => $value)\n\t\t\t{\n\t\t\t\tif(isset($this->sanitize[$field]))\n\t\t\t\t{\n\t\t\t\t\tif(!is_array($this->sanitize[$field]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $this->sanitize[$field]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tforeach($this->sanitize[$field] as $action)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->data[$this->name][$field] = $this->sanitize($this->data[$this->name][$field], $action);\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}",
"protected function _validateAccount() {\n\t\tif(!check($this->_username)) return;\n\t\tif(!check($this->_password)) return;\n\t\t$data = array(\n\t\t\t'username' => $this->_username,\n\t\t\t'password' => $this->_password\n\t\t);\n\t\tif($this->_md5Enabled) {\n\t\t\t$query = \"SELECT * FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = :username AND \"._CLMN_PASSWD_.\" = [dbo].[fn_md5](:password, :username)\";\n\t\t} else {\n\t\t\t$query = \"SELECT * FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = :username AND \"._CLMN_PASSWD_.\" = :password\";\n\t\t}\n\t\t\n\t\t$result = $this->db->queryFetchSingle($query, $data);\n\t\tif(!is_array($result)) return;\n\t\t\n\t\treturn true;\n\t}",
"function sanitize( $input ){\n $mysqli = self::dbconnect();\n $input = $mysqli->real_escape_string( $input );\n $input = trim($input);\n $input = htmlentities($input);\n $mysqli->close();\n return $input;\n }",
"public function sanitize($value);",
"public function processNewAccount() {\n\n\t\t// List of accounts\n\t\t$accounts = ['admin','bennabbott','oriongregg'];\n\n\t\t// Validate the form\n\t\t// Check that the user has privided a username\n\t\tif( $this->username == '' ) {\n\t\t\t$this->usernameErrorMsg = 'Invalid Username';\n\t\t} elseif(in_array($this->username, $accounts)) {\n\t\t\t$this->usernameErrorMsg = 'Username already exists';\t\t\t\n\t\t} else {\n\t\t\t$this->usernameErrorMsg = '';\n\t\t}\n\t\t\n\t\t// Check and make sure the paswords match\n\t\tif ($_POST['password'] == '' || $_POST ['password2'] == '') {\n\t\t\t$this->passwordErrorMsg = '* required';\t\t\t\n\t\t} elseif( $_POST['password'] != $_POST['password2']) {\n\t\t\t$this->passwordErrorMsg = 'Passwords do not match';\n\t\t} else {\n\t\t\t$this->passwordErrorMsg = '';\n\t\t}\n\t}",
"function sanitize($data){\r\n\t\t\t$data=stripslashes($data); // Remove all slashses\r\n\t\t\t$data=strip_tags($data); //Remove all tags\r\n\t\t\treturn $data;\r\n\t\t}",
"function clean_input($data){\r\n\t\t\t\t\t$data = trim($data);\r\n\t\t\t\t\t$data = stripslashes($data);\r\n\t\t\t\t\t$data = htmlspecialchars($data);\r\n\t\t\t\t\treturn $data;\r\n\t\t\t\t}",
"function sanitize_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}",
"function clean_account($account)\n{\n\t$account = rtrim($account, \"0\");\n\n\treturn $account;\n}",
"function sanitize($data){\r\n $conn = db ();\r\n return mysqli_real_escape_string($conn, $data);\r\n}",
"function sanitize($data){\n$data=trim($data);\n$data=htmlspecialchars($data);\n$data=mysql_real_escape_string($data);\nreturn $data;\n}",
"function sanitize($bad){\r\n\t\t\t$bad = stripslashes($bad);\r\n\t\t\t$bad = strip_tags($bad);\r\n\t\t\t$good = htmlentities($bad);\r\n\t\t\treturn $good;\r\n\t\t}",
"function sanitizeString($str_input) {\r\n $str_input = strip_tags($str_input);\r\n $str_input = htmlentities($str_input);\r\n $str_input = stripslashes($str_input);\r\n return $str_input;\r\n}",
"function sanitize(){\r\n\t\t $outar = Array();\r\n \t $arg_list = func_get_args();\r\n\t\t foreach($arg_list[0] as $key => $value){\r\n\t\t\t\t $data = $value;\r\n\t\t\t\t $data = PREG_REPLACE(\"/[^0-9a-zA-Z]/i\", '', $data);\r\n\t\t\t\t array_push($outar,$data);\r\n\t\t }\r\n\t\treturn $outar;\r\n\t }",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"private static function sanitize($user) {\n $user['is_owner'] = ($_SESSION['user_id'] == $user['id']) ? 1 : 0;\n\n if (!$user['is_owner']) {\n unset($user['birthday'], $user['email']);\n }\n\n $user['age'] = 0;\n if ($user['birthday'] != '0000-00-00') {\n $today = new DateTime();\n $birthday = new DateTime($user['birthday']);\n $interval = $today->diff($birthday);\n $user['age'] = $interval->y;\n }\n\n unset($user['password'], $user['confirmed'], $user['date_added'], $user['date_updated']);\n return $user;\n }",
"function cleanInput ($input) { // meie e-mail jõuab siia ning salvestatakse inputi sisse\n\n //input = sisestatud e-mail\n\n $input = trim ($input);\n $input = stripslashes ($input); //võtab kaldkriipsud ära\n $input = htmlspecialchars ($input); //\n return $input;\n}",
"function filterUsername($username)\r\n {\r\n return $username;\r\n }",
"function sanitize($input){\n\tglobal $link;\n\t$input = htmlentities(strip_tags(trim($input)));\n\t$input = mysqli_real_escape_string($link, $input);\n\treturn $input;\n}",
"function tidyInputs(){\n\tglobal $nric,$firstName,$lastName,$dob,$address1,$address2,$poCode,\n$homeNum,$handphoneNum,$email,$description;\n\tglobal $faID;\n\t\n\t$nric = preg_replace('/[^a-zA-Z0-9]/','',$nric);\n\t$firstName = preg_replace('/[^a-zA-Z0-9 ]/','',$firstName);\n\t$lastName = preg_replace('/[^a-zA-Z0-9 ]/','',$lastName);\n\t$dob = preg_replace('/[^0-9-]/','',$dob);\n\t$address1 = preg_replace('/[^a-zA-Z0-9 -_.,#]/','',$address1);\n\t$address2 = preg_replace('/[^a-zA-Z0-9 -_.,#]/','',$address2);\n\t$poCode = preg_replace('/[^0-9]/','',$poCode);\n\t$homeNum = preg_replace('/[^0-9]/','',$homeNum);\n\t$handphoneNum = preg_replace('/[^0-9]/','',$handphoneNum);\n\t$email = preg_replace('/[^a-zA-Z0-9@._-]/','',$email);\n\t$description = preg_replace('/[^a-zA-Z0-9 -_.,#]/','',$description);\n\t\n\t$faID = preg_replace('/[^0-9]/','',$faID);\n}",
"function sanitize($input) {\n\t\n\t\t$input = stripslashes($input);\n\t\t$input = htmlspecialchars($input);\n\t\n\t\treturn $input;\n\t}",
"function filterUserInput($data) {\n\n // trim() function will remove whitespace from the beginning and end of string.\n $data = trim($data);\n\n // Strip HTML and PHP tags from a string\n $data = strip_tags($data);\n\n /* The stripslashes() function removes backslashes added by the addslashes() function.\n Tip: This function can be used to clean up data retrieved from a database or from an HTML form.*/\n $data = stripslashes($data);\n\n // htmlspecialchars() function converts special characters to HTML entities. Say '&' (ampersand) becomes '&'\n $data = htmlspecialchars($data);\n return $data;\n\n}",
"public function clean($dirty){\n $cleaned_output=array();\n foreach($dirty as $key=>$value){\n if($key=='password'){\n $cleaned_output[]=$this->conn_str->real_escape_string($this->hash_pword($value));\n }else{\n $clean_me=$this->conn_str->real_escape_string($value);\n $cleaned_output[]=$clean_me; }\n\n }\n return $cleaned_output;\n \n }",
"function getLogInSanitized() {\n $this->sanitizeEmail();\n $this->sanitizePassword();\n return array($this->email, $this->password);\n }",
"function sanitize($val){\n return htmlentities(stripslashes(trim($val)), ENT_QUOTES);\n}",
"function gboutique_validate_options($input) {\r\n\t // strip html from textboxes\r\n\t$input['email'] = wp_filter_nohtml_kses($input['email']); // Sanitize textarea input (strip html tags, and escape characters)\r\n\t$input['pass'] = wp_filter_nohtml_kses($input['pass']); // Sanitize textbox input (strip html tags, and escape characters)\r\n\t$input['spreadsheetKey'] = wp_filter_nohtml_kses($input['spreadsheetKey']);\r\n\t$input['apiKey'] = wp_filter_nohtml_kses($input['apiKey']);\r\n\t$input['emailapiKey'] = wp_filter_nohtml_kses($input['emailapiKey']);\r\n\treturn $input;\r\n}",
"public function sanitize(string $input)\n {\n }",
"function cleanFormPassword($inputText){\r\n\t$inputText =strip_tags($inputText);\r\n\treturn $inputText;\t\r\n}",
"function hash_mysql_sanitize($pdata){\n\t\nif( isset($pdata) ){\n\n\t//make sure that $pdata is cleaned. put this in a header.\n\tforeach( $pdata as $key => $value ){\n\t\t//clean up!\n\t\tmysql_real_escape_string($value);\n\t}\n}\n\nreturn $pdata;\n}",
"public function sanitizeFreeText()\n {\n $this->label = AdapterUtil::reencode($this->label);\n $this->street = AdapterUtil::reencode($this->street);\n $this->locality = AdapterUtil::reencode($this->locality);\n $this->region = AdapterUtil::reencode($this->region);\n $this->country = AdapterUtil::reencode($this->country);\n }",
"function sanitization() {\n genesis_add_option_filter( 'one_zero', GENESIS_SIMPLE_SETTINGS_FIELD,\n array(\n\n ) );\n genesis_add_option_filter( 'no_html', GENESIS_SIMPLE_SETTINGS_FIELD,\n array(\n\n ) );\n }",
"function sanitize($data)\n {\n $data=trim($data);\n $data=mysql_real_escape_string($data);\n return $data;\n }",
"function sanitize($input){\n $input = strip_tags($input);\n $input = htmlspecialchars($input);\n $input = trim($input);\n return $input;\n}",
"function sanitize($input) {\n return htmlspecialchars(strip_tags(trim($input)));\n }",
"public static function sanitize($input){\n\t\t\t\t\n \t\t return $s = preg_replace(\"/[^A-Z0-9a-z\\w ]/u\",\"\", $input);\n\n\t\t}"
] | [
"0.7334878",
"0.72694314",
"0.7015687",
"0.6780342",
"0.67741305",
"0.65667343",
"0.6548187",
"0.64984256",
"0.64599574",
"0.64127386",
"0.6362379",
"0.6307695",
"0.62771213",
"0.6201213",
"0.61948997",
"0.6193069",
"0.61231774",
"0.6120051",
"0.6106813",
"0.60879946",
"0.60879934",
"0.602553",
"0.5994171",
"0.59781265",
"0.5962763",
"0.59536797",
"0.5939548",
"0.5933272",
"0.59188026",
"0.5903176",
"0.58640826",
"0.58531934",
"0.5849132",
"0.5787775",
"0.5781101",
"0.57811004",
"0.57811004",
"0.57811004",
"0.57584864",
"0.5754539",
"0.57481754",
"0.5725137",
"0.5720202",
"0.5718163",
"0.5718089",
"0.571141",
"0.57051384",
"0.5688093",
"0.5687295",
"0.5686615",
"0.5684738",
"0.56798035",
"0.5679214",
"0.5671079",
"0.56662863",
"0.56599593",
"0.5652707",
"0.5633942",
"0.56315196",
"0.56296337",
"0.5628172",
"0.562739",
"0.5604987",
"0.5604487",
"0.56031805",
"0.56023574",
"0.56005865",
"0.5600088",
"0.55890834",
"0.5588491",
"0.5583548",
"0.558183",
"0.5568165",
"0.556766",
"0.5566922",
"0.5563438",
"0.5562569",
"0.5561095",
"0.556044",
"0.556044",
"0.5550433",
"0.5546329",
"0.55444515",
"0.5543651",
"0.5538622",
"0.55350894",
"0.5529201",
"0.55103207",
"0.55035806",
"0.54974097",
"0.54918694",
"0.5485096",
"0.547999",
"0.54799736",
"0.54793537",
"0.54757863",
"0.54729486",
"0.5471571",
"0.54603326",
"0.5454821"
] | 0.55828846 | 71 |
used to verify emails | function isValidEMail ($string)
{
return (preg_match ('/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i', $string) ? 1 : 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [1] post='.json_encode($_POST));\n\t\t# skip this step if the user has already verified their email address\n\t\tif($this->native_session->get('__email_verified') && $this->native_session->get('__email_verified') == 'Y'){\n\t\t\tredirect(base_url().'account/login');\n\t\t}\n\n\t\t# otherwise continue here\n\t\tif(!empty($_POST['emailaddress'])){\n\t\t\t$response = $this->_api->post('account/resend_link', array(\n\t\t\t\t'emailAddress'=>$this->native_session->get('__email_address'),\n\t\t\t\t'baseLink'=>base_url()\n\t\t\t));\n\n\t\t\t$data['msg'] = (!empty($response['result']) && $response['result']=='SUCCESS')?'The verification link has been resent':'ERROR: The verification link could not be resent';\n\t\t}\n\n\t\t$data = load_page_labels('sign_up',$data);\n\t\t$this->load->view('account/verify_email', $data);\n\t}",
"function isEmail($verify_email) {\n\t\n\t\treturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$verify_email));\n\t\n\t}",
"public function check_email() {\n\n\t\t$email = Input::post('email');\n \n\t\tif(is_string($email)) {\n\t\t\t\n\t\t\t$this->_password_reset->_unlocked_me($email);\n\t\t\t$row = $this->_password_reset->_validate_email($email);\n\t\t\t$res = $this->_password_reset->getData($email);\n\t\t\t$_res = $this->_password_reset->_check_if_reg($email);\n\t\t\t$ques = $this->_question->getquestion($res['question_id']);\n\n\t\t\tif($row > 0) {\n\t\t\t\tif($_res > 0) {\n\t\t\t\t\tif($res['status'] != 0) {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::EMAIL_CONFIRM, 'question' => $ques['security_question']);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_arr = array('msg' =>Constant::LOCKED);\n\t\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$_arr = array('msg' =>Constant::NOT_REGISTERED);\n\t\t\t\t\techo json_encode($_arr);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\texit;\n\t\t\t}\n\n\t\t} else {\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\t}",
"function verifica_email ($email)\r\n{\r\n\t$retorno = true;\r\n\r\n\t/* Aqui estaria el codigo para verificar \r\n\tla direccion de correo */\r\n\r\n\treturn $retorno;\r\n}",
"protected function validateEmail($args) {\n\n if ($args['ent_email'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $vmail = new verifyEmail();\n\n if ($vmail->check($args['ent_email'])) {\n return $this->_getStatusMessage(34, $args['ent_email']);\n } else if ($vmail->isValid($args['ent_email'])) {\n return $this->_getStatusMessage(24, $args['ent_email']); //_getStatusMessage($errNo, $test_num);\n//echo 'email valid, but not exist!';\n } else {\n return $this->_getStatusMessage(25, $args['ent_email']); //_getStatusMessage($errNo, $test_num);\n//echo 'email not valid and not exist!';\n }\n }",
"function checkEmail($checkemail) {\r\n if(preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\" , $checkemail))\r\n {\r\n list($username,$domain)=split('@',$checkemail);\r\n \r\n if(!getmxrr ($domain,$mxhosts)) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n return false;\r\n}",
"public function hasVerifiedEmail();",
"public function testEmailVerification(): void {\n\t\t$user = $this->createUser();\n\t\t$newEmail = '[email protected]';\n\t\t$token = $this->createToken($user->id, $newEmail);\n\t\t$response = $this->withHeaders([\n\t\t\t'Accept' => 'application/json',\n\t\t\t'Content-Type' => 'application/json',\n\t\t])->getJson($this->route.'/email/verify/'.$token->token);\n\t\t$response->assertStatus(HttpStatus::STATUS_OK);\n\t\t$response->assertJson([\n\t\t\t'message' => 'Your e-mail has been verified. Proceed to login.'\n\t\t]);\n\t\t$this->assertDatabaseHas('users',[\n\t\t\t'id' => $user->id,\n\t\t\t'email' => $newEmail\n\t\t]);\n\t}",
"public function sendEmailVerificationNotification();",
"function emailOk ($email) {\r\n return filter_var($email, FILTER_VALIDATE_EMAIL);\r\n }",
"public function verifyEmail()\n {\n $this->verified = true;\n\n $this->save();\n\n $this->activationToken->delete();\n }",
"function verifyemail() {\n\t$a = array(\n\t 'status' => 'system-error'\n\t);\n\n\t// raw inputs\n\t$taint_si = isset($_POST['si']) ? $_POST['si'] : 0;\n\t$taint_tic = isset($_POST['tic']) ? $_POST['tic'] : 0;\n\t$taint_pword = isset($_POST['pword']) ? $_POST['pword'] : 0;\n\n\t// validate inputs\n\t$si = validateToken($taint_si);\n\t$tic = validateTic($taint_tic);\n\t$pword = validatePword($taint_pword);\n\n\t// validate parameter set\n\tif (!$si || !$tic || !$pword) {\n\t\tLog::write(LOG_WARNING, 'attempt with invalid parameter set');\n\t\treturn $a;\n\t}\n\n\t// get db connection\n\t$conn = getConnection();\n\tif (!$conn) {\n\t\treturn $a;\n\t}\n\n\t// read token and user table\n\t$result = getUserByToken($conn, $si);\n\tif (!$result) {\n\t\treturn $a;\n\t}\n\n\t// get fields\n\t$row = pg_fetch_array($result, 0, PGSQL_ASSOC);\n\t$userid = $row['id'];\n\t$hashpassword = $row['hashpassword'];\n\t$auth = $row['auth'];\n\t$hashtic = $row['hashtic'];\n\t$oldemail = $row['email'];\n\n\t// verify user authentication state\n\tif (!isUserEmailPending($auth)) {\n\t \tLog::write(LOG_NOTICE, 'attempt to verify email on user not auth=email-pending');\n\t\treturn $a;\n\t}\n\n\t// verify the password\n\t$boo = verifyPassword($pword, $hashpassword);\n\tif (!$boo) {\n\t\tLog::write(LOG_NOTICE, 'attempt with invalid password');\n\t\treturn $a;\n\t}\n\n\t// verify the tic from the email\n\t$boo = verifyTic($tic, $hashtic);\n\tif (!$boo) {\n\t\tLog::write(LOG_NOTICE, 'attempt with invalid tic');\n\t\treturn $a;\n\t}\n\n\t// update user record\n\t$auth = DB::$auth_verified;\n\t$name = 'verify-email';\n\t$sql = \"update accounts.user set email=newemail, newemail='', auth=$1, hashtic=null, tmhashtic=null where id = $2\";\n\t$params = array($auth, $userid);\n\t$result = execSql($conn, $name, $sql, $params, true);\n\tif (!$result) {\n\t\treturn false;\n\t}\n\n\t// send security notice\n\t$boo = sendAuthenticationEmail($oldemail, 'changedemail', '');\n\tif (!$boo) {\n\t\t$a['status'] = 'send-email-failed';\n\t\treturn $a;\n\t}\n\n\t// success\n\t$a['status'] = 'ok';\n\t$a['auth'] = $auth;\n\treturn $a;\n}",
"public function verifyAction()\n {\n $email = Request::post('email', Filter::FILTER_EMAIL, false);\n\n if (!$email || !Validator_Email::validate($email)) {\n Response::jsonError($this->moduleLang->get('email_invalid'));\n }\n\n $model = Model::factory('User');\n\n $userIds = $model->getList(\n ['limit' => 1],\n [\n 'email' => $email,\n 'enabled'=> true\n ],\n ['id']\n );\n\n if (count($userIds) == 0) {\n Response::jsonError($this->moduleLang->get('email_user_unknown'));\n }\n\n $userId = $userIds[0]['id'];\n\n $user = Db_Object::factory('User', $userId);\n $authCode = Utils::hash(uniqid(time(),true));\n\n $confDate = new DateTime('now');\n $confDate = $confDate->add(new DateInterval('P1D'))->format('Y-m-d H:i:s');\n\n try{\n $user->setValues(array(\n 'confirmation_code' => $authCode,\n 'confirmation_expiried' => $confDate\n ));\n if(!$user->save())\n throw new Exception('Cannot update user info');\n }catch (Exception $e){\n Response::jsonError($this->_lang->get('CANT_EXEC'));\n }\n\n $this->sendEmail($user);\n\n Response::jsonSuccess(array(\n 'msg' => $this->moduleLang->get('pwd_success')\n ));\n }",
"function email_ok($email,$new=FALSE){\n if(empty($email)) return FALSE;\n if(!preg_match($this->pat_email,$email)) return FALSE;\n if(!$new) return TRUE;\n foreach($this->domains as $umd)\n if($umd->newemail_ok($email)>0) return FALSE;\n return TRUE;\n }",
"public function filterValidEmailsProvider() {}",
"public function validEmailValidDataProvider() {}",
"public function checkEmail() {\n $result = $this->model->checkEmail($_POST);\n if($result) {\n echo \"true\"; \n } else {\n echo \"false\";\n }\n }",
"public function markEmailAsVerified();",
"public function isEmail();",
"function verify_email($email) // Colorize: green\n { // Colorize: green\n return isset($email) // Colorize: green\n && // Colorize: green\n is_string($email) // Colorize: green\n && // Colorize: green\n filter_var($email, FILTER_VALIDATE_EMAIL); // Colorize: green\n }",
"function validateEmail($TO,$SUBJECT,$BODY,$headers){\r\n\r\n if(!$this->getAccessLevel() > 0) {echo 'false'; return false;}\r\n\r\n //$server = \"http://localhost/dev/pansophy\"; // dev server\r\n $server = \"http://pansophy.wooster.edu\";\r\n $referer = $_SERVER['HTTP_REFERER'];\r\n\t\t\r\n // check if server string is a substring of the referer string\r\n $pos = strpos($referer,$server);\r\n\r\n if($pos === false)\r\n return false;\r\n else if($pos == 0)\r\n return true;\r\n else \r\n return false;\r\n\t}",
"public function check_email() {\n\t\t$email = urldecode($_GET['email']);\n\n\t\t$result = $this->Member_Model->check_email_if_exists($email);\n\n\t\tif ($result > 0) {\n\t\t\techo json_encode(false);\n\t\t} else {\n\t\t\techo json_encode(true);\n\t\t}\n\t}",
"private function verify_email() {\n $array = array();\n $errors = array();\n //Check if email already exists in users table\n try {\n $stmt = $this->conn->prepare(\"SELECT * FROM users WHERE email = :email\");\n\n $stmt->bindParam(':email', $this->email);\n\n $stmt->execute();\n\n $results = array();\n\n while($result = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $results[] = $result;\n }\n\n //check result count, if 0 that means email doesnt exist so user can be registered\n if(count($results) == 0) {\n return $array['status'] = \"Success\";\n }\n\n //if count is not 0 that means the email address already exists so user cannot be registered\n $array['status'] = \"Error\";\n $errors[] = \"-Email address already exists\";\n $array['errors'] = $errors;\n return $array;\n\n } catch(\\Exception $e) {\n $array['status'] = \"Error\";\n $errors[] = \"Server Error\";\n $array['errors'] = $errors;\n return $array;\n }\n\n }",
"private function emailAtLogin() {}",
"function isEmail($email) {\nreturn(preg_match(\"/^[-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)$|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i\",$email));\n}",
"function email_validation($toemail) \n\t{ \n\t\t$param_array = func_get_args();\n\t\t\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD email::email_validation() - PARAMETER LIST : ', $param_array);\n\t\t\t\n\t\tif($_SERVER['REMOTE_ADDR'] != \"127.0.0.1\")\n\t\t{\n\t\t\n\t\tglobal $HTTP_HOST; \n\t\t\n\t\t$result = array(); \n\t\t\n\t\t$result[0]=true; \n\t\t\n\t\t$result[1]=\"$toemail appears to be valid.\"; \n\t\t/* this regular expression is not allowing some of the domain names like .name etc., so we check for one @ symbol and \n\t\tatleast 1 \".\" symbol in email id.\n\t\tif (!eregi(\"^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$\", $toemail)) \n\t\t{ \t\t\n\t\t\t$result[0]=false; \n\t\t\t\n\t\t\t$result[1]=\"$toemail is not properly formatted\"; \n\t\t\t\n\t\t}\n\t\t*/\n\t\t\n\t\t//remove the name from the email\n\t\t\n\t\t$earr = explode(\"<\", $toemail);\n\t\t\n\t\tif(count($earr) == 2 && strlen(trim($earr[1])) > 0)\n\t\t\t$email = substr(trim($earr[1]),0,-1);\n\t\telse\n\t\t\t$email = trim($earr[0]);\n\t\t\n\t\t$eml_arr = explode(\"@\",$email);\n\t\t$result[0]=false; \n\t\t\n\t\t$result[1]=\"$toemail is not properly formatted\"; \n\t\tif(count($eml_arr) == 2 && strlen(trim($eml_arr[0])) > 0 && strlen(trim($eml_arr[1])) > 0)\n\t\t{\n\t\t\t$domain_arr = explode(\".\",$eml_arr[1]);\n\t\t\tif(count($domain_arr) > 1 && strlen(trim($domain_arr[0])) > 0 && strlen(trim($domain_arr[1])) > 0)\n\t\t\t{\n\t\t\t\t$result[0]=true; \n\t\t\t\t$result[1]=\"$toemail appears to be valid.\"; \n\t\t\t}\n\t\t}\n\t\t\n\t\tif(1==2)\n\t\t{//need not check by communicating to email server...\n\t\t\n\t\tlist ( $username, $domain ) = split (\"@\",$toemail); \n\t\t\n\t\tif (getmxrr($domain, $MXHost)) \n\t\t{\t\t\n\t\t\t$connectaddress = $MXHost[0];\n\t\t}\n\t\telse \n\t\t{\t\t\n\t\t\t$connectaddress = $domain;\n\t\t} \n\t\t//echo \"Connect address : \" . $connectaddress . \"<br>\";\n\t\t//echo \"Domain Name : \" . $domain . \"<br>\";\n\t\t$connect = fsockopen ( $connectaddress, 25 ); \n\t\t\n\t\tif ($connect) \n\t\t{\t\t\n\t\t\tif (ereg(\"^220\", $Out = fgets($connect, 1024))) \n\t\t\t{ \n\t\t\t\n\t\t\t fputs ($connect, \"HELO $HTTP_HOST\\r\\n\"); \n\t\t\t \n\t\t\t $out = fgets ( $connect, 1024 ); \n\t\t\t \n\t\t\t $this->from_email = $GLOBALS['site_config']['admin_email'];\n\t\t\t \n\t\t\t $from = $this->from_email;\n\t\t\t \n\t\t\t fputs ($connect, \"MAIL FROM: <{$from}>\\r\\n\"); \n\t\t\t \n\t\t\t $from = fgets ( $connect, 1024 ); \n\t\t\t \n\t\t\t fputs ($connect, \"RCPT TO: <{$toemail}>\\r\\n\"); \n\t\t\t \n\t\t\t $to = fgets ($connect, 1024); \n\t\t\t \n\t\t\t fputs ($connect, \"QUIT\\r\\n\"); \n\t\t\t \n\t\t\t fclose($connect); \n\t\t\t \n\t\t\t if (!ereg (\"^250\", $from) || !ereg ( \"^250\", $to )) \n\t\t\t { \n\t\t\t \n\t\t\t\t $result[0]=false; \n\t\t\t\t \n\t\t\t\t $result[1]=\"Server rejected address\"; \n\t\t\t\t \n\t\t\t\t} \n\t\t\t} \n\t\t\t\n\t\t\telse\n\t\t\t{\t\t\t\t\n\t\t\t\t$result[0] = false; \n\t\t\t\t\n\t\t\t\t$result[1] = \"No response from server\"; \n\t\t\t\t\n\t\t\t } \n\t\t\t \n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$result[0]=false; \n\t\t\t\n\t\t\t$result[1]=\"Can not connect E-Mail server.\"; \n\t\t\t\n\t\t\t//return $result; \n\t\t} \n\t\t\n\t\t}\n\t\t\n\t\tif(!$result[0])\n\t\t{\n\n\t\t\t$ttext = \"\";\n\t\t\t$ttext .= \"<table border=0 cellpadding=3 cellspacing=1 align=center width=90%>\";\n\t\t\t$ttext .= \"<tr align=left><td><strong>Error Message</strong></td><td>\" . $result[1] . \" (\" . $toemail . \")\" . \"</td></tr>\";\n\t\t\t$ttext .= \"</table>\";\n\n\t\t\t$GLOBALS['logger_obj']->error('<br>METHOD email::email_validation() - Return Value : ', $ttext,'email');\n\n\t\t}\n\t}\n\t\t$GLOBALS['logger_obj']->debug('<br>METHOD email::email_validation() - Return Value : ', $result);\n\t\treturn $result; \n\t\t\n\t}",
"function checkEmail(){\n\t\t$json\t= ceHelper::checkEmail(JRequest::getVar('email'));\n\t\t$this->jsonReturn($json);\n\t}",
"public function verifyEmail()\n {\n return $this->getBoolean('verify_email');\n }",
"public function testMyGmailAddressIsEvaluatedAsTrue()\n {\n $this->assertTrue(EmailValidator::validate(\"[email protected]\"));\n }",
"function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t$this->layout = \"\";\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}",
"function register_resend_email($email) {\n\t\tglobal $pdo;\n\n\t\t//delete old registration attempts\n\t\t$pdo->query(\"DELETE FROM user WHERE verified = 0 AND TIME_TO_SEC(TIMEDIFF(CURRENT_TIMESTAMP, code_generation_time)) > 600\");\n\n\t\t//empty or array check\n\t\tif(empty($email) || is_array($email)) {\n\t\t\treturn 1;\n\t\t}\n\n\t\t//check if email exists and is not verified\n\t\t$sql = \"SELECT name, verification_code FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\") AND verified = 0\";\n\t\t$sth = $pdo->prepare($sql);\n\t\t$sth->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t$sth->execute();\n\n\t\tif($sth->rowCount() == 0) {\n\t\t\t//check if email exists but is already verified\n\t\t\t$sql = \"SELECT id FROM user WHERE REPLACE(email, \\\".\\\", \\\"\\\") = REPLACE(:email, \\\".\\\", \\\"\\\") AND verified = 1\";\n\t\t\t$sth2 = $pdo->prepare($sql);\n\t\t\t$sth2->bindValue(\":email\", mail_simplify($email), PDO::PARAM_STR);\n\t\t\t$sth2->execute();\n\n\t\t\tif($sth2->rowCount() == 0) {\n\t\t\t\treturn 2;\n\t\t\t} else {\n\t\t\t\treturn 3;\n\t\t\t}\n\t\t}\n\n\t\t//get data required for email\n\t\t$name_verification_code = $sth->fetch();\n\t\t$name = $name_verification_code[\"name\"];\n\t\t$verification_code = $name_verification_code[\"verification_code\"];\n\n\t\t$reg_link = \"https://swapitg.com/firstlogin/$verification_code\";\n\t\t$subject = \"Registration\";\n\t\t$mailfile = fopen(__DIR__ . \"/register_mail_template.html\", \"r\") or die(\"Unable to open file!\");\n\t\t$message = strtr(fread($mailfile, filesize(__DIR__ . \"/register_mail_template.html\")), array('$reg_link' => $reg_link, '$name' => htmlspecialchars($name)));\n\t\tfclose($mailfile);\n\t\t$sender_email = \"[email protected]\";\n\t\t$sender_name = \"SwapitG no-reply\";\n\n\t\t//send email\n\t\tif(mail($email, $subject, wordwrap($message, 70, \"\\r\\n\"), \"From: $sender_name<$sender_email>\\r\\nContent-type: text/html; charset=utf-8\", \" -f \" . $sender_email)) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn 4;\n\t\t}\n\t}",
"public function verify();",
"public function _check_email_exists($email = ''){\n\t\t\n\t}",
"public function check_email($f3)\r\n {\r\n // query params should be\r\n // 'email'\r\n\r\n $this->uri = $this->endpoint . \"/email/check\";\r\n $this->uri .= \"?\" . $f3->get('QUERY') . \"&package_id=\" . $f3->get(\"SESSION.{$this->session_ident}.package_id\");\r\n\r\n $this->request();\r\n $this->process();\r\n }",
"function verifyEmail($submittedEmail) {\n if (!findAdminEmailMatch($submittedEmail) && !findMemberEmailMatch($submittedEmail)) {\n return TRUE;\n }\n else {\n return FALSE;\n }\n }",
"private function verificarEmail(){\n\t \n\t \t\t//Verifica se a requisição é via AJAX\n\t \t\tif(HelperFactory::getInstance()->isAjax()){\n\t \t\t\n\t \t\t\t //Solicita a verificação do E-mail\n\t\t\t\t $this->Delegator('ConcreteCadastro', 'verificarEmail',$this->getPost());\t \t\t\t \n\t \t\t}\t \n\t }",
"function verifyEmail($action = ''){\n\t\t//$url = ROOT_URI_UI.'validUser.php?k='.$this->secretKey($this->username).'&e='.$this->username;\n\n\t\t$url = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?k='.$this->secretKey($this->username).'&e='.$this->username;\n\t\t\n\t\tif('recover' == $action){\n\t\t\t$msg = DICO_WORD_PASSWORD_RESTORE;\n\t\t}else{\n\t\t\t$msg = DICO_WORD_CONFIRM_EMAIL;\n\t\t}\n\t\t\n\t\t$body_message = DICO_MAIL_VALID_HEAD.'<br>'\n\t\t\t\t\t\t.'<a href=\"'.$url.'\">'.$msg.'</a><br><br>'\n\t\t\t\t\t\t.$url.'<br>'\n\t\t\t\t\t\t.DICO_MAIL_VALID_FOOT;\n\n\t\t\n\t\treturn send_mail(ROOT_EMAIL, $this->username, '', ROOT_EMAIL_NAME.' '.DICO_WORD_AUTH,$body_message);\n\t}",
"function checkemail() {\n\t\tConfigure::write('debug', 0);\n\t\t$this->autoRender = false;\n\t\t\n\t\t$email = $_REQUEST['data']['Member']['email'];\n\t\t\n\t\t$count = $this->Member->find('count', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\t/*echo $count;\n\t\tdie;*/\n\t\tif ($count > 0) {\n\t\t\techo \"false\";\n\t\t} else {\n\t\t\techo \"true\";\n\t\t}\n\t}",
"private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }",
"public static function sendVerificationMail($email){\n $userId = $email;\n $url = $GLOBALS['server_url'] . $GLOBALS['user_dir'] . $GLOBALS['prj_dir'].\"/controller/verify_mail.php\";\n\n /**\n * Mailer script provided by the school\n * - We just added the $email, $url variables from our site\n */\n // create a new cURL resource\n $ch = curl_init();\n // set URL and other appropriate options\n $id = md5(uniqid(rand(), 1));\n\n $areWeStored = self::storeVerificationMailToDb($userId, $id);\n\n if($areWeStored == true) {\n curl_setopt($ch, CURLOPT_URL, \"http://kark.uit.no/internett/php/mailer/mailer.php?address=\" . $email . \"&url=\" . $url . \"?id=\" . $id);\n //curl_setopt($ch, CURLOPT_URL, \"http://www.dagbladet.no/\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // grab URL and pass it to the browser\n $output = curl_exec($ch);\n /**\n * Mailer script provided by the school ends here\n */\n return true;\n }\n else{\n return false;\n }\n }",
"function verifyEmail_post(){\n\n\t\t$this->load->library('form_validation');\n\t\t$this->form_validation->set_rules('email',lang('email_placeholder'),'required|valid_email');\n\n\t\tif($this->form_validation->run() == FALSE){\n\n\t\t\t$responseArray = array('status'=>FAIL,'message'=>strip_tags(validation_errors()));\n\t\t\t$response = $this->generate_response($responseArray);\n\t\t\t$this->response($response);\n\n\t\t} else {\n\n\t\t\t$conform = (rand(10, 99)).(rand(11, 99));\n\n\t\t\t$data_val['email']\t\t=\t$this->post('email');\n\t\t\t$data_val['code']\t\t=\t$conform;\n\t\t\t\n\t\t\t$existContact = $this->common_model->get_records_by_id(USERS,true,array('email'=>$data_val['email'],'emailVerified'=>'1'),\"*\",\"\",\"\");\n\t\t\t\n\t\t\tif(empty($existContact)){\n\n\t\t\t\t$isVerify = $this->service_model->verifyEmail($data_val);\n\n\t\t\t\tif(is_array($isVerify)){\n\n\t\t\t\t\tswitch ($isVerify['status']) {\n\n\t\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t\t$responseArray = array('status'=>SUCCESS,'message'=>ResponseMessages::getStatusCodeMessage(124),'code'=>$isVerify['code'],'email'=>$isVerify['email']);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t\t$responseArray = array('status'=>FAIL,'message'=>$isVerify['error']);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$responseArray = array('status'=>FAIL,'message'=>ResponseMessages::getStatusCodeMessage(118));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$responseArray = array('status'=>FAIL,'message'=>ResponseMessages::getStatusCodeMessage(117));\n\t\t\t}\n\t\t\t$response = $this->generate_response($responseArray);\n\t\t\t$this->response($response);\t\n\t\t}\n\n\t}",
"function checkEmail()\n {\n\t\t\t$email = $_POST['email'];\n\n\t\t\t// Check its existence (for example, execute a query from the database) ...\n\t\t\t$email_cek = $this->account_model->Check_TblUsers('email',$email);\n\t\t\t\n\t\t\tif($email_cek == 0)\n\t\t\t{\n\t\t\t\t$isAvailable = true;\n\t\t\t}else{\n\t\t\t\t$isAvailable = False;\n\t\t\t} \n\n\t\t\t// Finally, return a JSON\n\t\t\techo json_encode(array(\n\t\t\t\t'valid' => $isAvailable,\n\t\t\t));\n\t\t}",
"public function verifyContainsEmail(): bool\n {\n $words = explode(' ', $this->input);\n foreach ($words as $word) {\n if (static::isValidEmail($word)) {\n return true;\n }\n }\n \n return false;\n }",
"public function verify(){\n\t\t// getting the username and code from url\n\t\t$code=$_GET['c'];\n\t\t$user=$_GET['u'];\n\t\t// load the regmod model\n\t\t$this->load->model('regmod');\n\t\t// calling the function Vemail that check the valodation code with the username\n\t\t$flag=$this->regmod->Vemail($user,$code);\n\t\t// checking the Vemail the respond\n\t\tif($flag)\n\t\t\t{$data['res']= \"You have successfully verified your email. You may login to Hungry.lk with your username and password\";}\n\t\telse\n\t\t\t{$data['res']= \"Opps An error occurred in our system, try again later\";}\n\t\t$this->load->view(\"register_status_view\",$data);\n\t}",
"private function emailValidation($field) {\t\r\n\t \t\t$sent = $this->getSentData($field);\r\n\t \t\t\r\n\t \t\t$email_pattern = '/^[^@\\s<&>]+@([-a-z0-9]+\\.)+[a-z]{2,}$/i';\r\n\t\t\tif (preg_match($email_pattern, $sent)) \r\n \t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\t \t}",
"public function checkEmailAction() {\n\t\t\n\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\tif ($request->isPost()) {\n\t\t\t// get the json raw data\n\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t$http_raw_post_data = '';\n\t\t\t\n\t\t\twhile (!feof($handle)) {\n\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t}\n\t\t\tfclose($handle); \n\t\t\t\n\t\t\t// convert it to a php array\n\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\t\n\t\t\t$isFreeEmail = Application_Model_User::checkEmail($json_data);\n\t\t\t\n\t\t\tif($isFreeEmail) {\n\t\t\t\t// continue\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// email exists already\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}\n\t}",
"public function checkEmail(){\n\t\t\t$user = new User;\n\t\t\t$doubleCount = $user->where('login','=', Input::get('new_user_email'))->count();\n\t\t\t\n\t\t\tif($doubleCount > 0){\n\t\t\t\t$result = array(\n\t\t\t\t\t'cmd'=>1,\n\t\t\t\t\t'msg'=>trans('alerts.exist_email')\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$result = array(\n\t\t\t\t\t'cmd'=>0,\n\t\t\t\t\t'msg'=>'good email'\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\treturn Response::json($result);\n\t\t}",
"private function validateEmail($addr) {\n // Set result to false (guilty until proven innocent)\n $this->log->write('[Form] Email - validation begun');\n $result = FALSE;\n\n $boolDebug = FALSE;\n\n // Part 1: Consult isemail.info via curl\n // 0 = invalid format\n // 1 = valid format\n\n /*\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"http://isemail.info/valid/\".$addr);\n // curl_setopt($ch, CURLOPT_URL, \"http://www.asdasdljaskdhf.org/\".$addr);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $out = curl_exec($ch);\n $log->write(\"FORM: Email - check result: \".$out);\n curl_close($ch);\n */\n\n // This uses a local copy of is_email() to verify emails, rather than the remote service\n $out = is_email($addr);\n\n // Part 2: DNS lookup (provided first part passed)\n if($out==1) {\n $this->log->write('[Form] Email validation 1 of 2');\n // isolate the domain (\"remote part\")\n // adapted from http://www.linuxjournal.com/article/9585?page=0,3\n $domain = substr($addr,strrpos($addr, \"@\")+1);\n\n // If domain checks out, set result to true\n if (checkdnsrr($domain,\"MX\") || checkdnsrr($domain,\"A\")) {\n\n $this->log->write('[Form] Email validation 2 of 2');\n\n $result = TRUE;\n\n // A planned third component is to contact the MX server in the email address and \n // confirm that the address is valid. Not all servers will respond, but some will\n\n } else {\n\n $this->log->write('[FORM] Email validation failed step 2');\n\n }\n\n } else {\n $this->log->write('[FORM] Email validation failed step 1');\n }\n\n // Part 3: coming (either here or inside previous block)\n\n return $result;\n}",
"public function testEmailValidation() {\n $this->visit('http://londonce.lan/login')\n ->submitForm('Login', ['log' => 'dfdfdfd', 'password' => '11'])\n ->see('Your Username or Password has not been recognised. Please try again.');\n }",
"function my_email_check_function($id, $email)\n{\n # ...do some meaningful check here...\n return true;\n}",
"public function testRegistrationEmailWrongFormat(): void { }",
"public function check_verify_get($email){\n\t\tif(!empty($email)){\n\t\t\t$q = $this->db->where('email',$email)->where('verified',1)->get('users')->result();\n\t\t\tif(count($q)>0){\n\t\t\t\t$this->response(['Verified.'], REST_Controller::HTTP_OK);\n\t\t\t}else{\n\t\t\t\t$this->response(['Not Verified.'], '500');\n\t\t\t}\n\t\t}else{\n\t\t\t$this->response(['Too few arguments'], '500');\n\t\t}\n\t}",
"public function verify_email($email){\n $query = $this->db->where('01_email', $email)\n ->get('register_01');\n if(sizeof($query->result_array())>0){\n return true;\n }\n else{\n return false;\n }\n }",
"public function checkEmailAvailability()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(true);\n }\n else\n {\n echo json_encode(false);\n }\n }",
"public function testLoginEmailNotVerified(): void { }",
"public function testVerification()\n {\n Notification::fake();\n\n $this->user->email_verified_at = null;\n\n $this->user->save();\n\n $this->user->notify(new VerifyEmail);\n\n // $request = $this->post('/email/resend');\n //\n // $request->assertSuccessful();\n\n Notification::assertTimesSent(1, VerifyEmail::class);\n\n Notification::assertSentTo($this->user,VerifyEmail::class);\n }",
"public function verifyEmailAction()\n {\n $userId = $this->params()->fromRoute('userId', null);\n $token = $this->params()->fromRoute('token', null);\n\n if ($userId === null || $token === null) {\n return $this->notFoundAction();\n }\n\n $user = $this->getUserMapper()->findById($userId);\n\n if (!$user) {\n return $this->notFoundAction();\n }\n\n if ($this->userRegistrationService->verifyEmail($user, $token)) {\n // email verified\n return $this->redirectToPostVerificationRoute();\n }\n\n // email not verified, probably invalid token\n $vm = new ViewModel();\n $vm->setTemplate('ht-user-registration/user-registration/verify-email-error.phtml');\n\n return $vm;\n\n }",
"function check_email()\n\t{\n\t\tif($this->user_model->check_email($_POST['email'])>0)\n\t\t\techo json_encode(false);\n\t\telse\n\t\t\techo json_encode(true);\n\t}",
"public function hasEmail(): bool;",
"function check_email ($email) {\n\t\n if (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim ($email))) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n}",
"function verify_email()\n\t{\n\t\t\n\t\tif($this->uri->segment(3))\n\t\t{\n\t\t\t$verification_key = $this->uri->segment(3);\n\t\t\t\n\t\t\tif($this->register_model->verify_email($verification_key))\n\t\t\t{\n\t\t\t\t$data['message'] = '<h1 align=\"center\"> Thank you for verifying your email address. Click <a href=\"'.base_url().'login\">here</a> to login.</h1>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['message'] = '<h1 align=\"center\"> This link is invalid.</h1>';\n\t\t\t}\n\t\t\t$this->load->view('template/header');\n\t\t\t$this->load->view('email_verification', $data);\n\t\t\t$this->load->view('template/footer');\n\t\t}\n\n\t}",
"function check_email ($email)\n{\n return (preg_match ('/^[-!#$%&\\'*+\\\\.\\/0-9=?A-Z^_{|}~]+' . '@' . '([-0-9A-Z]+\\.)+' . '([0-9A-Z]){2,4}$/i', trim($email)));\n}",
"function validate_email($email, $check_domain = \\true)\n {\n }",
"public function email_exists_check ( $email )\n\t{\n\t\t//-----------------------------------------\n\t\t// Get product ID and code from Registry\n\t\t//-----------------------------------------\n\n\t\t$converge = $this->Registry->Cache->cache__do_get( \"converge\" );\n\n\t\tif ( ! $converge['converge_api_code'] )\n\t\t{\n\t\t\t$this->return_code = 'WRONG_AUTH';\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t//--------------------------------\n\t\t// Auth against converge...\n\t\t//--------------------------------\n\n\t\tif ( ! is_object( $this->api_server ) )\n\t\t{\n\t\t\trequire_once( PATH_SOURCES . \"api_server.php\" );\n\t\t\t$this->api_server = new API_Server();\n\t\t}\n\n\t\t$request = array(\n\t\t\t\t'auth_key' => $converge['converge_api_code'],\n\t\t\t\t'product_id' => $converge['converge_product_id'],\n\t\t\t\t'email_address' => $email,\n\t\t\t);\n\n\t\t$url = $converge['converge_url'] . '/converge_master/converge_server.php';\n\n\t\t//------------------\n\t\t// Send request\n\t\t//------------------\n\n\t\t$this->api_server->auth_user = $converge['converge_http_user'];\n\t\t$this->api_server->auth_pass = $converge['converge_http_pass'];\n\n\t\t$this->api_server->api_send_request( $url, 'convergeCheckEmail', $request );\n\n\t\t//----------------------\n\t\t// Handle errors...\n\t\t//----------------------\n\n\t\tif ( count( $this->api_server->errors ) )\n\t\t{\n\t\t\t$this->return_code = 'WRONG_AUTH';\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$this->return_code = $this->api_server->params['response'];\n\t\treturn TRUE;\n\t}",
"public function do_verify_email( $email ) {\r\n\r\n\t\tset_error_handler( array( $this, 'ses_error_handler' ) ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_set_error_handler\r\n\r\n\t\t$response = $this->get_client()->verifyEmailAddress( $email );\r\n\r\n\t\tif (\r\n\t\t\tis_array( $response ) &&\r\n\t\t\tisset( $response['RequestId'] )\r\n\t\t) {\r\n\t\t\tDebug::clear();\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public function verifyEmailAddress($request)\n {\n return $this->startAnonymous()->uri(\"/api/user/verify-email\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }",
"function checkmail($youremail)\n{\n if (ereg('^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.'.\n '[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$', $youremail)) \n {\n\t return true;\n } \n else \n {\n\t return false;\n }\n}",
"function checkmail($youremail)\n{\n if (ereg('^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.'.\n '[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$', $youremail))\n {\n\t return true;\n }\n else\n {\n\t return false;\n }\n}",
"function verify_authcode_email($authcode)\n\t{\n\t\t$user_id=$email=$code_type=$user_type=0;\n\t\tif($this->_redis)\n\t\t{\n\t\t\t$data=$this->cache->get($authcode);\t\n\t\t\tif(!empty($data))\n\t\t\t{\n\t\t\t\t$data=json_decode($data);\n\t\t\t\t$user_id=$data->user_id;\n\t\t\t\t$email=$data->email;\n\t\t\t\t$code_type=$data->code_type;\n\t\t\t\t$user_type=$data->user_type;\t\n\t\t\t\t$this->cache->delete($authcode);\n\t\t\t\t$errorcode=true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$errorcode=false;\n\t\t\t\tlog_message('error_tizi','17052:email verify code failed',array('authcode'=>$authcode));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n \t$this->db->select(\"id,user_id,email,code_type,user_type,generate_time\");\n \t$this->db->from($this->_table);\n \t $this->db->where(\"authcode\",$authcode);\n \t$this->db->where(\"has_verified\",0);\n\t\t\t$this->db->where(\"type\",Constant::VERIFY_TYPE_EMAIL);\n \t$query=$this->db->get();\n \t$total=$query->num_rows();\n \t$gen_time=$query->row()->generate_time;\n\t\t\tif($total==1&&date(\"Y-m-d H:i:s\",strtotime($gen_time.\" + \".Constant::AUTHCODE_EXPIRE_EMAIL))>date(\"Y-m-d H:i:s\"))\n \t{\n \t$id=$query->row()->id;\n \t$user_id=$query->row()->user_id;\n \t$email=$query->row()->email;\n\t\t\t\t$code_type=$query->row()->code_type;\n\t\t\t\t$user_type=$query->row()->user_type;\n \t$this->db->where('id',$id);\n \t$this->db->update($this->_table,array('has_verified'=>1,'verified_time'=>date(\"Y-m-d H:i:s\")));\n \tif($this->db->affected_rows()==1) $errorcode=true;\n\t\t\t\telse $errorcode=false;\n \t}\n \telse\n \t{\n \t\t$errorcode=false;\n \t}\n\t\t}\n return array('user_id'=>$user_id,'email'=>$email,'code_type'=>$code_type,'user_type'=>$user_type,'errorcode'=>$errorcode);\n\t}",
"function verifyEmail ($testString)\n\t{\n return (preg_match(\"/^([[:alnum:]]|_|\\.|-)+@([[:alnum:]]|\\.|-)+(\\.)([a-z]{2,4})$/\", $testString));\n }",
"public function validate_email()\n\t{\n\t\t$user = JFactory::getUser();\n\t\t$config = OSMembershipHelper::getConfig();\n\t\t$email = $this->input->get('fieldValue', '', 'string');\n\t\t$validateId = $this->input->getString('fieldId');\n\t\t$arrayToJs = array();\n\t\t$arrayToJs[0] = $validateId;\n\t\t$arrayToJs[1] = true;\n\n\t\tif ($this->app->isSite() && $config->registration_integration && !$user->id)\n\t\t{\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('COUNT(*)')\n\t\t\t\t->from('#__users')\n\t\t\t\t->where('email = ' . $db->quote($email));\n\t\t\t$db->setQuery($query);\n\t\t\t$total = $db->loadResult();\n\n\t\t\tif ($total)\n\t\t\t{\n\t\t\t\t$arrayToJs[1] = false;\n\t\t\t}\n\t\t}\n\n\t\techo json_encode($arrayToJs);\n\n\t\t$this->app->close();\n\t}",
"function check_email($str){\n\t\t$this->db->where('user_email',$str);\n\t\t$rs\t=\t$this->db->get('reseller_store');\t\n\t\t$is_email_exits\t=\t$rs->num_rows();\n\t\tif($is_email_exits>0){\n\t\t\t$user_email_exits_msg\t=\tRegisterMessages(1);\n\t\t\t$this->form_validation->set_message('check_email', $user_email_exits_msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn true;\n\t}",
"public function CheckEmail($email, $userId);",
"public function validateEmailAction()\n {\n $is_valid = ! User::emailExists($_GET['email'], $_GET['ignore_id']);\n\n header('Content-Type: application/json');\n echo json_encode($is_valid);\n }",
"public function send_verification_email($email_addr,$username)\n {\n //build config array using premade gmail account\n $config= array(\n 'protocol'=>'smtp',\n 'smtp_host'=>'ssl://smtp.googlemail.com',\n 'smtp_port'=>465,\n 'smtp_user'=>'HIDDEN',\n 'smtp_pass'=>'HIDDEN',\n 'charset' => 'iso-8859-1',\n 'mailtype' => 'html',\n\n );\n\n $this->CI->load->library('email',$config);\n $this->email->CI =& $this;\n\n $this->CI->email->set_newline(\"\\r\\n\");\n\n if(!$code=$this->CI->user_model->read_code($username))\n {\n return FALSE; // if verification code from db cannot be read return false\n }\n\n //build email template and send code as a-link\n $verify_link=\"<a href=\".site_url().'users/validate_user/'.$code.\">Click Here to Validate Account<a/>\";\n $this->CI->email->from('HIDDEN', 'RH FILES');\n $this->CI->email->to($email_addr);\n $this->CI->email->subject('Account Validation');\n $this->CI->email->message('Thanks for taking the time to create an account. \n Please follow the link to validate your account: '.$verify_link);\n \n return $this->CI->email->send();\n }",
"function isValidEmail($email, &$acountInfo)\n {\n $retval = true;\n $acountInfo = modApiFunc(\"Users\", \"getAcountInfoByEmail\", $email);\n if (sizeof($acountInfo)==0)\n {\n $retval=false;\n }\n return $retval;\n }",
"public function validEmailInvalidDataProvider() {}",
"public function testVerifyAllowedEmailAddressGet()\n {\n }",
"function is_valid_email($mail) {\r\t// simple: \t\"/^[-_a-z0-9]+(\\.[-_a-z0-9]+)*@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.[a-z]{2,6}$/i\"\r\t$r = 0;\r\tif($mail) {\r\t\t$p =\t\"/^[-_a-z0-9]+(\\.[-_a-z0-9]+)*@[-a-z0-9]+(\\.[-a-z0-9]+)*\\.(\";\r\t\t// TLD (01-30-2004)\r\t\t$p .=\t\"com|edu|gov|int|mil|net|org|aero|biz|coop|info|museum|name|pro|arpa\";\r\t\t// ccTLD (01-30-2004)\r\t\t$p .=\t\"ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|\";\r\t\t$p .=\t\"be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|\";\r\t\t$p .=\t\"cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|\";\r\t\t$p .=\t\"ec|ee|eg|eh|er|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|\";\r\t\t$p .=\t\"gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|\";\r\t\t$p .=\t\"im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|\";\r\t\t$p .=\t\"ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|\";\r\t\t$p .=\t\"mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|\";\r\t\t$p .=\t\"nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|\";\r\t\t$p .=\t\"py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|\";\r\t\t$p .=\t\"sr|st|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|\";\r\t\t$p .=\t\"tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|\";\r\t\t$p .=\t\"za|zm|zw\";\r\t\t$p .=\t\")$/i\";\r\r\t\t$r = preg_match($p, $mail) ? 1 : 0;\r\t}\r\treturn $r;\r}",
"function checkbemail_post(){\n \n $parameter = array('bemail' => $this->post('bemail') , 'bseq' => '', 'act_mode' => 'emailcheck');\n $data = $this->supper_admin->call_procedureRow('proc_checkbemail', $parameter);\n if(!empty($data)){\n $data = $this->send_json($data); \n $this->response($data, 200); // 200 being the HTTP response code\n }\n else{\n $this->response(array('error' => 'User could not be found'), 404);\n }\n\n }",
"function EmailValidation($email)\n{ \n $email = htmlspecialchars(stripslashes(strip_tags($email)));\n if(preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\",$email))\n {\n /*$domain = explode('@', $email);\n $domain = $domain[1];\n if(!checkdnsrr($domain,'MX'))\n {\n //return false;\n return true;\n }*/\n return true;\n }\n else\n {\n return false;\n }\n}",
"public function requestVerificationEmail()\n {\n if (!$this->request->is('post')) {\n $this->_respondWithMethodNotAllowed();\n return;\n }\n\n $user = $this->Guardian->user();\n if (!$user->verified) {\n $this->Users->Tokens->expireTokens($user->id, TokensTable::TYPE_VERIFY_EMAIL);\n $token = $this->Users->Tokens->create($user, TokensTable::TYPE_VERIFY_EMAIL, 'P2D');\n try {\n $this->getMailer('User')->send('verify', [$user, $token->token]);\n $this->set('message', __('Please check your inbox.'));\n } catch (\\Exception $e) {\n $this->_respondWithBadRequest();\n $this->set('message', 'Mailer not configured.');\n }\n } else {\n $this->set('message', __('Your email address is already verified.'));\n }\n\n $this->set('_serialize', ['message']);\n }",
"public function email_verify() {\n $return = array();\n $email = $this->input->post('email');\n $user = new User();\n $user->where(\"email\", $email)->get();\n $return = ($user->exists()) ? FALSE : TRUE;\n echo json_encode($return);\n }",
"public function validateEmailAction(){\n\t\t \n\t\t $isValid = ! User::emailExists($_GET['email'], $_GET['ignore_id'] ?? null);\n\t\t \n\t\t header('Content-Type: application/json');\n\t\t echo json_encode($isValid);\n\t }",
"public function check_email($email){\n $query = $this->db->select('01_email')\n ->where('01_email', $email)\n ->get('register_01');\n if($query->num_rows()>0){\n return 0;\n }else{\n $query = $this->db->where('is_sms', 1)\n ->where('number', $email)\n ->get('verify_otp_12');\n if($query->num_rows()>0){\n return 'sent';\n }else{\n $query = $this->db->where('number', $email)\n ->delete('verify_otp_12');\n $otp = rand(10000, 1000000);\n $data = array(\n 'number' => $email,\n 'otp' => $otp,\n );\n $query = $this->db->insert('verify_otp_12', $data);\n return true;\n }\n }\n }",
"function useremail_check($str) {\r\n $res = $this->auth_model->is_email_exists($str);\r\n if ($res <= 0) {\r\n $this->form_validation->set_message('useremail_check', lang_key('email_not_matched'));\r\n return FALSE;\r\n } else {\r\n return TRUE;\r\n }\r\n }",
"public function emailEntryIsValid() {\r\n \r\n $email = $this->getEmail();\r\n \r\n if ( empty($email) ) {\r\n $this->errors[\"email\"] = \"Email is missing.\";\r\n } else if ( !Validator::emailIsValid($this->getEmail()) ) {\r\n $this->errors[\"email\"] = \"Email is not valid.\"; \r\n }\r\n \r\n return ( empty($this->errors[\"email\"]) ? true : false ) ;\r\n }",
"public function verifyMail(Request $request)\n\t{\n\t\t$data= Input::get('data',false);\n\t\t$emailVerify = new functions();\n\t\tif($emailVerify->verification($data))\n\t\t{\n\t\t\treturn view('emailverified');\n\t\t}\n\t\t{\n\t\t\t return redirect()->to('/')->withErrors(['Verification Failed', 'Please retry']);\n\t\t}\n\t}",
"function checkNUVEmail($email) {\n\t\t$regEX = \"/([a-zA-Z0-9_]+)([\\.{1}_])?([a-zA-Z0-9_]+)\\@nuv([\\.])ac([\\.])in/\";\n\t\tif (preg_match($regEX, $email)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t\texit();\t\n\t\t}\n\t}",
"public function checkemail() {\n\n if (env(\"NEW_ACCOUNTS\") == \"Disabled\" && env(\"GUEST_SIGNING\") == \"Disabled\") {\n\n $account = Database::table(\"users\")->where(\"email\", input(\"email\"))->first();\n if (!empty($account)){\n response()->json(array(\"exists\" => true));\n }else{\n response()->json(array(\"exists\" => false));\n }\n\n }\n\n }",
"public function validate_email($email){\n $pattern = '/^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD';\n if(preg_match($pattern, $email)){\n return true;\n }\n else{\n return false;\n }\n }",
"private function checkEmail(){\n\n $request = $this->_connexion->prepare(\"SELECT COUNT(*) AS num FROM Users WHERE user_email=?\");\n $request->execute(array($this->_userEmail));\n $numberOfRows = $request->fetch();\n\n if($numberOfRows['num'] == 0)\n return false;\n else\n return true;\n\n }",
"function validate_forgotpass_user_email($str){\n\t\t$sql\t=\t\"select * from reseller_store where user_email='$str' \";\n\t\t$tempInfo\t=\t$this->db->query($sql)->row_array();\t\t\n\t\tif(count($tempInfo) == 0){\n\t\t\t$this->form_validation->set_message('validate_forgotpass_user_email', LoginMessages(7));\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}",
"function email_is_valid($email) {\r\n return preg_match('/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,4}$/i',$email);\r\n }",
"public function email_check($str) {\n //if(!empty($str) && $this->get_by(\"email\", $str))\n // return FALSE;\n return TRUE;\n }",
"public function testRegistrationEmailAlreadyInUse(): void { }",
"function validaremail($email){ \n if (!ereg(\"^([a-zA-Z0-9._]+)@([a-zA-Z0-9.-]+).([a-zA-Z]{2,4})$\",$email)){ \n return FALSE; \n } else { \n return TRUE; \n } \n}",
"function mail_un_routine($conn, $email, $un){\n check_email(\"students\",$conn, $email);\n check_email(\"teachers\", $conn, $email);\n check_username(\"students\", $conn, $un);\n check_username(\"teachers\", $conn, $un);\n }",
"public function checkRegisteredEmail()\n {\n $email = $this->input->post('email');\n\n $user_login_id = $this->authentication_helper->checkEmail($email);\n \n if (isset($user_login_id) && !empty($user_login_id)) {\n echo json_encode(true);\n }\n else\n {\n echo json_encode(false);\n }\n }",
"protected function validateEmailZip($args) {\n\n if ($args['ent_email'] == '' || $args['ent_user_type'] == '')//$args['zip_code'] == '' || \n return $this->_getStatusMessage(1, 1);\n\n\n if ($args['ent_user_type'] == '1')\n $verifyEmail = $this->_verifyEmail($args['ent_email'], 'mas_id', 'master'); //_verifyEmail($email,$field,$table);\n else\n $verifyEmail = $this->_verifyEmail($args['ent_email'], 'slave_id', 'slave'); //_verifyEmail($email,$field,$table);\n\n if (is_array($verifyEmail))\n $email = array('errFlag' => 1);\n else\n $email = array('errFlag' => 0);\n\n\n// $vmail = new verifyEmail();\n//\n// if ($vmail->check($args['ent_email'])) {\n// $email = $this->_getStatusMessage(34, $args['ent_email']);\n// } else if ($vmail->isValid($args['ent_email'])) {\n// $email = $this->_getStatusMessage(24, $args['ent_email']); //_getStatusMessage($errNo, $test_num);\n// //echo 'email valid, but not exist!';\n// } else {\n// $email = $this->_getStatusMessage(25, $args['ent_email']); //_getStatusMessage($errNo, $test_num);\n// //echo 'email not valid and not exist!';\n// }\n// $selectZipQry = \"select zipcode from zipcodes where zipcode = '\" . $args['zip_code'] . \"'\";\n// $selectZipRes = mysql_query($selectZipQry, $this->db->conn);\n// if (mysql_num_rows($selectZipRes) > 0)\n $zip = array('errFlag' => 0);\n// else\n// $zip = array('errFlag' => 1);\n\n\n if ($email['errFlag'] == 0 && $zip['errFlag'] == 0)\n return $this->_getStatusMessage(47, $verifyEmail);\n else if ($email['errFlag'] == 1 && $zip['errFlag'] == 1)\n return $this->_getStatusMessage(46, $verifyEmail);\n else if ($email['errFlag'] == 0 && $zip['errFlag'] == 1)\n return $this->_getStatusMessage(46, $verifyEmail);\n else if ($email['errFlag'] == 1 && $zip['errFlag'] == 0)\n return $this->_getStatusMessage(2, $verifyEmail);\n }",
"public function emailVerification($token){\n if ($this->userModel->checkToken($token)){\n $data = ['email_verification' => 'alert-success',\n 'email' => '',\n 'password' => '',\n 'email_error' => '',\n 'password_error' => '',\n ];\n $this->view('users/login', $data);\n } else {\n $data = ['email_verification' => 'alert-danger',\n 'email' => '',\n 'password' => '',\n 'email_error' => '',\n 'password_error' => '',\n ];\n $this->view('users/login', $data);\n }\n }"
] | [
"0.7548826",
"0.7307786",
"0.72689927",
"0.72590655",
"0.72309333",
"0.71022725",
"0.7089726",
"0.7087561",
"0.70139384",
"0.70018095",
"0.69819576",
"0.6980893",
"0.69635266",
"0.69510573",
"0.69436264",
"0.6912266",
"0.68790007",
"0.685359",
"0.6840604",
"0.6838102",
"0.68311125",
"0.6826804",
"0.67905873",
"0.67881113",
"0.6780385",
"0.6768155",
"0.6753753",
"0.67521244",
"0.67488086",
"0.67356235",
"0.67182064",
"0.67042696",
"0.6702665",
"0.6692538",
"0.6691767",
"0.66822684",
"0.6677454",
"0.6664482",
"0.6658033",
"0.66491127",
"0.66441745",
"0.6642546",
"0.66410965",
"0.66286",
"0.6623712",
"0.6614999",
"0.66036266",
"0.6590173",
"0.658602",
"0.65848416",
"0.6570632",
"0.65634745",
"0.65623605",
"0.6560414",
"0.6551468",
"0.6542762",
"0.6535499",
"0.6531927",
"0.65312916",
"0.65248865",
"0.65175945",
"0.65120673",
"0.6503339",
"0.6495775",
"0.6489064",
"0.6488999",
"0.64840245",
"0.64752734",
"0.6470418",
"0.64667416",
"0.64540595",
"0.64508945",
"0.64505196",
"0.6444665",
"0.64424515",
"0.6439608",
"0.6438013",
"0.6433643",
"0.64275205",
"0.6423387",
"0.64205617",
"0.6415372",
"0.641439",
"0.64131856",
"0.640999",
"0.64091855",
"0.64069986",
"0.64040864",
"0.6401425",
"0.64007825",
"0.6400317",
"0.63938475",
"0.63913006",
"0.6390676",
"0.6388881",
"0.63722634",
"0.6368707",
"0.6360615",
"0.6357463",
"0.63574344",
"0.63489884"
] | 0.0 | -1 |
used to verify servers | function isValidServer ($string)
{
return (preg_match ('/[^a-z0-9\-_]/i', $string) ? 0 : 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ticketbud_check_server_connectivity() {\n\tglobal $ticketbud_api_host, $ticketbud_api_port, $ticketbud_unused_api_key;\n\t\n\t$test_host = 'ticketbud.com';\n\t\n\t// Some web hosts may disable one or both functions\n\tif ( !function_exists('fsockopen') || !function_exists('gethostbynamel') )\n\t\treturn array();\n\t\n\t$ips = gethostbynamel($test_host);\n\tif ( !$ips || !is_array($ips) || !count($ips) )\n\t\treturn array();\n\t\t\n\t$servers = array();\n\tforeach ( $ips as $ip ) {\n\t\t$response = ticketbud_verify_user( ticketbud_get_key(), $ip );\n\t\t// even if the key is invalid, at least we know we have connectivity\n\t\tif ( $response == 'valid' || $response == 'invalid' )\n\t\t\t$servers[$ip] = true;\n\t\telse\n\t\t\t$servers[$ip] = false;\n\t}\n\n\treturn $servers;\n}",
"public function checkInServerList()\n {\n $serverList = preg_split('/\\r\\n|[\\r\\n]/', ConfPPM::getConf('server_list'));\n $myIP = array();\n $myIP[] = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['HTTP_CF_CONNECTING_IP']) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['HTTP_X_REAL_IP']) ? $_SERVER['HTTP_X_REAL_IP'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';\n $myIP[] = isset($_SERVER['GEOIP_ADDR']) ? $_SERVER['GEOIP_ADDR'] : '127.0.0.1';\n if (empty(array_intersect($serverList, $myIP))) {\n return false;\n } else {\n return true;\n }\n }",
"function validate_server($link, $data, $address, $secret_key) // Colorize: green\n { // Colorize: green\n if (get_server_secret_key($link, $data, $address) != $secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }",
"private function get_server()\n {\n }",
"function validate_server($host, $port)\n { $s_own_loc = 1;\n $apiCommand = '<Init/>';\n $resultDoc = \"\";\n $fp = @fsockopen($host, $port, $errno, $errstr, 2);\n if($fp)\n {\n fputs($fp,$apiCommand.\"\\0\");\n while (!feof($fp))\n {\n $resultDoc .= fgets($fp, 1024);\n $resultDoc = rtrim($resultDoc);\n }\n $parser = xml_parser_create(\"UTF-8\");\n xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);\n if (xml_parse_into_struct($parser, $resultDoc, $values, $tags))\n {\n if($values)\n {\n $s_own_loc = 0;\n }\n xml_parser_free($parser);\n fclose($fp);\n }\n }\n return $s_own_loc;\n }",
"function ticketbud_server_connectivity_ok() {\n\t// skip the check on WPMU because the status page is hidden\n\tglobal $ticketbud_unused_api_key;\n\tif ( $ticketbud_unused_api_key )\n\t\treturn true;\n\t$servers = ticketbud_get_server_connectivity();\n\treturn !( empty($servers) || !count($servers) || count( array_filter($servers) ) < count($servers) );\n}",
"public function testListServer()\n {\n }",
"function hosting_server_post_hosting_verify_task($task, $data) {\n if ($task->ref->type == 'server') {\n $task->ref->no_verify = TRUE;\n\n // Set verified flag on server, to let it know it has been checked.\n $task->ref->verified = REQUEST_TIME;\n\n $task->ref->server_status = HOSTING_SERVER_ENABLED;\n node_save($task->ref);\n }\n}",
"private function _getServer(){\n\t\textract($this->configs);\n\t\t$orderServer = array();\n\t\tif(is_string($servers))\t{\n\t\t\t$servers = array($servers);\n\t\t}\n\t\t\n\t\tif ( $masterServer !== false && is_string($masterServer)){\n\t\t\t$orderServer[] = $servers[$masterServer];\n\t\t\tunset($servers[$masterServer]);\n\t\t}\n\t\t$orderServer = array_merge($orderServer,$servers); \n\t\t\n\t\tforeach($orderServer as $url ) {\n\t\t\tif($this->_checkServerIsOnline($url)){\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}\n\t\n\t\t\t\t\n\t\treturn false ;\n\t}",
"public function testGetServer()\n {\n $this->assertEquals('127.0.0.1', $this->_req->getServer('SERVER_ADDR'));\n }",
"public function verifyKeys() {\n $data = $this->getClientInformation();\n $result = $this->updateSite($data);\n // lastResponseCode will either be TRUE, REQUEST_ERROR, AUTH_ERROR, or\n // NETWORK_ERROR.\n return $this->lastResponseCode === TRUE ? TRUE : $this->lastResponseCode;\n }",
"protected function checkTrustedHostPattern() {}",
"public function verify();",
"function tryServer() {\n\n\tglobal $server, $hostname, $username, $password;\n\tswitch($server) {\n\t\tcase \"Nucleus/4.3 UPnP/1.0 Virata-EmWeb/R6_2_0\": system(\"changers/viking $hostname $username $password\"); exit(0); break;;\n\t\tcase \"RomPager/4.07 UPnP/1.0\": system(\"changers/tplink1 $hostname $username $password\"); exit(0); break;\n\t\tcase \"micro_httpd\": system(\"changers/dlink1 $hostname $username $password\"); exit(0); break;\n\t\tdefault: break;\n\t}\n}",
"private function validateServer($server)\n {\n if ($server[\"ssl_force\"]) {\n $server[\"port\"] = null;\n }\n\n if (!$server[\"ssl_enable\"]) {\n $server[\"ssl_port\"] = null;\n }\n\n // Perform port checks\n if ($server[\"port\"] == $server[\"ssl_port\"]) {\n throw new OMVException(\n OMVErrorMsg::E_CONFIG_OBJECT_INVALID,\n \"Ports identical, can't use same port for SSL.\"\n );\n }\n\n if (!$this->validatePort($server[\"port\"], $server[\"uuid\"], $server[\"host_type\"])) {\n throw new OMVException(\n OMVErrorMsg::E_CONFIG_OBJECT_INVALID,\n \"Selected port is already used\"\n );\n }\n\n if (!$this->validatePort($server[\"ssl_port\"], $server[\"uuid\"], $server[\"host_type\"], true)) {\n throw new OMVException(\n OMVErrorMsg::E_CONFIG_OBJECT_INVALID,\n \"Selected port (SSL) is already used\"\n );\n }\n\n // Validate the default server attribute\n if (!$server[\"ssl_force\"]) {\n if ($server[\"port_default_server\"]) {\n if (!$this->validatePortDefaultServer($server[\"port\"], $server[\"uuid\"])) {\n throw new OMVException(\n OMVErrorMsg::E_CONFIG_OBJECT_INVALID,\n \"There is already another server set as the default on the selected port.\"\n );\n }\n }\n } else {\n $server[\"port_default_server\"] = false;\n }\n\n if ($server[\"ssl_enable\"]) {\n if ($server[\"ssl_port_default_server\"]) {\n if (!$this->validatePortDefaultServer($server[\"ssl_port\"], $server[\"uuid\"], true)) {\n throw new OMVException(\n OMVErrorMsg::E_CONFIG_OBJECT_INVALID,\n \"There is already another server set as the default on the selected SSL port.\"\n );\n }\n }\n } else {\n $server[\"ssl_port_default_server\"] = false;\n }\n\n // Trim and replace all spaces with a single space\n // to allow exploding in the get method\n $serverName = $server[\"server_name\"];\n $serverName = trim($serverName);\n $serverName = preg_replace(\"/\\s+/\", \" \", $serverName);\n $server[\"server_name\"] = $serverName;\n\n return $server;\n }",
"private function checkConnection(){\n\t\t\t\n\t\t\t$request = $this->url.$this->getMode(\"version\").\"?\".$this->key_string;\n\t\t\t$this->http->setURL($request);\n\t\t\t$response = $this->http->send();\n\t\t\t//echo $this->http->HTMLizeErrlog();\n\t\t\t$this->bn_version = str_replace(\"_\", \".\", $response[\"version\"]);\n\n\t\t\treturn $this->http->status;\n\t\t}",
"function checkNameserver($server, $zone){\n // attempt to connect\n if ($x = @fsockopen($server, 53, $errno, $errstr, 4)) {\n //close connection\n if ($x) @fclose($x);\n return true;\n }\n else {\n echo \"Server \". $server .\" for \". $zone .\" is down, skipping until the next check.\\n\";\n return false;\n }\n }",
"public function verify() {\n $response = $this->runNmap($this->hostname);\n\n $response = $this->cleanupResponse($response);\n\n $isValid = $this->validateResponse($response);\n\n return $this->createOutput($isValid);\n }",
"public function verifyRequest()\n {\n }",
"function check_server()\r\n{\r\n global $username, $ticket, $address, $url, $timeout, $mode, $warn, $crit;\r\n global $debug;\r\n\r\n $components = array(\r\n \"nagios\" => \"Monitoring Engine\",\r\n \"ndo2db\" => \"Database Backend\",\r\n \"npcd\" => \"Performance Grapher\",\r\n );\r\n $jobs = array(\r\n \"reportengine\" => \"Report Engine\",\r\n \"sysstat\" => \"System Statistics\",\r\n \"eventman\" => \"Event Manager\",\r\n \"feedprocessor\" => \"Feed Processor\",\r\n \"cmdsubsys\" => \"Command Subsystem\",\r\n \"nom\" => \"Nonstop Operations Manager\",\r\n \"dbmaint\" => \"Database Maintenance\",\r\n \"cleaner\" => \"Cleaner\",\r\n );\r\n\r\n $returncode = 0;\r\n\r\n check_args();\r\n\r\n\r\n // base url to access the backend\r\n $url_base = $url . \"/backend/\";\r\n\r\n // common options used to access backend\r\n $query = \"username=\" . $username . \"&ticket=\" . $ticket;\r\n\r\n // mode-specific options\r\n switch ($mode) {\r\n case \"corecomponents\":\r\n default:\r\n $query .= \"&cmd=getsysstat\";\r\n break;\r\n }\r\n\r\n // generate full url to use\r\n $xiurl = $url_base . \"?\" . $query;\r\n\r\n if ($debug)\r\n echo \"ACCESSING URL: $xiurl\\n\";\r\n\r\n $opts = array(\r\n \"method\" => \"post\",\r\n \"return_info\" => true,\r\n \"timeout\" => $timeout,\r\n );\r\n\r\n $result = load_url($xiurl, $opts);\r\n\r\n if ($debug) {\r\n echo \"RESULT:\\n\";\r\n print_r($result);\r\n }\r\n\r\n // check for errors\r\n if (isset($result['error']) && $result['error'] == true) {\r\n echo \"Error: Unable to contact XI server backend at \" . $url . \"\\n\";\r\n exit(2);\r\n }\r\n\r\n // parse output\r\n $body = $result['body'];\r\n $xml = @simplexml_load_string($body);\r\n if (!$xml) {\r\n echo \"Error: Could not parse XML from \" . $url . \" (\" . $body . \")\\n\";\r\n exit(2);\r\n }\r\n\r\n // check for authentication, command errors\r\n if ($xml->error) {\r\n $msg = strval($xml->error->errormsg);\r\n echo \"Error: Received error from XI server backend (\" . $msg . \")\\n\";\r\n exit(2);\r\n }\r\n\r\n if ($debug)\r\n echo \"XML DATA LOOKS OK\\n\";\r\n\r\n // handle mode\r\n switch ($mode) {\r\n\r\n case \"daemons\":\r\n\r\n $output = \"\";\r\n $total = 0;\r\n $daemonlist = \"\";\r\n\r\n foreach ($xml->daemons->daemon as $d) {\r\n\r\n $total++;\r\n\r\n if ($debug)\r\n echo \"DAEMON: \" . $d->name . \"=\" . $d->status . \"\\n\";\r\n\r\n $name = strval($d->name);\r\n $status = intval($d->status);\r\n\r\n if ($daemonlist != \"\")\r\n $daemonlist .= \", \";\r\n $daemonlist .= $name;\r\n\r\n // get a friendly name\r\n $fname = \"\";\r\n if (array_key_exists($name, $components))\r\n $fname = $components[$name];\r\n\r\n // handle errors;\r\n if ($status != 0) {\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $name;\r\n if ($fname != \"\")\r\n $output .= \" (\" . $fname . \")\";\r\n $output .= \" stopped\";\r\n // performance grapher gets a warning\r\n if ($name == \"npcd\")\r\n $returncode = 1;\r\n // everything else gets a critical\r\n else\r\n $returncode = 2;\r\n }\r\n }\r\n\r\n // no daemons were found\r\n if ($total == 0) {\r\n $output = \"No daemon information found.\";\r\n $returncode = 3;\r\n } // no problems\r\n else if ($output == \"\") {\r\n //$output=\"All daemons (\".$daemonlist.\") are running okay.\";\r\n $output = \"All daemons are running okay.\";\r\n }\r\n\r\n echo $output . \"\\n\";;\r\n\r\n break;\r\n\r\n case \"jobs\":\r\n\r\n $output = \"\";\r\n $total = 0;\r\n $joblist = \"\";\r\n\r\n $now = time();\r\n\r\n foreach ($jobs as $jn => $jfn) {\r\n\r\n if ($debug)\r\n echo \"CHECKING JOB $jn ($jfn)\\n\";\r\n\r\n $lci = intval($xml->$jn->last_check);\r\n\r\n // error\r\n if ($lci == 0) {\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $jfn . \" (\" . $jn . \") stale\";\r\n } else {\r\n\r\n $total++;\r\n\r\n $diff = $now - $lci;\r\n\r\n // defaults\r\n $warn = 90;\r\n $crit = 300;\r\n\r\n // db maintenance has longer interval\r\n $warn = 360;\r\n $crit = 900;\r\n\r\n // warning\r\n if ($diff > $warn) {\r\n $returncode = 1;\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $jfn . \" (\" . $jn . \") stale (\" . $diff . \" seconds old)\";\r\n }\r\n\r\n // critical\r\n if ($diff > $crit) {\r\n $returncode = 2;\r\n if ($output != \"\")\r\n $output .= \", \";\r\n $output .= $jfn . \" (\" . $jn . \") stale (\" . $diff . \" seconds old)\";\r\n }\r\n }\r\n }\r\n\r\n // no daemons were found\r\n if ($total == 0) {\r\n $output = \"No job information found.\";\r\n $returncode = 3;\r\n } // no problems\r\n else if ($output == \"\") {\r\n $output = \"All jobs are running okay.\";\r\n }\r\n\r\n echo $output . \"\\n\";;\r\n\r\n break;\r\n\r\n case \"iowait\":\r\n\r\n $output = \"\";\r\n\r\n $iowait = floatval($xml->iostat->iowait);\r\n\r\n $w = floatval($warn);\r\n $c = floatval($crit);\r\n\r\n if ($iowait >= $c) {\r\n $returncode = 2;\r\n $output = \"Critical:\";\r\n } else if ($iowait >= $w) {\r\n $returncode = 1;\r\n $output = \"Warning:\";\r\n } else\r\n $output = \"Ok:\";\r\n\r\n $output .= \" I/O Wait = \" . $iowait . \"%|iowait=\" . $iowait . \"%;\" . $w . \";\" . $c . \";;\\n\";\r\n\r\n echo $output;\r\n\r\n break;\r\n\r\n case \"load\":\r\n\r\n $output = \"\";\r\n\r\n $load1 = floatval($xml->load->load1);\r\n $load5 = floatval($xml->load->load5);\r\n $load15 = floatval($xml->load->load15);\r\n\r\n $wvals = explode(\",\", $warn);\r\n $cvals = explode(\",\", $crit);\r\n\r\n for ($x = 0; $x <= 2; $x++) {\r\n $w = floatval($wvals[$x]);\r\n $c = floatval($cvals[$x]);\r\n\r\n if ($x == 0) {\r\n if ($load1 >= $c)\r\n $returncode = 2;\r\n else if ($load1 >= $w)\r\n $returncode = 1;\r\n } else if ($x == 1) {\r\n if ($load5 >= $c)\r\n $returncode = 2;\r\n else if ($load5 >= $w)\r\n $returncode = 1;\r\n } else if ($x == 2) {\r\n if ($load15 >= $c)\r\n $returncode = 2;\r\n else if ($load15 >= $w)\r\n $returncode = 1;\r\n }\r\n }\r\n\r\n if ($returncode == 2)\r\n $output = \"Load Critical:\";\r\n else if ($returncode == 1)\r\n $output = \"Load Warning:\";\r\n else\r\n $output = \"Load Ok:\";\r\n\r\n $output .= \" load1=\" . $load1 . \", load5=\" . $load5 . \", load15=\" . $load15 . \"|load1=\" . $load1 . \";\" . $wvals[0] . \";\" . $cvals[0] . \";; load5=\" . $load5 . \";\" . $wvals[1] . \";\" . $cvals[1] . \";; load15=\" . $load15 . \";\" . $wvals[2] . \";\" . $cvals[2] . \";;\\n\";\r\n\r\n echo $output;\r\n\r\n break;\r\n\r\n default:\r\n echo \"Error: Unknown mode '\" . $mode . \"' specified.\\n\";\r\n $returncode = 3;\r\n break;\r\n }\r\n\r\n\r\n // everything is okay, but we should never get here...\r\n exit($returncode);\r\n}",
"function validate_this_server($link, $data, $secret_key) // Colorize: green\n { // Colorize: green\n if (get_secret_key($link, $data) != $secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }",
"public function checkVerification()\n {\n $dns = new Dns($this->domain, config('anonaddy.dns_resolver'));\n\n if (Str::contains($dns->getRecords('MX'), 'MX 10 ' . config('anonaddy.hostname') . '.')) {\n $this->markDomainAsVerified();\n }\n }",
"function mkCheckServer($email)\n {\n // no validation if OS is Windows, return true\n if (defined(\"PHP_OS\") && !strcmp(substr(PHP_OS, 0, 3), \"WIN\")) return array(true, \"This method is not supported on Windows systems\");\n list($user, $domain) = split(\"@\", $email, 2);\n $mxlist = false;\n if ($this->checkserv) {\n @getmxrr($domain, $mxlist);\n $result = array(false, $domain . \" Mailserver not found\");\n if ($mxlist) {\n foreach ($mxlist as $mx) {\n $fp = fsockopen($mx, 25, $errno, $errstr, 20);\n if (!$fp) continue;\n socket_set_blocking($fp, false);\n $s = 0;\n $c = 0;\n $out = \"\";\n do {\n $out = fgets($fp, 2500);\n if (ereg(\"^220\", $out)) {\n $s = 0;\n $out = \"\";\n $c++;\n } else {\n if (($c > 0 && $out == \"\")) break;\n else $s++;\n if ($s > 9999) break;\n }\n } while ($out == \"\");\n socket_set_blocking($fp, true);\n fputs($fp, \"HELO ActiveMail\\n\");\n $out = fgets($fp, 3000);\n fputs($fp, \"MAIL FROM: $this->knownmail\\n\");\n $out = fgets($fp, 3000);\n fputs($fp, \"RCPT TO: $email\\n\");\n $out = fgets($fp, 3000);\n if (ereg(\"^250\", $out)) $result = array(true, $out);\n else $result = array(false, $out);\n fputs($fp, \"quit\\n\");\n fclose($fp);\n if ($result[0]) break;\n }\n } else $result = array(false, $email . \" Function getmxrr() not supported or Mailserver not found\");\n } else $result = array(true, $email . \" Mailserver not checked\");\n return $result;\n }",
"function serverInfo() {\n\t}",
"function adminChk(){\r\n\treturn $_SERVER[\"REMOTE_ADDR\"] == \"118.36.189.171\" || $_SERVER[\"REMOTE_ADDR\"] == \"39.115.229.173\" || $_SERVER[\"REMOTE_ADDR\"] == \"127.0.0.1\";\r\n}",
"protected function checkServer(Server $server)\n\t{\n\t\t$uri = $server->getCheckAliveUri();\n\t\tif (!$uri)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Let's wait a litle for it to settle down\n\t\tsleep(3);\n\n\t\t// Check the web server\n\t\t$response = file_get_contents($uri);\n\t\tif ($response != $server->getCheckAliveExpectedResponse())\n\t\t{\n\t\t\tthrow new \\Exception(\n\t\t\t\t\"Did not get expected result when checking the web server is up\"\n\t\t\t);\n\t\t}\n\t}",
"protected function getTrustedHostsPatternStatus() {}",
"function verifyRequest($req){\n\n}",
"public static function checkMinerServerState($serverUrl) {\n $response=self::curlRequestResponse($serverUrl);\n return !empty($response);\n //TODO check the real availability\n }",
"public static function GetValidateServer ()\n {\n\t\treturn self::GetServer('forceValidateServer', 'validate');\n }",
"function check_servers ($serv_params){\r\n\r\n global $lingo,$divstyle_white,$divstyle_blue,$divstyle_orange,$divstyle_grey,$strings,$crm_api_user, $crm_api_pass, $crm_wsdl_url,$funky_gear,$sess_account_id,$sess_contact_id;\r\n\r\n #$lingoname = \"name_ja\";\r\n $lingoname = \"name_\".$lingo;\r\n\r\n $server_id = $serv_params[0];\r\n $server_name = $serv_params[1];\r\n $server_type = $serv_params[2];\r\n\r\n ##########################################\r\n # Get server-related switches\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n // parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n // The type is Live Status 1/0\r\n $serverbit_type_id = '423752fe-a632-9b4d-8c3b-52ccc968fe59';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatus\"];\r\n\r\n $addserver = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$server_name.\": \".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_white;\r\n break;\r\n case '1':\r\n $server_status_show = $strings[\"CI_ServerStatusOnline\"];\r\n $addserver = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n break;\r\n case '0':\r\n $server_status_show = $strings[\"CI_ServerStatusOffline\"];\r\n $addserver = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addserver.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addserver.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # End get server-related switches\r\n ##########################################\r\n # Get server-related switches\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n // parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n // The type is Live Status 1/0\r\n $serverbit_type_id = '2864a518-19f4-ddfa-366e-52ccd012c28b';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_maintenance_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_maintenance_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_white;\r\n break;\r\n case '1':\r\n $server_status_show = \"ON\";\r\n $addservermaintenance = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n $view = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id;\r\n break;\r\n case '0':\r\n $server_status_show = \"OFF\";\r\n $addservermaintenance = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n $view = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.$view.$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # Maintenance Window DateTime Start\r\n $serverbit_type_id = '787ab970-8f2a-efed-3aca-52ecd566b16b';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n\r\n $serverbits = \"\";\r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = \"Maintenance Window Start DateTime\"; //$strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_start_datetime_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $server_maintenance_start_datetime = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_start_datetime_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_start_datetime_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n if ($server_maintenance_start_datetime){\r\n $start_datetime_show = $server_maintenance_start_datetime;\r\n $thisdivstyle = $divstyle_orange;\r\n $addservermaintenance = \"\";\r\n } else {\r\n $start_datetime_show = \"NA\";\r\n $thisdivstyle = $divstyle_white;\r\n } \r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$start_datetime_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_start_datetime_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B>NA<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # Maintenance Window DateTime End\r\n $serverbit_type_id = 'b38181b6-eb59-0bc3-bad3-52ecd65163f5';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n\r\n $serverbits = \"\";\r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = \"Maintenance Window End DateTime\"; //$strings[\"CI_ServerStatusMaintenance\"];\r\n\r\n $addservermaintenance = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_maintenance_end_datetime_id = $serverbits[$srvbitcnt]['id'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $server_maintenance_end_datetime = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_maintenance_end_datetime_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_maintenance_end_datetime_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n if ($server_maintenance_end_datetime){\r\n $end_datetime_show = $server_maintenance_end_datetime;\r\n $thisdivstyle = $divstyle_orange;\r\n $addservermaintenance = \"\";\r\n } else {\r\n $end_datetime_show = \"NA\";\r\n $thisdivstyle = $divstyle_white;\r\n } \r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$end_datetime_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_maintenance_end_datetime_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B>NA<BR> \".$addservermaintenance.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n\r\n # End get server-related switches\r\n ##########################################\r\n # Get server-related back-up details\r\n # Back-up Day: 67a6bcaf-4e45-42d6-79da-52d4df16784c\r\n # Back-up End Time: 913315fd-34d5-036e-0c52-52d4d91550d9\r\n # Back-up Job Name: 8802ae00-1abe-9819-558f-52d4d74b6ca2\r\n # Back-up Start Time: 4d440215-68e1-efe3-158e-52d4d808e6b1\r\n # Back-up Status: 530ae095-b3e7-c9fe-61fb-52d5aee0a272\r\n # Back-up Status Keyword(s): 56291976-233c-912a-b10e-52d4dfc8357c\r\n # Execution Server: 91694cfa-3f33-6505-d894-52d4d84722c0\r\n # Target Server: 734f02a8-5821-86f1-3229-52d4d80696ac\r\n\r\n $subicondivwidth = \"26\";\r\n $subiconheight = \"3\";\r\n $subrowdivwidth = \"80%\";\r\n\r\n $serverbit_object_type = \"ConfigurationItems\";\r\n $serverbit_action = \"select\";\r\n # parent CI will be the registered server (also a CI) - not the filter as we may use this filter for other purposes\r\n # The type is Maintenance 1/0\r\n $serverbit_type_id = '530ae095-b3e7-c9fe-61fb-52d5aee0a272';\r\n $serverbit_params[0] = \" sclm_configurationitems_id_c='\".$server_id.\"' && sclm_configurationitemtypes_id_c='\".$serverbit_type_id.\"' \";\r\n $serverbit_params[1] = \"id,contact_id_c,account_id_c,name,sclm_configurationitems_id_c,sclm_configurationitemtypes_id_c,$lingoname\"; // select array\r\n $serverbit_params[2] = \"\"; // group;\r\n $serverbit_params[3] = \"\"; // order;\r\n $serverbit_params[4] = \"\"; // limit\r\n \r\n $serverbits = api_sugar ($crm_api_user, $crm_api_pass, $crm_wsdl_url, $serverbit_object_type, $serverbit_action, $serverbit_params);\r\n\r\n $label = $strings[\"CI_ServerStatusBackup\"];\r\n\r\n $addserverbackup = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=add&value=\".$serverbit_type_id.\"&valuetype=ConfigurationItemTypes&clonevaluetype=ConfigurationItems&clonevalue=\".$filter_id.\"&sendiv=INFRA&parent_ci=\".$server_id.\"&partype=dbcb0dbb-c3b8-8edb-1bd6-52b8e31ff812');return false\\\"><img src=images/blank.gif width=5 height=5><img src=images/icons/plus.gif width=16> <font color=#151B54><B>\".$strings[\"action_addnew\"].\"</B></font></a>\";\r\n\r\n if (is_array($serverbits)){\r\n\r\n for ($srvbitcnt=0;$srvbitcnt < count($serverbits);$srvbitcnt++){\r\n \r\n $server_backup_status_id = $serverbits[$srvbitcnt]['id'];\r\n $record_contact_id_c = $serverbits[$srvbitcnt]['contact_id_c'];\r\n $record_account_id_c = $serverbits[$srvbitcnt]['account_id_c'];\r\n $server_backup_status = $serverbits[$srvbitcnt]['name']; // 1/0\r\n \r\n $edit = \"\";\r\n $show_id = \"\";\r\n\r\n if ($auth == 3 || ($sess_account_id != NULL && $sess_account_id==$record_account_id_c)){\r\n $edit = \"<a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=edit&value=\".$server_backup_status_id.\"&valuetype=\".$valtype.\"&sendiv=INFRA');return false\\\"><font size=2 color=red><B>[\".$strings[\"action_edit\"].\"]</B></font></a> \";\r\n }\r\n\r\n if ($auth == 3){\r\n $show_id = \" | ID: \".$server_backup_status_id;\r\n } else {\r\n $show_id = \"\";\r\n }\r\n\r\n switch ($server_backup_status){\r\n\r\n case '':\r\n $server_status_show = \"NA\";\r\n $thisdivstyle_orange = $divstyle_grey;\r\n break;\r\n case '1':\r\n $server_status_show = \"OK\";\r\n $addserverbackup = \"\";\r\n $thisdivstyle_orange = $divstyle_blue;\r\n break;\r\n case '0':\r\n $server_status_show = \"NG\";\r\n $addserverbackup = \"\";\r\n $thisdivstyle_orange = $divstyle_orange;\r\n break;\r\n\r\n } // switch\r\n\r\n $filterimage_returner = $funky_gear->object_returner (\"ConfigurationItemTypes\", $serverbit_type_id);\r\n $image_url = $filterimage_returner[7];\r\n\r\n $servers .= \"<div style=\\\"\".$thisdivstyle_orange.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$subiconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$subrowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR>\".$edit.\" <a href=\\\"#\\\" onClick=\\\"loader('INFRA');doBPOSTRequest('INFRA','Body.php', 'pc=\".$portalcode.\"&do=ConfigurationItems&action=view&value=\".$server_backup_status_id.\"&valuetype=ConfigurationItems&sendiv=INFRA');return false\\\"><font size=2 color=black><B>[\".$strings[\"action_view\"].\"]</B></font></a>\".$show_id.\" \".$addserverbackup.\"</div></div>\";\r\n\r\n } // for serverbits\r\n\r\n } else {// if array\r\n\r\n $server_status_show = \"NA\";\r\n $servers .= \"<div style=\\\"\".$divstyle_white.\"\\\"><div style=\\\"width:\".$subiconwidth.\";float:left;padding-top:\".$iconheight.\";\\\"><img src=\".$image_url.\" width=16></div><div style=\\\"width:\".$rowdivwidth.\";float:left;padding-top:2;margin-left:8;padding-left:2;\\\"><B>\".$label.\":</B> \".$server_status_show.\"<BR> \".$addserverbackup.\"</div></div>\";\r\n\r\n } // else array\r\n\r\n # End get server-related switches\r\n ##########################################\r\n\r\n return $servers;\r\n\r\n }",
"public function getServerStatus()\n {\n global $app_strings, $sugar_config;\n $isValid = false;\n $displayText = \"\";\n try {\n $response = $this->_client->request('', \\Elastica\\Request::GET);\n if ($response->isOk()) {\n $isValid = true;\n if (!empty($GLOBALS['app_strings'])) {\n $displayText = $app_strings['LBL_EMAIL_SUCCESS'];\n } else {\n //Fix a notice error during install when we verify the Elastic Search settings\n $displayText = 'Success';\n }\n } else {\n $displayText = $app_strings['ERR_ELASTIC_TEST_FAILED'];\n }\n } catch (Exception $e) {\n $this->reportException(\"Unable to get server status\", $e);\n $displayText = $e->getMessage();\n }\n return array('valid' => $isValid, 'status' => $displayText);\n }",
"function loadServerInfo() {\n\t\t\n\t\t/* define variables */\n\t\t$connections = array(); // to store the active connections\n\t\t$numConnections = 0; // number of connections (number of elements in $connections)\n\t\t$curServer = 0; // next position in the server array to handle\n\t\t\n\t\t/* loop as long as there are master servers to wait for */\n\t\twhile ($numConnections > 0 || isset($this->servers[$curServer])) {\n\t\t\t\n\t\t\t/* build up connections until limit is reached */\n\t\t\tfor (; isset($this->servers[$curServer]) && $numConnections < self::MAX_CONNECTIONS_SERVER; $curServer++) {\n\t\t\t\t\n\t\t\t\tswitch ($this->servers[$curServer][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgief\"; break;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffgie3\\x05\"; break;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcontinue 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$authority = $this->servers[$curServer][0].':'.$this->servers[$curServer][1];\n\t\t\t\t$connection = self::establishConnection($authority, $data);\n\t\t\t\t\n\t\t\t\t/* add to connection if not failed */\n\t\t\t\tif ($connection) {\n\t\t\t\t\t$connections[$curServer] = array($connection, &$this->servers[$curServer], self::getTimeInMs());\n\t\t\t\t\t$numConnections++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* save memory */\n\t\t\t\tunset($authority, $connection);\n\t\t\t}\n\t\t\t\n\t\t\t/* check for responses */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\t\n\t\t\t\t/* read data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // TODO: find out how great it really can be\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t$data = fread($connection[0], 2048); // by my calc the max size is 850, but trying to read more doesn't harm\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* packet length */\n\t\t\t\t$datalen = strlen($data);\n\t\t\t\t// var_dump($datalen);\n\t\t\t\t\n\t\t\t\t/* check if data is usable, otherwise skip */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\tif ($data === false || $datalen < 14 || substr($data, 0, 14) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinfo\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\tif ($data === false || $datalen < 15 || substr($data, 0, 15) !== \"\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xffinf35\") {\n\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* analyse data */\n\t\t\t\tswitch ($connection[1][2]) {\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_05:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = substr((string)$data[0], 14);\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[3];\n\t\t\t\t\t\t$flags = (int)$data[4];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['progression'] = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 8; isset($data[$i+2]); $i += 2) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+1];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase self::VERSION_06:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data = explode(\"\\x00\", $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['version'] = (string)$data[1];\n\t\t\t\t\t\t$connection[1]['name'] = (string)$data[2];\n\t\t\t\t\t\t$connection[1]['map'] = (string)$data[3];\n\t\t\t\t\t\t$connection[1]['gametype'] = (string)$data[4];\n\t\t\t\t\t\t$flags = (int)$data[5];\n\t\t\t\t\t\t$connection[1]['password'] = (($flags & self::SERVER_FLAG_PASSWORD) === self::SERVER_FLAG_PASSWORD);\n\t\t\t\t\t\t$connection[1]['num_players'] = (int)$data[8];\n\t\t\t\t\t\t$connection[1]['max_players'] = (int)$data[9];\n\t\t\t\t\t\t$connection[1]['num_players_ingame'] = (int)$data[6];\n\t\t\t\t\t\t$connection[1]['max_players_ingame'] = (int)$data[7];\n\t\t\t\t\t\t$connection[1]['ping'] = (int)(self::getTimeInMs() - $connection[2]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$connection[1]['players'] = array();\n\t\t\t\t\t\tfor ($i = 10; isset($data[$i+4]); $i += 5) {\n\t\t\t\t\t\t\t$player = array();\n\t\t\t\t\t\t\t$player['name'] = (string)$data[$i];\n\t\t\t\t\t\t\t$player['clan'] = (string)$data[$i+1];\n\t\t\t\t\t\t\t$player['country'] = (int)$data[$i+2];\n\t\t\t\t\t\t\t// $player['countrydata'] = self::getCountry($player['country']);\n\t\t\t\t\t\t\t$player['score'] = (int)$data[$i+3];\n\t\t\t\t\t\t\t$player['ingame'] = (bool)$data[$i+4];\n\t\t\t\t\t\t\t$connection[1]['players'][] = $player;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* drop it, because there comes only one packet to analyse */\n\t\t\t\tunset($connections[$n]);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* drop connections that have timed out */\n\t\t\tforeach ($connections as $n => $connection) {\n\t\t\t\tif ((self::getTimeInMs() - $connection[2]) >= self::TIMEOUT_SERVER) {\n\t\t\t\t\tunset($connections[$n]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* renew connection counter */\n\t\t\t$numConnections = count($connections);\n\t\t\t\n\t\t\t/* sleep a bit */\n\t\t\tusleep(self::REQUEST_SLEEP * 1000);\n\t\t}\n\t\t\n\t}",
"protected function serverHostname()\n {\n }",
"function checkServers() {\n\n global $wpdb;\n $table_name = $wpdb->prefix . \"blink_servers\";\n $sql = \"SELECT *, UNIX_TIMESTAMP(now()) now FROM $table_name\";\n $servers = $wpdb->get_results($sql,ARRAY_A);\n\n // delete orphaned links from trashed posts\n $blink_links = $wpdb->prefix . \"blink_links\";\n $delete_sql = \"DELETE bl FROM $blink_links bl, $wpdb->posts p WHERE bl.pid = p.id AND p.post_status != 'publish' AND p.post_parent = 0\";\n $wpdb->query($delete_sql);\n\n // check server's status\n if (count($servers)>0) {\n foreach ($servers as $server) {\n //\t\t\t\tif(!$server['last_update']){\n //\t\t\t\t\t// unregistered\n //\t\t\t\t\t$this->regServer($server);\n //\t\t\t\t} elseif (!$server['last_successful_update']) {\n //\t\t\t\t\t// pending approval (14400 == 4hr)\n //\t\t\t\t\t$time_diff = (int)$server['now'] - (int)$server['last_update'];\n //if($time_diff > 0 ){\t$this->updateServer($server);}\n //\t\t\t\t} elseif ($server['last_update'] > $server['last_successful_update']){\n //echo 'failed';\n //\t\t\t\t\t// failed_update (3600 == 1hr)\n //\t\t\t\t\t$time_diff = (int)$server['now'] - (int)$server['last_update'];\n //if($time_diff > 0 ){\n //echo 'check 3';\n //\t\t\t\t\t\t$this->updateServer($server);\n //\t\t\t\t\t}\n //\t\t\t\t} elseif ($server['last_update'] == $server['last_successful_update']){\n //\t\t\t\t\t// successful update (601200 == 1wk)\n //\t\t\t\t\t$time_diff = (int)$server['now'] - (int)$server['last_update'];\n //if($time_diff > 0 ){\n //echo 'check 4';\n $this->updateServer($server);\n //\t\t\t\t\t}\n //\t\t\t\t}\n }\n }\n }",
"public function CheckClient() : bool;",
"function Verify()\n{\n global $ip;\n if (IsVPN($ip)) die(\"Sorry, but VPNs and/or Proxies aren't allowed!\");\n}",
"function ServerInfo() {}",
"private function auth() {\n\t\tfputs($this->conn, 'HELO ' . $this->localhost . $this->newline);\n\t\t$this->getServerResponse();\n\t\tif(strtolower(trim($this->secure)) == 'tls') {\n\t\t\tfputs($this->conn, 'STARTTLS' . $this->newline);\n\t\t\tif (substr($this->getServerResponse(),0,3)!='220') { return false; }\n\t\t\tstream_socket_enable_crypto($this->conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);\n\t\t\tfputs($this->conn, 'HELO ' . $this->localhost . $this->newline);\n\t\t\tif (substr($this->getServerResponse(),0,3)!='250') { return false; }\n\t\t}\n\t\tif($this->server != 'localhost') {\n\t\t\tfputs($this->conn, 'AUTH LOGIN' . $this->newline);\n\t\t\tif (substr($this->getServerResponse(),0,3)!='334') { return false; }\n\t\t\tfputs($this->conn, base64_encode($this->username) . $this->newline);\n\t\t\tif (substr($this->getServerResponse(),0,3)!='334') { return false; }\n\t\t\tfputs($this->conn, base64_encode($this->password) . $this->newline);\n\t\t\tif (substr($this->getServerResponse(),0,3)!='235') { return false; }\n\t\t}\n\t\treturn true;\n\t}",
"public function testListServers()\n {\n }",
"public function verifyActionGet()\n {\n $ipv = $this->di->request->getGet(\"ip\");\n\n $valid = (filter_var($ipv, FILTER_VALIDATE_IP)) ? \"true\" : \"false\";\n\n $host = gethostbyaddr($ipv);\n\n $result = $valid ? \"IP is valid.\" : \"IP is not valid.\";\n\n $data = [\n \"ip\" => $ipv,\n \"result\" => $result,\n \"host\" => $host,\n ];\n\n return [$data];\n }",
"private function checkServer($lolServer){\n\t\tif(in_array(strtolower($lolServer), $this->_lolServers)){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"static private function CheckCorrectHost() {\n\t\tif (count($_POST) > 0) {\n\t\t\treturn;\n\t\t}\n\t\t$correct_host = str_replace('https://', '', self::getURL());\n\n\t\tif ($_SERVER[\"SERVER_NAME\"] !== $correct_host) {\n\t\t\tself::redirect(self::getCurrentURL() . $_SERVER[\"REQUEST_URI\"]);\n\t\t}\n\t}",
"abstract public function verifyRequest(): void;",
"abstract public function verifyRequest(): void;",
"public function test_https_status()\n {\n }",
"function validate_server_with_ping($link, $data, $my_address, $my_secret_key, $address, $secret_key) // Colorize: green\n { // Colorize: green\n $server_url = \"https://\" . $address . \"/rest/ping.php\"; // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $request_data = [ // Colorize: green\n \"my_address\" => $my_address, // Colorize: green\n \"my_secret_key\" => $my_secret_key, // Colorize: green\n \"your_secret_key\" => $secret_key // Colorize: green\n ]; // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n $curl_session = curl_init($server_url); // Colorize: green\n // Colorize: green\n curl_setopt($curl_session, CURLOPT_CONNECTTIMEOUT, 10); // Colorize: green\n curl_setopt($curl_session, CURLOPT_HEADER, false); // Colorize: green\n curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, true); // Colorize: green\n curl_setopt($curl_session, CURLOPT_SSL_VERIFYHOST, 0); // Colorize: green\n curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); // Colorize: green\n curl_setopt($curl_session, CURLOPT_CUSTOMREQUEST, \"POST\"); // Colorize: green\n curl_setopt($curl_session, CURLOPT_HTTPHEADER, array(\"Content-Type: application/json\")); // Colorize: green\n curl_setopt($curl_session, CURLOPT_POSTFIELDS, json_encode($request_data)); // Colorize: green\n // Colorize: green\n $response = curl_exec($curl_session); // Colorize: green\n curl_close($curl_session); // Colorize: green\n // Colorize: green\n // Colorize: green\n // Colorize: green\n if ($response) // Colorize: green\n { // Colorize: green\n $response = json_decode($response, true); // Colorize: green\n // Colorize: green\n if ($response[\"status\"] != \"OK\") // Colorize: green\n { // Colorize: green\n $error_details = \"Invalid response from server \" . $server_url . \" : \" . json_encode($response); // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Request error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n } // Colorize: green\n else // Colorize: green\n { // Colorize: green\n $error_details = \"Failed to get response from server \" . $server_url; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Request error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }",
"private function checkConnection()\n {\n $status = false;\n $url = 'http://' . trim($this->ip) . ':80/';\n $curlInit = curl_init($url);\n curl_setopt($curlInit, CURLOPT_CONNECTTIMEOUT, 2); //третий параметр - время ожидания ответа сервера в секундах\n curl_setopt($curlInit, CURLOPT_HEADER, true);\n curl_setopt($curlInit, CURLOPT_NOBODY, true);\n curl_setopt($curlInit, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curlInit);\n curl_close($curlInit);\n if ($response) {\n $status = true;\n }\n return $status;\n }",
"function network_domain_check()\n {\n }",
"public function settings_verify()\n {\n $method = rcube_utils::get_input_value('_method', rcube_utils::INPUT_POST);\n $timestamp = intval(rcube_utils::get_input_value('_timestamp', rcube_utils::INPUT_POST));\n $success = false;\n\n if ($driver = $this->get_driver($method)) {\n $data = @json_decode(rcube_utils::get_input_value('_data', rcube_utils::INPUT_POST), true);\n if (is_array($data)) {\n foreach ($data as $key => $value) {\n if ($value !== '******') {\n $driver->$key = $value;\n }\n }\n }\n\n $success = $driver->verify(rcube_utils::get_input_value('_code', rcube_utils::INPUT_POST), $timestamp);\n $method = $driver->method;\n }\n\n // put session into high-security mode\n if ($success && !empty($_POST['_session'])) {\n $_SESSION['kolab_2fa_secure_mode'] = time();\n }\n\n $this->api->output->command('plugin.verify_response', array(\n 'method' => $method,\n 'success' => $success,\n 'message' => str_replace('$method', $this->gettext($method),\n $this->gettext($success ? 'codeverificationpassed' : 'codeverificationfailed'))\n ));\n\n $this->api->output->send();\n }",
"function rest_get_server()\n {\n }",
"public function hasServer(string $name): bool {}",
"public function checkisOnCurrentHostInvalidHosts() {}",
"function okcomputer($allowed) {\n\n $allowed_hosts = array($allowed);\n if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $allowed_hosts)) {\n header($_SERVER['SERVER_PROTOCOL'].' 400 Bad Request');\n exit;\n }\n}",
"function ms_site_check()\n {\n }",
"public function getSSLVerifyHost() {\r\n\t\treturn $this->SSLVerifyHost;\r\n\t}",
"protected function isConnectSuccessful() {}",
"public function verify($response, $remoteIp = null);",
"public function test_gethost_is_returning_the_correct_value(): void\n {\n $expected = 'localhost';\n $actual = $this->secureRequest->getHost();\n $this->assertEquals($expected, $actual);\n }",
"public function checkServer($servername){\n\t\t\t$realmdata = $this->getRealmData($servername);\n\t\t\t\n\t\t\t// get status of realm\n\t\t\tif (is_array($realmdata) && isset($realmdata['status'])){\n\t\t\t\tswitch ($realmdata['status']){\n\t\t\t\t\tcase 'down':\treturn 'down';\t\tbreak;\n\t\t\t\t\tcase 'up':\treturn 'up';\t\tbreak;\n\t\t\t\t\tdefault:\treturn 'unknown';\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 'unknown';\n\t\t}",
"public function testGetHost() {\n static::$_server = array(\n 'SERVER_NAME' => 'nimbl.es'\n );\n $request = $this->createRequest();\n $this->assertEquals('nimbl.es', $request->getHost());\n }",
"private function detectServerRepair()\n {\n $h = date(\"H\", time());\n if ($h == \"03\") {\n Log::write(\"Server Repair Time,\", 2, \"spider\");\n sleep(3600);\n }\n }",
"public function pingServer()\n\t{\n\t\t# code...\n\t\ttry \n\t\t{\n\t\t\tif($this->config->connector == \"mysql\")\n\t\t\t{\n\t\t\t\tif(!mysql_ping($this->connection))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($this->config->connector == \"mysqli\")\n\t\t\t{\n\t\t\t\tif(!mysqli_ping($this->connection))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t\tcatch (Exception $e) \n\t\t{\n\t\t\treturn $e;\n\t\t}\n\t}",
"function getXenserverDetails($xshosturl, $login, $password, $warning = 90, $critical = 95)\n{\n $details = array();\n\n\t\t$xenserver = new XenApi($xshosturl, $login = 'root', $password);\n \n //get all hosts from the conneted pool. Unfortunately we can only connect to the poolmaster..\n $hosts = $xenserver->host__get_all();\n\n // lets also check all guests or we won't get the not running guests..\n $poolguests = $xenserver->VM__get_all();\n\n\t\tforeach ($hosts as $host)\n\t\t{\n\t\t $record = $xenserver->host__get_record($host);\n\n //Hostname or IP identical?\n if (('https://' . $record['name_label']) == $xshosturl || ('https://' . $record['address']) == $xshosturl)\n {\n $details['host']['name'] = $record['hostname'];\n $details['host']['vendor'] = $record['bios_strings']['system-manufacturer'];\n $details['host']['model'] = $record['bios_strings']['system-product-name'];\n $details['host']['sn'] = $record['bios_strings']['system-serial-number'];\n $details['host']['version'] = $record['software_version']['product_brand'] . ' ' . $record['software_version']['product_version'];\n $details['host']['cpu'] = $record['cpu_info']['modelname'] . \"(\" . $record['cpu_info']['socket_count'] . \" Sockets - \". $record['cpu_info']['cpu_count']. \" CPU)\";\n \n // get the PBDs & SR details\n foreach ($record['PBDs'] as $pbd)\n\t\t\t {\n $pbd_list = $xenserver->PBD__get_record($pbd);\n $sr = $xenserver->SR__get_record($pbd_list['SR']);\n\n // ignore udev devices such as dvd rom or usb drives..\n if ($sr['type'] != 'udev')\n {\n $total = round($sr['physical_size'] / 1024 / 1024 / 1024,2);\n // size < 1 is probably the xs tools file, we can safely ignore\n if ($total < 1)\n continue;\n\n $used = round($sr['physical_utilisation'] / 1024 / 1024 / 1024,2);\n $usage = round($used * 100 / $total, 2);\n\n\n $details['storage'][] = array(\n 'label' => $sr['name_label'],\n 'type' => $sr['type'],\n 'total' => $total,\n 'used' => $used,\n 'free' => $total - $used,\n 'usage' => $usage,\n 'exit_code' => $usage > $critical ? 2 :($usage > $warning ? 1 : 0),\n );\n \n }\n }\n \n //metrics -> Memory usage\n $metric = $xenserver->host_metrics__get_record($record['metrics']);\n \n $memtotal = ceil(round($metric['memory_total'] / 1024 / 1024 / 1024,2, PHP_ROUND_HALF_UP));\n $memfree = round($metric['memory_free'] / 1024 / 1024 / 1024,2);\n $memused = $memtotal - $memfree;\n $usage = round($memused * 100 / $memtotal, 2);\n\n $details['memory'] = array(\n 'total' => $memtotal,\n 'used' => $memused,\n 'free' => $memtotal - $memused,\n 'usage' => $usage,\n 'exit_code' => $usage > $critical ? 2 : ($usage > $warning ? 1 : 0)\n );\n\n // get the resident VMs from our hypervisor\n foreach ($record['resident_VMs'] as $guests)\n\t\t\t {\n\t\t\t\t $rec = $xenserver->VM__get_record($guests);\n\t\t\t\t if ( !$rec['is_control_domain'])\n\t\t\t\t {\n \t\t\t $details['guests'][] = array(\n\t\t\t\t\t 'name' => $rec['name_label'],\n\t\t\t\t\t 'powerstate' => $rec['power_state'],\n\t\t\t\t\t );\n }\n }\n }\n }\n \n // get all guests from the pool\n foreach ($poolguests as $pool_guests)\n {\n $rec = $xenserver->VM__get_record($pool_guests);\n if ($rec['is_a_template'] == '1' || $rec['is_a_snapshot'] == '1' || $rec['power_state'] == 'Running')\n continue;\n \n $details['guests'][] = array(\n 'name' => $rec['name_label'],\n 'powerstate' => $rec['power_state'],\n );\n }\n \n\t\n\treturn $details;\n}",
"function validateSetup()\n\t{\n\t\tforeach ($this->setup->getClient()->status as $key => $val)\n\t\t{\n\t\t\tif ($key != \"finish\" and $key != \"access\")\n\t\t\t{\n\t\t\t\tif ($val[\"status\"] != true)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n//$this->setup->getClient()->setSetting(\"zzz\", \"V\");\n\t\t$clientlist = new ilClientList($this->setup->db_connections);\n//$this->setup->getClient()->setSetting(\"zzz\", \"W\");\n\t\t$list = $clientlist->getClients();\n//$this->setup->getClient()->setSetting(\"zzz\", \"X\");\n\t\tif (count($list) == 1)\n\t\t{\n\t\t\t$this->setup->ini->setVariable(\"clients\",\"default\",$this->setup->getClient()->getId());\n\t\t\t$this->setup->ini->write();\n\n\t\t\t$this->setup->getClient()->ini->setVariable(\"client\",\"access\",1);\n\t\t\t$this->setup->getClient()->ini->write();\n\t\t}\n//$this->setup->getClient()->setSetting(\"zzz\", \"Y\");\n\t\treturn true;\n\t}",
"public function verifyHost() {\n $this->_do_not_verify_host = FALSE;\n return $this;\n }",
"public function run()\n {\n Server::create([\"url\" => \"http://server1\"]);\n Server::create([\"url\" => \"http://server2\"]);\n\n //http status\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"http://test.theideamonitoring.com/get/200\",\n \"type\" => \"http\",\n \"response\" => 200,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"http://test.theideamonitoring.com/get/301\",\n \"type\" => \"http\",\n \"response\" => 301,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"http://test.theideamonitoring.com/get/404\",\n \"type\" => \"http\",\n \"response\" => 404,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"http://test.theideamonitoring.com/get/500\",\n \"type\" => \"http\",\n \"response\" => 500,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n //https status\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"https://test.theideamonitoring.com/get/200\",\n \"type\" => \"http\",\n \"response\" => 200,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"https://test.theideamonitoring.com/get/301\",\n \"type\" => \"http\",\n \"response\" => 301,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"https://test.theideamonitoring.com/get/404\",\n \"type\" => \"http\",\n \"response\" => 404,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"https://test.theideamonitoring.com/get/500\",\n \"type\" => \"http\",\n \"response\" => 500,\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n //http string\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"http://test.theideamonitoring.com/get/string1\",\n \"type\" => \"string\",\n \"response\" => \"string1\",\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"http://test.theideamonitoring.com/get/string2\",\n \"type\" => \"string\",\n \"response\" => \"string2\",\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n //https string\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"https://test.theideamonitoring.com/get/string1\",\n \"type\" => \"string\",\n \"response\" => \"string1\",\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n\n Site::create([\n \"user_id\" => 1,\n \"url\" => \"https://test.theideamonitoring.com/get/string2\",\n \"type\" => \"string\",\n \"response\" => \"string2\",\n \"email\" => \"[email protected]\",\n ])->checks()->create();\n }",
"public function check(): void\n {\n $headers = Helper::getHeaders();\n $hash = $headers['m-hash'] ?? null;\n $version = $headers['m-version'] ?? null;\n $time = $headers['m-time'] ?? null;\n $random = $headers['m-random'] ?? null;\n L::d('M-HASH: ' . $hash);\n L::d('M-VERSION: ' . $version);\n L::d('M-TIME: ' . $time);\n L::d('M-RANDOM: ' . $random);\n\n \\Mirage\\Libs\\RequestHash::setKey(Config::get('app.security.'));\n \\App\\Libs\\Hash::check($hash, $version, $time, $random);\n }",
"function check_server_name ($server,$dbh)\n{\n$check = $dbh->prepare('SELECT * FROM `servers` WHERE `server_name` = :server_name');\n$check->bindParam(':server_name', $server);\n$check->execute();\n$count = $check->rowCount();\nif ($count != \"0\")\n{\n\t$result = $check->fetch(PDO::FETCH_ASSOC);\n\treturn $result;\n} \n}",
"function check(){\n\t\tif(empty($this->PRIVATE_KEY)){throw new Exception(\"Private Key not set\", 2)}\n\n\t\t// Ensure we have all required data\n\t\t$this->auto_detect_fields();\n\n\t\t$request_url = sprintf(\"%s?secret=%s&response=%s&remoteip=%s\",\n\t\t\t$this->VERIFY_URL,\n\t\t\t$this->PRIVATE_KEY,\n\t\t\t$this->RESPONSE,\n\t\t\t$this->REMOTE_ADDRESS\n\t\t);\n\n\t\t//Do it!\n\t\tif($this->USE_CURL){\n\t\t\t// Use CURL\n\t\t\t$this->RESULT = $this->get_json_curl($request_url);\n\t\t}\n\t\telse {\n\t\t\t// Use Built-in PHP fopen() functions\n\t\t\t$this->RESULT = $this->get_json_fopen($request_url);\n\t\t}\n\t\t$this->RESULT = json_decode($this->RESULT, true);\n\t}",
"function validate_email($email){\n $mailparts=explode(\"@\",$email);\n $hostname = $mailparts[1];\n\n // validate email address syntax\n $exp = \"^[a-z\\'0-9]+([._-][a-z\\'0-9]+)*@([a-z0-9]+([._-][a-z0-9]+))+$\";\n $b_valid_syntax=eregi($exp, $email);\n\n // get mx addresses by getmxrr\n if(function_exists('getmxrr')){\n $b_mx_avail=getmxrr( $hostname, $mx_records, $mx_weight );\n }else{\n $b_mx_avail=getmxrrA($hostname, $mx_records, $mx_weight);\n }\n $b_server_found=0;\n\n if($b_valid_syntax && $b_mx_avail){\n // copy mx records and weight into array $mxs\n $mxs=array();\n\n for($i=0;$i<count($mx_records);$i++){\n $mxs[$mx_weight[$i]]=$mx_records[$i];\n }\n\n // sort array mxs to get servers with highest prio\n ksort ($mxs, SORT_NUMERIC );\n reset ($mxs);\n\n while (list ($mx_weight, $mx_host) = each ($mxs) ) {\n if($b_server_found == 0){\n\n //try connection on port 25\n $fp = @fsockopen($mx_host,25, $errno, $errstr, 2);\n if($fp){\n $ms_resp=\"\";\n // say HELO to mailserver\n $ms_resp.=send_command($fp, \"HELO microsoft.com\");\n\n // initialize sending mail\n $ms_resp.=send_command($fp, \"MAIL FROM:<[email protected]>\");\n\n // try receipent address, will return 250 when ok..\n $rcpt_text=send_command($fp, \"RCPT TO:<\".$email.\">\");\n $ms_resp.=$rcpt_text;\n\n if(substr( $rcpt_text, 0, 3) == \"250\")\n $b_server_found=1;\n\n // quit mail server connection\n $ms_resp.=send_command($fp, \"QUIT\");\n\n fclose($fp);\n\n }\n\n }\n }\n }\n return $b_server_found;\n}",
"public function serverOnline()\n {\n return @fsockopen( setting('server.ip', '127.0.0.1'), config( 'pw-api.ports.client' ), $errCode, $errStr, 1 ) ? TRUE : FALSE;\n }",
"private function isValidIPN($data)\n\t{\n\t\t// 1. Check valid host\n\t\t$validIps = array();\n\n\t\tforeach ($this->validHosts as $validHost)\n\t\t{\n\t\t\t// Returns a list of IPv4 addresses to which the Internet host specified by hostname resolves.\n\t\t\t$ips = gethostbynamel($validHost);\n\n\t\t\tif ($ips !== false)\n\t\t\t{\n\t\t\t\t$validIps = array_merge($validIps, $ips);\n\t\t\t}\n\t\t}\n\n\t\t$validIps = array_unique($validIps);\n\n\t\tif (!in_array($_SERVER['REMOTE_ADDR'], $validIps))\n\t\t{\n\t\t\t// Return false;\n\t\t}\n\n\t\t// 2. Check signature\n\t\t// Build returnString from 'm_payment_id' onwards and exclude 'signature'\n\t\tforeach ($data as $key => $val)\n\t\t{\n\t\t\tif ($key == 'm_payment_id')\n\t\t\t{\n\t\t\t\t$returnString = '';\n\t\t\t}\n\n\t\t\tif (!isset($returnString))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($key == 'signature')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$returnString .= $key . '=' . urlencode($val) . '&';\n\t\t}\n\n\t\t$returnString = substr($returnString, 0, -1);\n\n\t\tif (md5($returnString) != $data['signature'])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// 3. Call PayFast server for validity check\n\t\t$header = \"POST /eng/query/validate HTTP/1.0\\r\\n\";\n\t\t$header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n\t\t$header .= \"Content-Length: \" . strlen($returnString) . \"\\r\\n\\r\\n\";\n\n\t\t// Connect to server\n\t\t$fp = fsockopen($this->getCallbackURL(), 443, $errno, $errstr, 10);\n\n\t\tif (!$fp)\n\t\t{\n\t\t\t// HTTP ERROR\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Send command to server\n\t\t\tfputs($fp, $header . $returnString);\n\n\t\t\t// Read the response from the server\n\t\t\twhile (! feof($fp))\n\t\t\t{\n\t\t\t\t$res = fgets($fp, 1024);\n\n\t\t\t\tif (strcmp($res, \"VALID\") == 0)\n\t\t\t\t{\n\t\t\t\t\tfclose($fp);\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfclose($fp);\n\n\t\treturn false;\n\t}",
"function isVerified(){\n\n}",
"private function site_status_check() {\n\t\t$this->level = 4;\n\t\tEE::log( 'Checking and verifying site-up status. This may take some time.' );\n\t\t$httpcode = '000';\n\t\t$ch = curl_init( $this->site_name );\n\t\tcurl_setopt( $ch, CURLOPT_HEADER, true );\n\t\tcurl_setopt( $ch, CURLOPT_NOBODY, true );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT, 10 );\n\n\t\t$i = 0;\n\t\ttry {\n\t\t\twhile ( 200 !== $httpcode && 302 !== $httpcode ) {\n\t\t\t\tcurl_exec( $ch );\n\t\t\t\t$httpcode = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\t\t\t\techo '.';\n\t\t\t\tsleep( 2 );\n\t\t\t\tif ( $i ++ > 60 ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( 200 !== $httpcode && 302 !== $httpcode ) {\n\t\t\t\tthrow new Exception( 'Problem connecting to site!' );\n\t\t\t}\n\t\t}\n\t\tcatch ( Exception $e ) {\n\t\t\t$this->catch_clean( $e );\n\t\t}\n\n\t}",
"function is_verified()\n {\n return false;\n }",
"public function getServer();",
"public function getServer();",
"private function verifyHealthCheck(): bool\n {\n $service = $this->httpService;\n\n // Verify that the service is up.\n $tries = 0;\n $maxTries = $this->config->getHealthCheckTimeout();\n $retrySec = $this->config->getHealthCheckRetrySec();\n do {\n ++$tries;\n\n try {\n return $service->healthCheck();\n } catch (ConnectionException $e) {\n \\usleep(intval(round($retrySec * 1000000)));\n }\n } while ($tries <= $maxTries);\n\n throw new HealthCheckFailedException(\"Failed to make connection to Mock Server in {$maxTries} attempts.\");\n }",
"public function isVerified();",
"function getServerInfo();",
"protected function auth() {\r\n\t\tfputs ( $this->conn, 'HELO ' . $this->localhost . $this->newline );\r\n\t\t$this->getServerResponse ();\r\n\t\tif ($this->secure == 'tls') {\r\n\t\t\tfputs ( $this->conn, 'STARTTLS' . $this->newline );\r\n\t\t\tif (substr ( $this->getServerResponse (), 0, 3 ) != '220') {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tstream_socket_enable_crypto ( $this->conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT );\r\n\t\t\tfputs ( $this->conn, 'HELO ' . $this->localhost . $this->newline );\r\n\t\t\tif (substr ( $this->getServerResponse (), 0, 3 ) != '250') {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($this->server != 'localhost') {\r\n\t\t\tfputs ( $this->conn, 'AUTH LOGIN' . $this->newline );\r\n\t\t\tif (substr ( $this->getServerResponse (), 0, 3 ) != '334') {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tfputs ( $this->conn, base64_encode ( $this->username ) . $this->newline );\r\n\t\t\tif (substr ( $this->getServerResponse (), 0, 3 ) != '334') {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tfputs ( $this->conn, base64_encode ( $this->password ) . $this->newline );\r\n\t\t\tif (substr ( $this->getServerResponse (), 0, 3 ) != '235') {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public function isTrustedServer($url) {\n\t\treturn $this->dbHandler->serverExists($url);\n\t}",
"public function actionServerCheck(): Response\n {\n $reqCheck = new \\RequirementsChecker();\n $reqCheck->checkCraft();\n\n $errors = [];\n\n if ($reqCheck->result['summary']['errors'] > 0) {\n foreach ($reqCheck->getResult()['requirements'] as $req) {\n if ($req['failed'] === true) {\n $errors[] = $req['memo'];\n }\n }\n }\n\n if (!empty($errors)) {\n Craft::warning(\"The server doesn't meet Craft's new requirements:\\n - \" . implode(\"\\n - \", $errors), __METHOD__);\n return $this->send([\n 'error' => Craft::t('app', 'The server doesn’t meet Craft’s new requirements:') . ' ' . implode(', ', $errors),\n 'options' => [\n $this->actionOption(Craft::t('app', 'Revert update'), self::ACTION_REVERT),\n $this->actionOption(Craft::t('app', 'Check again'), self::ACTION_SERVER_CHECK),\n ]\n ]);\n }\n\n // Are there any migrations to run?\n $installedHandles = array_keys($this->data['install']);\n $pendingHandles = Craft::$app->getUpdates()->getPendingMigrationHandles();\n\n if (!empty(array_intersect($pendingHandles, $installedHandles))) {\n $backup = Craft::$app->getConfig()->getGeneral()->getBackupOnUpdate();\n return $this->sendNextAction($backup ? self::ACTION_BACKUP : self::ACTION_MIGRATE);\n }\n\n // Nope - we're done!\n return $this->sendFinished();\n }",
"static private function ServerState() {\n $status = exec('illarionctl status');\n if (strpos($status, 'ONLINE') === FALSE) {\n\t\t\tself::$serverstatus = 1;\n\t\t} else {\n\t\t\tself::$serverstatus = 0;\n\t\t}\n\n $status = exec('testctl status');\n\t\tif (strpos($status, 'ONLINE') === FALSE) {\n\t\t\tself::$testserverstatus = 1;\n\t\t} else {\n\t\t\tself::$testserverstatus = 0;\n\t\t}\n\n\t\tself::$debugger = 0;\n\t}",
"private static function verifyRequest()\n {\n if(isset($_SERVER['HTTP_USER_AGENT']) == false)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n if(strlen($_SERVER['HTTP_USER_AGENT']) == 0)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n if(strlen($_SERVER['HTTP_USER_AGENT']) > 624)\n {\n InvalidUserAgentResponse::executeResponse();\n exit();\n }\n\n $UnsupportedRequestMethod = true;\n\n if(strtoupper($_SERVER['REQUEST_METHOD']) == 'GET')\n {\n $UnsupportedRequestMethod = false;\n }\n\n if(strtoupper($_SERVER['REQUEST_METHOD']) == 'POST')\n {\n $UnsupportedRequestMethod = false;\n }\n\n if($UnsupportedRequestMethod)\n {\n UnsupportedVersion::executeResponse();\n exit();\n }\n }",
"protected abstract function doHealthcheck();",
"public function testHttpTestServerAvailable() {\n\t\t$this->assertTrue(\\REQUESTS_TEST_SERVER_HTTP_AVAILABLE);\n\t}",
"function trusted() {\n\t//-----------------------------------------------------------\n\t// Check for trusted host\n\tif(getenv('HTTP_REFERRER')) {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERRER'));\n\t\t} else {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERER'));\n\t\t}\n\tif($ref_url_parts['host'] !== $this->accept_host) {\n\t\treturn false;\n\t\t//print \"ERROR - You do not have permission to access this site remotely.\";\n\t\t//exit;\n\t} else {\n\t\treturn true;\n\t}\n}",
"public function checkConnection()\n {\n try {\n $this->execute('', [], true);\n } catch (\\Exception $e) {\n if ($e->hasResponse()) {\n switch ($e->getResponse()->getStatusCode()) {\n case 403:\n return [\n 'status' => 0,\n 'error' => 'auth_error',\n 'verbose' => 'Check Username and Password/Access Key.'\n ];\n default:\n return [\n 'status' => 0,\n 'error' => 'unknown',\n 'verbose' => 'An unknown error has occurred. Server replied with: ' . $e->getResponse()->getStatusCode()\n ];\n }\n } else {\n return [\n 'status' => 0,\n 'error' => 'conn_error',\n 'verbose' => 'Check CSF or hostname/port.'\n ];\n }\n return false;\n }\n\n return [\n 'status' => 1,\n 'error' => false,\n 'verbose' => 'Everything is working.'\n ];\n }",
"function check_ipn_response() {\n\t\t@ob_clean();\n \t\tif ( ! empty( $_POST ) && $responce = $this->check_ipn_request_is_valid() ) {\n\n\t \t\theader( 'HTTP/1.1 200 OK' );\n\t \tdo_action( \"valid-payu-standard-ipn-request\", $_POST );\n\n\t\t\tif ($responce) {\n\t\t\t\techo $responce;\n\t\t\t\t@ob_flush();\n\t\t\t}\n\n\t\t} else {\n\n\t\t\twp_die( \"PayU IPN Request Failure\" );\n\n \t\t}\n\n\t}",
"private function checkIfOnLocalhost() {\n $whitelist = array(\n '127.0.0.1',\n '::1'\n );\n if(in_array($_SERVER['REMOTE_ADDR'], $whitelist)){\n return;\n } else {\n $this->databaseServerName = getenv('DATABASE_SERVER_NAME');\n $this->databaseUserName = getenv('DATABASE_USERNAME');\n $this->databasePassword = getenv('DATABASE_PASSWORD');\n $this->databaseName = getenv('DATABASE_NAME');\n }\n }",
"private function authenticate() {\n\t\tif ($this->_authenticated || 'SSL' == $this->crypt_type) {\n\t\t\treturn array('is_success' => true);\n\t\t}\n\n\t\t$promptXML = $this->read_data();\n\t\t$prompt = $this->_opsHandler->decode($promptXML);\n\t\tif (isSet($prompt['response_code'])) {\n\t\t\tif ($prompt['response_code'] == 555 ) {\n\t\t\t\t// the ip address from which we are connecting is not accepted\n\t\t\t\treturn array(\n\t\t\t\t\t'is_success'\t=> false,\n\t\t\t\t\t'error'\t\t\t=> $prompt['response_text']\n\t\t\t\t);\n\t\t\t}\n\t\t} else if ( !preg_match('/OpenSRS\\sSERVER/', $prompt['attributes']['sender']) ||\n\t\t\tsubstr($prompt['attributes']['version'],0,3) != 'XML' ) {\n\t\t\treturn array(\n\t\t\t\t'is_success'\t=> false,\n\t\t\t\t'error'\t\t\t=> 'Unrecognized Peer'\n\t\t\t);\n\t\t}\n\n\t\t// first response is server version\n\t\t$cmd = array(\n\t\t\t'protocol' => $this->osrs_protocol,\n\t\t\t'action' => 'check',\n\t\t\t'object' => 'version',\n\t\t\t'attributes' => array(\n\t\t\t\t'sender' => 'OpenSRS CLIENT',\n\t\t\t\t'version' => $this->osrs_version,\n\t\t\t\t'state' => 'ready'\n\t\t\t)\n\t\t);\n\t\t$xmlCMD = $this->_opsHandler->encode($cmd);\n\t\t$this->send_data($xmlCMD);\n\n\t\t$cmd = array(\n\t\t\t'protocol' => $this->osrs_protocol,\n\t\t\t'action' => 'authenticate',\n\t\t\t'object' => 'user',\n\t\t\t'attributes' => array(\n\t\t\t\t'crypt_type' => strtolower($this->crypt_type),\n\t\t\t\t'username' => $this->osrs_username,\n\t\t\t\t'password' => $this->osrs_username\n\t\t\t)\n\t\t);\n\t\t$xmlCMD = $this->_opsHandler->encode($cmd);\n\t\t$this->send_data( $xmlCMD );\n\n\t\t$challenge = $this->read_data();\n\n\t\t // Sanity check to make sure that the osrs_key is all hex values\n $hex_check = ctype_xdigit($this->osrs_key);\n\n // Respond to the challenge with the MD5 checksum of the challenge.\n // ... and PHP's md5() doesn't return binary data, so\n // we need to pack that too\n\n if ($hex_check){\n $this->_CBC = new openSRS_crypt(pack('H*', $this->osrs_key), $this->crypt_type);\n $response = pack('H*',md5($challenge));\n $this->send_data($response);\n\n // Read the server's response to our login attempt (XML)\n $answerXML = $this->read_data();\n $answer = $this->_opsHandler->decode($answerXML);\n\n if (substr($answer['response_code'],0,1)== '2') {\n $this->_authenticated = true;\n return true;\n } else {\n return false;\n }\n } else {\n trigger_error(\"oSRS Error - Please check the osrs_key value in the config file, it contains a non hexidecimal character.\");\n }\n\t}",
"function serverSync() {\n\n\t\t// check server build\n\t\tif (strlen($this->server->build) == 0 ||\n\t\t ($this->server->getGame() == 'MP' && strcmp($this->server->build, MP_BUILD) < 0)) {\n\t\t\ttrigger_error(\"Obsolete server build '\" . $this->server->build . \"' - must be at least '\" . MP_BUILD . \"' !\", E_USER_ERROR);\n\t\t}\n\n\t\t// get server id, login, nickname, zone & packmask\n\t\t$this->server->isrelay = false;\n\t\t$this->server->relaymaster = null;\n\t\t$this->server->relayslist = array();\n\t\t$this->server->gamestate = Server::RACE;\n\t\t$this->server->packmask = '';\n\t\t$this->client->query('GetSystemInfo');\n\t\t$response['system'] = $this->client->getResponse();\n\t\t$this->server->serverlogin = $response['system']['ServerLogin'];\n\n\t\t$this->client->query('GetDetailedPlayerInfo', $this->server->serverlogin);\n\t\t$response['info'] = $this->client->getResponse();\n\t\t$this->server->id = $response['info']['PlayerId'];\n\t\t$this->server->nickname = $response['info']['NickName'];\n\t\t$this->server->zone = substr($response['info']['Path'], 6); // strip 'World|'\n\n\t\t$this->client->query('GetLadderServerLimits');\n\t\t$response['ladder'] = $this->client->getResponse();\n\t\t$this->server->laddermin = $response['ladder']['LadderServerLimitMin'];\n\t\t$this->server->laddermax = $response['ladder']['LadderServerLimitMax'];\n\n\t\t$this->client->query('IsRelayServer');\n\t\t$this->server->isrelay = ($this->client->getResponse() > 0);\n\t\tif ($this->server->isrelay) {\n\t\t\t$this->client->query('GetMainServerPlayerInfo', 1);\n\t\t\t$this->server->relaymaster = $this->client->getResponse();\n\t\t}\n\n\t\t// get MP packmask\n\t\t$this->client->query('GetServerPackMask');\n\t\t$this->server->packmask = $this->client->getResponse();\n\n\t\t// clear possible leftover ManiaLinks\n\t\t$this->client->query('SendHideManialinkPage');\n\n\t\t// get mode & limits\n\t\t$this->client->query('GetCurrentGameInfo', 1);\n\t\t$response['gameinfo'] = $this->client->getResponse();\n\t\t$this->server->gameinfo = new Gameinfo($response['gameinfo']);\n\n\t\t// get status\n\t\t$this->client->query('GetStatus');\n\t\t$response['status'] = $this->client->getResponse();\n\t\t$this->currstatus = $response['status']['Code'];\n\n\t\t// get game & mapdir\n\t\t$this->client->query('GameDataDirectory');\n\t\t$this->server->gamedir = $this->client->getResponse();\n\t\t$this->client->query('GetTracksDirectory');\n\t\t$this->server->mapdir = $this->client->getResponse();\n\n\t\t// get server name & options\n\t\t$this->getServerOptions();\n\n\t\t// throw 'synchronisation' event\n\t\t$this->releaseEvent('onSync', null);\n\n\t\t// get current players/servers on the server (hardlimited to 300)\n\t\t$this->client->query('GetPlayerList', 300, 0, 2);\n\t\t$response['playerlist'] = $this->client->getResponse();\n\n\t\t// update players/relays lists\n\t\tif (!empty($response['playerlist'])) {\n\t\t\tforeach ($response['playerlist'] as $player) {\n\t\t\t\t// fake it into thinking it's a connecting player:\n\t\t\t\t// it gets team & ladder info this way & will also throw an\n\t\t\t\t// onPlayerConnect event for players (not relays) to all plugins\n\t\t\t\t$this->playerConnect(array($player['Login'], ''));\n\t\t\t}\n\t\t}\n\t}",
"public function testHostName1()\n {\n $configStub = $this->createMock(ReCaptchaConfigV2::class);\n\n // Configure the stub.\n $configStub->method('isServiceEnabled')\n ->willReturn(true);\n\n $testJson = '{ \"success\": true, \"challenge_ts\": \"2018-12-25T03:35:32Z\", \"hostname\": \"ryandeng.test\"}';\n\n $configStub->method('getHostName')\n ->willReturn('wrong.test');\n\n $clientStub = $this->createMock(GuzzleRequestClient::class);\n $clientStub->method('post')\n ->willReturn($testJson);\n\n $_service = new GoogleReCaptchaV2Service($configStub, $clientStub);\n $service = new GoogleReCaptchaV2($_service);\n\n $response = $service->verifyResponse('test response');\n\n $this->assertEquals(false, $response->isSuccess());\n $this->assertEquals(GoogleReCaptchaV2Response::ERROR_HOSTNAME, $response->getMessage());\n }",
"private function testMirrors(){\n \n while(list($idx,$val)= each($this->t_mirrors)){\n\t\tif(!$this->ping(str_replace(\"http://\", \"\", $this->t_mirrors[$idx]), 80, 10)){\n unset($this->t_mirrors[$idx]);\n }else{\n $mirInUse=array();\n $mirInUse[]=$this->t_mirrors[$idx];\n $this->t_mirrors=$mirInUse;\n //var_dump($this->t_mirrors);\n return;\n }\n }\n }",
"public function check();",
"public function check();",
"public function check();",
"public function check();"
] | [
"0.6924042",
"0.6466196",
"0.64203787",
"0.62792754",
"0.6261519",
"0.6218729",
"0.62069523",
"0.6198868",
"0.6154444",
"0.613663",
"0.6135786",
"0.6121536",
"0.6089927",
"0.60722715",
"0.6068541",
"0.60578424",
"0.604278",
"0.60378945",
"0.60188663",
"0.6007247",
"0.5997241",
"0.5996901",
"0.59287465",
"0.5911457",
"0.5910845",
"0.590814",
"0.5908068",
"0.59042954",
"0.5899738",
"0.58911896",
"0.5877486",
"0.5824541",
"0.57950276",
"0.5793818",
"0.5765985",
"0.5765762",
"0.5747707",
"0.5746434",
"0.57345474",
"0.57256234",
"0.57229674",
"0.5718698",
"0.57119215",
"0.5704265",
"0.5704265",
"0.5699932",
"0.5685096",
"0.56830704",
"0.56777453",
"0.5675578",
"0.56717765",
"0.56565696",
"0.56472164",
"0.5627084",
"0.5621772",
"0.56216586",
"0.56197274",
"0.56134075",
"0.5608306",
"0.5601502",
"0.55984354",
"0.5592442",
"0.5589033",
"0.5576087",
"0.55681777",
"0.5556578",
"0.5554195",
"0.5544365",
"0.554028",
"0.5534592",
"0.55322915",
"0.5499746",
"0.54918885",
"0.5486906",
"0.545751",
"0.5448194",
"0.5446162",
"0.5446162",
"0.54397833",
"0.5437176",
"0.54303473",
"0.5429777",
"0.54296273",
"0.5425768",
"0.54241586",
"0.5423946",
"0.54221547",
"0.5415653",
"0.54063046",
"0.54062134",
"0.5403778",
"0.54022384",
"0.5396736",
"0.53906864",
"0.5388954",
"0.5380675",
"0.5379937",
"0.5379937",
"0.5379937",
"0.5379937"
] | 0.5420215 | 87 |
used to sanitize servers | function doMkServer ($string)
{
return preg_replace ('/[^a-z0-9\-_]/i', '', trim (substr ($string, 0, 21)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function sanitize() {}",
"abstract public function sanitize();",
"public function sanitize() {\n }",
"protected function checkTrustedHostPattern() {}",
"public function cleanHost() {\r\n\t\t$this->host = preg_replace('/^\\/+|\\/+$/', '', $this->host);\r\n\t}",
"private function sanitizeServer($server)\n {\n $server[\"public_directory\"] = trim($server[\"public_directory\"]);\n $server[\"public_directory\"] = trim($server[\"public_directory\"], DIRECTORY_SEPARATOR);\n\n return $server;\n }",
"public function sanitize() {\n\n\t\t// load the tool that we want to use in the xss filtering process\n\t\t$this->loadTool();\n\n\t\tif (is_array($_GET) AND count($_GET) > 0) {\n\n\t\t\t$_GET = $this->clean_input_data($_GET);\n\t\t}\n\t\tif (is_array($_POST) AND count($_POST) > 0) {\n\n\t\t\t$_POST = $this->clean_input_data($_POST);\n\t\t}\n\t\tif (is_array($_COOKIE) AND count($_COOKIE) > 0) {\n\n\t\t\t$_COOKIE = $this->clean_input_data($_COOKIE);\n\t\t}\n\t\tif (is_array($_FILES) AND count($_FILES) > 0) {\n\n\t\t\t//$_FILES = $this->clean_input_data($_FILES, true);\n\t\t}\n\n\t}",
"protected function adjustTrustedHostsPatternIfNeeded() {}",
"public function clean_server_data(string $key)\n {\n }",
"public abstract function sanitize($string);",
"public function __sanitise() { $this->username = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $hashed_password = password_hash($password, PASSWORD_BCRYPT);\n $this->email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_SPECIAL_CHARS);\n $this->usertype = filter_input(INPUT_POST, 'lib_code', FILTER_SANITIZE_SPECIAL_CHARS);\n }",
"function sanitizeEmail() {\n $pattern = \"/^[A-Z0-9._%+\\-]+@[A-Z0-9.\\-]+\\.[A-Z]{2,}$/i\";\n if (preg_match($pattern, $this->email)) {\n $this->email = filter_var($this->email, FILTER_SANITIZE_EMAIL);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"public function it_can_be_sanitized()\n {\n $this->markTestSkipped('Sanitization is not implemented yet.');\n }",
"public function sanitize()\n {\n return false;\n }",
"public function sanitize()\n {\n return false;\n }",
"public function sanitize()\n {\n return false;\n }",
"function filter_xss_bad_protocol($string) {\n return check_plain(kc_strip_dangerous_protocols($string));\n}",
"private static function sanitize(){\n $_SERVER[\"PHP_AUTH_USER\"] = filter_var(filter_var($_SERVER[\"PHP_AUTH_USER\"], FILTER_SANITIZE_EMAIL), FILTER_VALIDATE_EMAIL);\n\n\t\tif (!$_SERVER[\"PHP_AUTH_USER\"]){\n\t\t\t// if email validation has failed\n\t\t\tthrow new UsernameNotAValidEmailAddress (\"Submitted UserName is not a valid email address\");\n\t\t}\n\n // sanitise POST data UserName\n Connection::$input['UserName'] = $_SERVER[\"PHP_AUTH_USER\"]; // This should never be sent in the post variables, instead, username should be sent in the header.\n Connection::$input['Password'] = $_SERVER[\"PHP_AUTH_PW\"]; // This also prevents UserName being updated.\n // A new password may be (in the future) sent via POST, but for now, this should not be updatable through this method.\n\n }",
"public function sanitizeLocalUrlInvalidDataProvider() {}",
"private function normaliseHost() {\n if (isset($this->parts['host'])) {\n $asciiHost = trim(strtolower(\\Etechnika\\IdnaConvert\\IdnaConvert::encodeString($this->parts['host']->get()))); \n $this->parts['host']->set($asciiHost);\n }\n }",
"public function sanitize( $input ) {\n }",
"public function sanitize($value)\n {\n }",
"function sanitizeString($var)\n{\nglobal $connection;\n$var = strip_tags($var);\n$var = htmlentities($var);\n$var = stripslashes($var);\nreturn $connection->real_escape_string($var);\n}",
"function wp_fix_server_vars()\n {\n }",
"public function sanitizeLocalUrlValidUrlsDataProvider() {}",
"function minify(){\n return $_SERVER['REMOTE_ADDR']=='127.0.0.1' || $_SERVER['REMOTE_ADDR']=='192.168.1.111' ? '' : \"\";\n}",
"function isValidServer ($string)\n{\n return (preg_match ('/[^a-z0-9\\-_]/i', $string) ? 0 : 1);\n}",
"function okcomputer($allowed) {\n\n $allowed_hosts = array($allowed);\n if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $allowed_hosts)) {\n header($_SERVER['SERVER_PROTOCOL'].' 400 Bad Request');\n exit;\n }\n}",
"public function sanitize(string $input)\n {\n }",
"public function sanitize()\n {\n parent::sanitize();\n\n foreach ($this->_cleanData as $key => $value) {\n $this->_cleanData[$key] = strip_tags($value);\n }\n }",
"public function sanitizeFreeText()\n {\n $this->label = AdapterUtil::reencode($this->label);\n $this->street = AdapterUtil::reencode($this->street);\n $this->locality = AdapterUtil::reencode($this->locality);\n $this->region = AdapterUtil::reencode($this->region);\n $this->country = AdapterUtil::reencode($this->country);\n }",
"function sanitizeDBData($input) {\n $halfSan = filter_var($input, FILTER_SANITIZE_EMAIL);\n\n //sets slashes infront of \" ' and \\\n $output = filter_var($halfSan, FILTER_SANITIZE_MAGIC_QUOTES);\n\n return $output;\n}",
"public function sanitize(){\r\n\t\t$post = array();\r\n\t\tforeach($_POST as $key => $val){\r\n\t\t\tif(!get_magic_quotes_gpc()){\r\n\t\t\t\t$post[$key] = mysql_real_escape_string($val);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $post;\r\n\t}",
"function sanitize ($data, $type) {\n if($type == 1){\n for($i = 0; $i < count($data); $i++) {\n $data[$i] = (string)$data[$i]; //ensure is string$\n $data[$i] = preg_replace(\"/[^a-zA-Z0-9 .!\\/]*/\",\"\", $data[$i]); //remove any characters that are not a-z, A-Z, 0-9...\n $data[$i] = substr($data[$i], 0, 20);//restrict length to 20 characters\n $data[$i] = htmlentities($data[$i], ENT_QUOTES, 'utf-8');\n $data[$i] = filter_var($data[$i], FILTER_SANITIZE_STRING);\n }\n //username must be longer than 5 \n //password must be 8 characters or more\n\n if(strlen($data[0]) < 5 || strlen($data[1]) < 8) {\n return false;\n }\n else {\n return $data;\n }\n }\n}",
"function sanitation($postVal){\n\t$rawinfo= $postVal;\n\t$removeSpecial = htmlspecialchars($rawinfo);\n\t$finalForm = escapeshellcmd($removeSpecial);\n\treturn $finalForm;\n}",
"function sanitize($data){\r\n\t\t\t$data=stripslashes($data); // Remove all slashses\r\n\t\t\t$data=strip_tags($data); //Remove all tags\r\n\t\t\treturn $data;\r\n\t\t}",
"public function sanitize($value);",
"function sanitize($data)\n{\n$data = trim($data);\n \n// apply stripslashes if magic_quotes_gpc is enabled\nif(get_magic_quotes_gpc())\n{\n$data = stripslashes($data);\n}\n \n// a mySQL connection is required before using this function\n$data = mysql_real_escape_string($data);\n \nreturn $data;\n}",
"private static function stripIllegalChars()\n {\n $input_arr = array();\n foreach ($_POST as $key => $input_arr)\n {\n $_POST[$key] = preg_replace(\"/[^a-zA-Z0-9\\s!@#$%&*()_\\-=+?.,:\\/]/\", \"\", $input_arr);\n }\n }",
"public function sanitize()\n {\n $purifier = $this->_purifier;\n $this->_sanitized_data = array_map(\n function ($field) use ($purifier) {\n return $purifier->purify($field);\n },\n $this->_data\n );\n }",
"function sanitizeData_hard($var)\n\t{\n\t\t$var = trim($var); // gets rid of white space\n\t\t$var = stripslashes($var); // no slashes protecting stuff\n\t\t$var = htmlentities($var); // no html :-(\n\t\t$var = strip_tags($var); // no tags\n\t\treturn $var; //returns clean data\n\t}",
"function sanitize_validate_input($data){\n\t\t \t \t$data = filter_var($data, FILTER_SANITIZE_STRING);\n\t\t \t \t//$data = filter_var($data, FILTER_VALIDATE_EMAIL);\n\t\t \t \t$data = stripcslashes($data);\n\t\t \t \t$data = trim($data);\n\t\t \t \t$data = htmlspecialchars($data);\n\t\t \t \t\n\t\t \t \treturn $data; }",
"public function sanitize($matches) {}",
"protected function serverHostname()\n {\n }",
"public static function badHostNameProvider()\n {\n return array(\n\t\t\tarray(''),\n array('local host'),\n array('local_host'),\n array('foo%bar'),\n array('[email protected]'),\n array('שטוייעס.com'),\n array('--dot.com'),\n array('local/host'),\n array('http://') \n );\n }",
"function sanitization() {\n genesis_add_option_filter( 'one_zero', GENESIS_SIMPLE_SETTINGS_FIELD,\n array(\n\n ) );\n genesis_add_option_filter( 'no_html', GENESIS_SIMPLE_SETTINGS_FIELD,\n array(\n\n ) );\n }",
"private function sniff_ip() {\n\n\t\tif ( $this->ip_data ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( PHP_SAPI === 'cli' ) {\n\t\t\t$this->ip_data = [ '127.0.0.1', 'CLI' ];\n\n\t\t\treturn;\n\t\t}\n\n\t\t$ip_server_keys = [ 'REMOTE_ADDR' => '', 'HTTP_CLIENT_IP' => '', 'HTTP_X_FORWARDED_FOR' => '', ];\n\t\t$ips = array_intersect_key( $_SERVER, $ip_server_keys );\n\t\t$this->ip_data = $ips ? [ reset( $ips ), key( $ips ) ] : [ '0.0.0.0', 'Hidden IP' ];\n\t}",
"function sanitizePassword() {\n // If there is a password confirmation we put it to the checker, too\n $passCheckerInput = (strlen($this->passwordConf) > 0) ?\n array($this->password, $this->passwordConf) : $this->password;\n $passwordChecker = new PasswordChecker($passCheckerInput);\n if ($passwordChecker->getRelevance()) {\n $this->password = htmlspecialchars($this->password);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function trusted() {\n\t//-----------------------------------------------------------\n\t// Check for trusted host\n\tif(getenv('HTTP_REFERRER')) {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERRER'));\n\t\t} else {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERER'));\n\t\t}\n\tif($ref_url_parts['host'] !== $this->accept_host) {\n\t\treturn false;\n\t\t//print \"ERROR - You do not have permission to access this site remotely.\";\n\t\t//exit;\n\t} else {\n\t\treturn true;\n\t}\n}",
"protected static function _normalize_resource( $resource ) {\r\n\r\n if( self::$_config['debug'] ) {\r\n error_log(\"Normalize1: $resource\");\r\n }\r\n $h = $_SERVER['HTTP_HOST'];\r\n $r = $_SERVER['REMOTE_ADDR'];\r\n $s = $_SERVER['SERVER_NAME'];\r\n $d = $_SERVER['DOCUMENT_ROOT'];\r\n\r\n if( self::$_config['strip_get_request'] ) {\r\n # http://stackoverflow.com/questions/1251582/beautiful-way-to-remove-get-variables-with-php\r\n $resource = strtok($resource, '?'); \r\n\r\n if( self::$_config['debug'] ) {\r\n error_log(\"Normalize2: $resource\");\r\n } \r\n }\r\n\r\n $p = \"/.*$h/\";\r\n $resource = preg_replace( $p, $d, $resource );\r\n $p = str_replace( $s, $r, $p);\r\n $resource = preg_replace( $p, $d, $resource );\r\n\r\n return $resource;\r\n }",
"function normalizeContent($content,$client){\n\t\n}",
"function sanitize($bad){\r\n\t\t\t$bad = stripslashes($bad);\r\n\t\t\t$bad = strip_tags($bad);\r\n\t\t\t$good = htmlentities($bad);\r\n\t\t\treturn $good;\r\n\t\t}",
"function sanitize_string_xss(string $data): string\n{\n return filter_var($data, FILTER_SANITIZE_STRING);\n}",
"function indieauth_allow_localhost( $r, $url ) {\n\t$r['reject_unsafe_urls'] = false;\n\n\treturn $r;\n}",
"function sanitizeParams()\n{\n $array = array();\n $str = '';\n $frontParam = '';\n\n // REQUEST_URI of $_SERVER\n $str =& $_SERVER[\"REQUEST_URI\"];\n serverStringToArray($str, $array, $frontParam);\n sanitizeArray($array);\n arrayToServerString($array, $frontParam, $str);\n\n // QUERY_STRING of $_SERVER\n unset($str);\n $str =& $_SERVER[\"QUERY_STRING\"];\n serverStringToArray($str, $array, $frontParam);\n sanitizeArray($array);\n arrayToServerString($array, $frontParam, $str);\n\n // $_GET\n convArrayForSanitizing($_GET, $array);\n sanitizeArray($array);\n revertArrayForSanitizing($array, $_GET);\n\n // $_REQUEST (only GET param)\n convArrayForSanitizing($_REQUEST, $array);\n sanitizeArray($array);\n revertArrayForSanitizing($array, $_REQUEST);\n}",
"public function sanitize($value)\n\t{\n\t\treturn filter_var($value, FILTER_SANITIZE_STRING);\n\t}",
"public function sanitize_option( $input ) {\n\t\t$options = array(\n\t\t\t'hostname',\n\t\t);\n\n\t\tforeach ( $options as $option ) {\n\t\t\tif ( isset( $input[ $option ] ) ) {\n\t\t\t\t$input[ $option ] = sanitize_text_field( $input[ $option ] );\n\t\t\t}\n\t\t}\n\n\t\treturn $input;\n\t}",
"function hash_mysql_sanitize($pdata){\n\t\nif( isset($pdata) ){\n\n\t//make sure that $pdata is cleaned. put this in a header.\n\tforeach( $pdata as $key => $value ){\n\t\t//clean up!\n\t\tmysql_real_escape_string($value);\n\t}\n}\n\nreturn $pdata;\n}",
"function _xss_sanitization_esc_url( $url, $_context = 'display' ) {\n\n // URL protocols\n $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');\n \n // Init\n $original_url = $url;\n \n // If blank, then no harm\n if ( '' == $url ) {\n return $url;\n }\n\n //Start cleaning\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n \n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = wp_deep_replace($strip, $url);\n\n // Make sure its not a ;//\n $url = str_replace(';//', '://', $url);\n \n /* If the URL doesn't appear to contain a scheme, we\n * presume it needs http:// appended (unless a relative\n * link starting with /, # or ? or a php file).\n */\n if ( strpos($url, ':') === false && \n ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n ! preg_match('/^[a-z0-9-]+?\\.php/i', $url) \n ){\n $url = 'http://' . $url;\n }\n\n // Replace ampersands and single quotes only when displaying.\n if ( 'display' == $_context ) {\n $url = kses_normalize_entities( $url );\n $url = str_replace( '&', '&', $url );\n $url = str_replace( \"'\", ''', $url );\n }\n\n if ( kses_bad_protocol( $url, $protocols ) != $url ){\n return '';\n }\n\n return $url;\n}",
"function sanitizeName() {\n $pattern = \"/[0-9`!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?~]/\";\n if (!preg_match($pattern, $this->fname) && !preg_match($pattern, $this->lname)) {\n $this->fname = trim($this->fname);\n $this->lname = trim($this->lname);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function sanitize($data){\r\n $conn = db ();\r\n return mysqli_real_escape_string($conn, $data);\r\n}",
"function sanitizeString($str){\n\t\tif(get_magic_quotes_gpc()) $str = stripslashes($str);\t\n\t\t$str= htmlentities($str);\n\t\t$str=strip_tags($str);\n\t\treturn $str;\n\t}",
"public function sanitiseData(): void\n {\n $this->firstLine = self::sanitiseString($this->firstLine);\n self::validateExistsAndLength($this->firstLine, 1000);\n $this->secondLine = self::sanitiseString($this->secondLine);\n self::validateExistsAndLength($this->secondLine, 1000);\n $this->town = self::sanitiseString($this->town);\n self::validateExistsAndLength($this->town, 255);\n $this->postcode = self::sanitiseString($this->postcode);\n self::validateExistsAndLength($this->postcode, 10);\n $this->county = self::sanitiseString($this->county);\n self::validateExistsAndLength($this->county, 255);\n $this->country = self::sanitiseString($this->country);\n self::validateExistsAndLength($this->country, 255);\n }",
"public function sanitize_input_fields()\n {\n }",
"function sanitize(){\r\n\t\t $outar = Array();\r\n \t $arg_list = func_get_args();\r\n\t\t foreach($arg_list[0] as $key => $value){\r\n\t\t\t\t $data = $value;\r\n\t\t\t\t $data = PREG_REPLACE(\"/[^0-9a-zA-Z]/i\", '', $data);\r\n\t\t\t\t array_push($outar,$data);\r\n\t\t }\r\n\t\treturn $outar;\r\n\t }",
"function sanitize_input($data) { \r\n $data = trim($data); \r\n $data = stripslashes($data); \r\n $data = htmlspecialchars($data); \r\n return $data; \r\n }",
"function sanitizeString($str_input) {\r\n $str_input = strip_tags($str_input);\r\n $str_input = htmlentities($str_input);\r\n $str_input = stripslashes($str_input);\r\n return $str_input;\r\n}",
"static private function CheckCorrectHost() {\n\t\tif (count($_POST) > 0) {\n\t\t\treturn;\n\t\t}\n\t\t$correct_host = str_replace('https://', '', self::getURL());\n\n\t\tif ($_SERVER[\"SERVER_NAME\"] !== $correct_host) {\n\t\t\tself::redirect(self::getCurrentURL() . $_SERVER[\"REQUEST_URI\"]);\n\t\t}\n\t}",
"function submission_scrub($value) {\n $bad_things = array('to:','cc:','bcc:','content-type:','mime-version:','multipart-mixed:','content-transfer-encoding:');\n\n // if any of the bad things are in the submission, return an empty string\n foreach ($bad_things as $v) { \n if (stripos($value, $v) !==false)\n return '';\n } \n // replace any newline characters with spaces\n $value = str_replace(array( \"\\r\", \"\\n\", \"%0a\", \"%0d\"), ' ', $value);\n\n // return the value\n return trim($value);\n }",
"protected function _sanitize_globals()\n {\n // Is $_GET data allowed? If not we'll set the $_GET to an empty array\n if ($this->_allow_get_array === FALSE)\n {\n $_GET = array();\n }\n elseif (is_array($_GET) && count($_GET) > 0)\n {\n foreach ($_GET as $key => $val)\n {\n $_GET[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n }\n }\n\n // Clean $_POST Data\n if (is_array($_POST) && count($_POST) > 0)\n {\n foreach ($_POST as $key => $val)\n {\n $_POST[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);\n }\n }\n\n // Clean $_COOKIE Data\n if (is_array($_COOKIE) && count($_COOKIE) > 0)\n {\n // Also get rid of specially treated cookies that might be set by a server\n // or silly application, that are of no use to a CI application anyway\n // but that when present will trip our 'Disallowed Key Characters' alarm\n // http://www.ietf.org/rfc/rfc2109.txt\n // note that the key names below are single quoted strings, and are not PHP variables\n unset(\n $_COOKIE['$Version'],\n $_COOKIE['$Path'],\n $_COOKIE['$Domain']\n );\n\n foreach ($_COOKIE as $key => $val)\n {\n if (($cookie_key = $this->_clean_input_keys($key)) !== FALSE)\n {\n $_COOKIE[$cookie_key] = $this->_clean_input_data($val);\n }\n else\n {\n unset($_COOKIE[$key]);\n }\n }\n }\n\n // Sanitize PHP_SELF\n $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']);\n\n // CSRF Protection check\n if ($this->_enable_csrf === TRUE && ! is_cli())\n {\n $this->security->csrf_verify();\n }\n }",
"protected function getTrustedHostsPatternStatus() {}",
"public function sanitizeLocalUrlValidPathsDataProvider() {}",
"function sanitize($str) {\n return trim(htmlspecialchars($str));\n}",
"function StripValidator ()\n {\n\n $this->params['chars'] = array();\n\n }",
"function str_sanitize($str){\n\t\t global $database;\n\t\t $str = $database->real_escape_string($str);\n\t return trim($str);\t\n}",
"function ts3client_cleanUpConnectionInfo($serverConnectionHandlerID, $clientID) {}",
"function sanitize($str){\n $str = strip_tags($str);//erasing tag or smthg\n $str = rtrim($str);//agadi re pachadi ko space hatauchha\n return $str;\n }",
"function sanitize($input) {\n if (is_array($input)) {\n foreach($input as $var=>$val) {\n $output[$var] = sanitize($val);\n }\n }else{\n if (get_magic_quotes_gpc()) {\n $input = stripslashes($input);\n }\n $input = cleanInput($input);\n $output = mysql_real_escape_string($input);\n }\n return $output;\n}",
"function sanitize_trackback_urls($to_ping)\n {\n }",
"private function __ipWhitelistCheck() {\n $userIp = $_SERVER['REMOTE_ADDR'];\n\n if (! in_array($userIp, $this->ipWhitelist)) {\n header('HTTP/1.0 403 Forbidden');\n die('Your IP address (' . $userIp . ') is not authorized to access this file.');\n }\n }",
"function validate_server($link, $data, $address, $secret_key) // Colorize: green\n { // Colorize: green\n if (get_server_secret_key($link, $data, $address) != $secret_key) // Colorize: green\n { // Colorize: green\n $error_details = \"Access violation\"; // Colorize: green\n error_log($error_details); // Colorize: green\n // Colorize: green\n db_disconnect($link); // Colorize: green\n // Colorize: green\n $data[\"message\"] = \"Access error\"; // Colorize: green\n $data[\"details\"] = $error_details; // Colorize: green\n // Colorize: green\n die(json_encode($data)); // Colorize: green\n } // Colorize: green\n }",
"public function sanitize_query($queries)\n {\n }",
"public function sanitize_query($queries)\n {\n }",
"function sanitize($string) {\n\t//return $string;\n\treturn preg_replace ('/[^\\x{0009}\\x{000a}\\x{000d}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}]+/u', '.', $string);\n}",
"function sanitizeData_lite($var)\n\t{\n\t\t$var = trim($var); // gets rid of white space\n\t\t$var = stripslashes($var); // no slashes protecting stuff\n\t\treturn $var; //returns clean data\n\t}",
"public function server($name='', $xssClean=true) {\n if($name) {\n if(!isset($_SERVER[$name]))\n return null;\n \n if(!$xssClean)\n return $_SERVER[$name];\n \n if(isset($this->server_data[$name]))\n return $this->server_data[$name];\n \n return $this->_server($name);\n }\n else {\n if(!$xssClean)\n return $_SERVER;\n \n foreach($_SERVER as $name => $value)\n $this->_server($name);\n \n return $this->server_data;\n }\n }",
"function sanitize($conn, $val){\n\t\t$val = stripslashes($val);\n\t\t$val = mysqli_real_escape_string($conn, $val);\n\t}",
"function sanitize_username($s) {\n\treturn preg_replace(\"/[^a-zA-Z0-9-_]/\", '', trim($s));\n}",
"function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}",
"function tryServer() {\n\n\tglobal $server, $hostname, $username, $password;\n\tswitch($server) {\n\t\tcase \"Nucleus/4.3 UPnP/1.0 Virata-EmWeb/R6_2_0\": system(\"changers/viking $hostname $username $password\"); exit(0); break;;\n\t\tcase \"RomPager/4.07 UPnP/1.0\": system(\"changers/tplink1 $hostname $username $password\"); exit(0); break;\n\t\tcase \"micro_httpd\": system(\"changers/dlink1 $hostname $username $password\"); exit(0); break;\n\t\tdefault: break;\n\t}\n}",
"function the_champ_sanitize_user($username, $rawUsername, $strict){\r\n\t$username = wp_strip_all_tags($rawUsername);\r\n\t$username = remove_accents($username);\r\n\t$username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);\r\n\t$username = preg_replace('/&.+?;/', '', $username);\r\n\t// If strict, reduce to ASCII and Cyrillic characters for max portability.\r\n\tif($strict){\r\n\t\t$settings = get_option('wscu_settings');\r\n\t\t$username = preg_replace('|[^a-z\\p{Arabic}\\p{Cyrillic}0-9 _.\\-@]|iu', '', $username);\r\n\t}\r\n\t$username = trim($username);\r\n\t// Consolidate contiguous whitespace\r\n\t$username = preg_replace('|\\s+|', ' ', $username);\r\n\r\n\treturn $username;\r\n}",
"function sanitize($data){\n$data=trim($data);\n$data=htmlspecialchars($data);\n$data=mysql_real_escape_string($data);\nreturn $data;\n}",
"function sanitizeInput(&$string){\n $string = $this->connection->real_escape_string($string);\n }",
"function sanitize($dirty){\n return htmlentities($dirty,ENT_QUOTES,\"UTF-8\");\n}",
"function Sanitize_url($url) \n{\n $nurl = filter_var($url, FILTER_SANITIZE_URL);\n return $nurl;\n}",
"function sanitize_string($str)\r\n{\r\n\t$str = strip_tags($str);\r\n $str = htmlentities($str, ENT_QUOTES);\r\n return $str;\r\n}",
"static function sanitizeString($string) {\n\t\t// Végigjárjuk a nem engedélyezett karakter(láncokat) tartalmazó tömböt\n\t\tforeach ( Security_Config::$donotallowstrings as $badstrings ) {\n\t\t\t// Lecsapjuk az üres szóközöket, utána kikapcsoljuk a HTML karaktereket, végül kiszedjük nem kívánatos stringeket\n\t\t\t$string = str_replace ( $badstrings, '', $string );\n\t\t}\n\t\t$string = htmlspecialchars ( trim ( $string ) );\n\t\t// Visszaadjuk az átalakított stringünket.\n\t\treturn $string;\n\t}",
"function sanitize_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}",
"function sanitize_email($email)\n {\n }",
"function sanitize($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}"
] | [
"0.7192558",
"0.6879606",
"0.6834444",
"0.6701929",
"0.6343998",
"0.62193906",
"0.6175546",
"0.6083768",
"0.60797036",
"0.60530293",
"0.60514903",
"0.6007513",
"0.6004167",
"0.59917223",
"0.59917223",
"0.59917223",
"0.59778285",
"0.59696126",
"0.5968869",
"0.59461033",
"0.59219617",
"0.58661145",
"0.5804606",
"0.5804016",
"0.58013695",
"0.5770417",
"0.5768431",
"0.5711086",
"0.571021",
"0.5691502",
"0.5678639",
"0.5671628",
"0.5665212",
"0.5656096",
"0.5654275",
"0.56529105",
"0.5642379",
"0.563499",
"0.55927575",
"0.558826",
"0.55751055",
"0.5561232",
"0.5560173",
"0.5549528",
"0.5541784",
"0.5540139",
"0.552863",
"0.5525431",
"0.5521825",
"0.5517288",
"0.5501369",
"0.5494568",
"0.54695666",
"0.54497117",
"0.54450667",
"0.54248023",
"0.54207146",
"0.5410658",
"0.540224",
"0.5399981",
"0.5397771",
"0.53973675",
"0.5383373",
"0.53830284",
"0.53741455",
"0.53734684",
"0.5373278",
"0.534799",
"0.53411746",
"0.5324079",
"0.53222626",
"0.5296143",
"0.5293338",
"0.52930135",
"0.5290758",
"0.5288417",
"0.5283714",
"0.52833545",
"0.5281681",
"0.5275208",
"0.5271645",
"0.526553",
"0.526553",
"0.52621627",
"0.5260178",
"0.525701",
"0.52546984",
"0.5252418",
"0.52521205",
"0.5252011",
"0.52483946",
"0.52469563",
"0.5245903",
"0.52434635",
"0.52422225",
"0.5241569",
"0.5240141",
"0.5238895",
"0.52371764",
"0.5231421"
] | 0.5702755 | 29 |
used to verify chars | function isValidCharacter ($string)
{
return (preg_match ('/[^a-z0-9\-_:\.=;]/i', $string) ? 0 : 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function checkChars($input) {\n\t\tfor ($i = 0; $i < strlen($input); $i++) {\n\t\t\t$char = ord($input[$i]);\n\t\t\tif(!($char == 32 || ($char >= 97 && $char <= 122) || ($char >= 65 && $char <= 90) || ($char >= 48 && $char <= 57)))\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n\t}",
"function checkChar($ch){\n\t//error code\n\t$res= \"LOGIN_CHECKCHAR_FAILED\";\n\tif(strlen($ch) <= 16 && preg_match ( \"$^[a-zA-Z0-9_]{3,16}$\" , $ch )){\n\t\t$res= NULL;\n\t}\n\treturn $res;\n}",
"public function areCharsCovered($chars) {}",
"public function testCharacterFieldValidation()\n {\n // Field should only allow 50 characters\n $field = $this->table->getField('stringone');\n\n $testStr = str_repeat('x', 56);\n $this->assertEquals(56, strlen($testStr));\n $cleanStr = $field->getPHPValue($testStr);\n $this->assertEquals(50, strlen($cleanStr));\n\n\n $testStr = str_repeat('z', 50);\n\n $fieldVal = $field->getSqlBoundValue($testStr);\n $key = $fieldVal->getValueMarker();\n\n $this->assertEquals($key, $fieldVal->getValueMarker());\n $this->assertEquals($testStr, $fieldVal->getBoundValues()[$key]);\n }",
"public function isCurrentByteRegularCharacter() {}",
"public function testManySpecialCharacter ()\n {\n // Function parameters\n $length = 10;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 6,\n 'digit' => 1,\n 'upper' => 1,\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){1})(?=(?:[^A-Z]*[A-Z]){1})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){6})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }",
"public function authenticationWithValidAsciiSpecialCharClassPassword() {}",
"public function authenticationWithValidAsciiSpecialCharClassPassword() {}",
"public function authenticationWithValidAsciiSpecialCharClassPassword() {}",
"function create_verify_string ()\n{\n\t$validchars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz\";\n\t$verifyString = \"\";\n\tfor( $i = 0; $i < 32; $i++ ) {\n\t\t$char = chr( mt_rand( 0, 255 ) );\n\t\twhile( strpos( $validchars, $char ) == 0 ) {\n\t\t\t$char = chr( mt_rand( 0, 255 ) );\n\t\t}\n\t\t$verifyString .= $char;\n\t}\n\t\n\treturn $verifyString;\n}",
"public function isCharCovered($char, $encoding = 'UTF-16BE') {}",
"static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }",
"static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }",
"protected function check_ascii($input_string)\n {\n }",
"public function CharacterCheck($string=\"\"){\n\t\t if (preg_match('/[\\'^£$%&*0-9()}{@#~?><>,|=_+¬-]/', $string))\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}",
"function anyChar(){\n return satisfy(cnst(true));\n}",
"function PWValidation($x){\n\t$x = str_split($x, 1);\n\t$faultyCheck = TRUE;\n\twhile($faultyCheck) {\n\t\tforeach($x as $eachOne) {\n\t\t\tif((ctype_alpha($eachOne) OR (is_numeric($eachOne)))) {\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$errorMessage = 'Your password must contain only alphanumeric characters';\n\t\t\t\treturn $errorMessage;\n\t\t\t}\n\t\t}\n\t\t$faultyCheck = FALSE;\n\t}\n}",
"function checkpw($pw){\r\n\t\t\t\t\tfor($i = 0; $i <= 9; $i++)\r\n\t\t\t\t\t\tif(strchr($pw, (string)$i ))\r\n\t\t\t\t\t\t\treturn 1;\r\n\t\t\t\t\treturn 0;\r\n\t\t\t\t}",
"function password_check($str)\n\t\t\t{\n\t\t\t\tif(preg_match('/[0-9]/', $str) && preg_match('/[a-zA-Z]/', $str))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t}",
"function validatePassword() : bool\n {\n if($this->Password && preg_match('/^[[:alnum:]]{6,20}$/', $this->Password)) // solo numeri-lettere da 6 a 20\n {\n return true;\n }\n else\n return false;\n }",
"function validateCharsDie(&$text)\n{\n\t$matches = preg_match('/[^-a-z0-9]/', $text);\n\n\tif($matches)\n\t\tdie('Invalid characters specified in input. This could be caused by invalid cookie data, thus it is recommended to clear your cookies.');\n}",
"function mPN_CHARS_U(){\n try {\n // Tokenizer11.g:534:3: ( PN_CHARS_BASE | '_' ) \n // Tokenizer11.g: \n {\n if ( $this->input->LA(1)==$this->getToken('95')||($this->input->LA(1)>=$this->getToken('97') && $this->input->LA(1)<=$this->getToken('122'))||($this->input->LA(1)>=$this->getToken('192') && $this->input->LA(1)<=$this->getToken('214'))||($this->input->LA(1)>=$this->getToken('216') && $this->input->LA(1)<=$this->getToken('246'))||($this->input->LA(1)>=$this->getToken('248') && $this->input->LA(1)<=$this->getToken('767'))||($this->input->LA(1)>=$this->getToken('880') && $this->input->LA(1)<=$this->getToken('893'))||($this->input->LA(1)>=$this->getToken('895') && $this->input->LA(1)<=$this->getToken('8191'))||($this->input->LA(1)>=$this->getToken('8204') && $this->input->LA(1)<=$this->getToken('8205'))||($this->input->LA(1)>=$this->getToken('8304') && $this->input->LA(1)<=$this->getToken('8591'))||($this->input->LA(1)>=$this->getToken('11264') && $this->input->LA(1)<=$this->getToken('12271'))||($this->input->LA(1)>=$this->getToken('12289') && $this->input->LA(1)<=$this->getToken('55295'))||($this->input->LA(1)>=$this->getToken('63744') && $this->input->LA(1)<=$this->getToken('64975'))||($this->input->LA(1)>=$this->getToken('65008') && $this->input->LA(1)<=$this->getToken('65533')) ) {\n $this->input->consume();\n\n }\n else {\n $mse = new MismatchedSetException(null,$this->input);\n $this->recover($mse);\n throw $mse;}\n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"function check_element_validity($key,$opt){\n\n if (preg_match(STARTCHARRGX, $key) === 1 ) { //check first character\n preg_match(STARTCHARRGX,$key,$matches);\n if ($matches[0] == \"_\") {\n return false;\n }\n return true;\n }\n if ( preg_match(INVALIDCHARSRGX, $key) === 1) { //check other chars validity\n return true;\n }\n return false;\n }",
"function isPassCorrect($psw, $psw_repeat){\r\n\t$regex = '/(?:[^`!@#$%^&*\\-_=+\\'\\/.,]*[`!@#$%^&*\\-_=+\\'\\/.,]){2}/';\r\n\tif (strlen($psw) >= 2 && strlen($psw_repeat) <= 255 && $psw == $psw_repeat) {\r\n\t\tif (preg_match($regex, $psw)) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}",
"function specialChar($password)\n{\n $specialChars = array('!', '@', '#', '$', '%', '^', '&', '*', '(', ')');\n foreach ($specialChars as $char) {\n if (strpos($password, $char) != 0) {\n return true;\n }\n }\n return false;\n}",
"function allLegalLetters($pass)\n{\n\n\tif(preg_match('/[iol]/', $pass)) return false;\n\treturn true;\n\n}",
"function is($char) {\n return Satisfy(function($c) use($char){return $c === $char;});\n }",
"public function it_detects_matched_character_classes()\n {\n $this->beConstructedWith($this->configs['partial']);\n $this->shouldThrow(new PasswordValidationException($this->badPasswords['partial']['Aa']))->during('validatePassword', ['Aa']);\n $this->getLastMatches()->shouldReturn('You entered an uppercase letter and a lowercase letter.');\n }",
"public function testValidateSpecialChars(): void\n {\n $this->assertFalse($this->validate('some-text-123'));\n }",
"function mPN_CHARS_BASE(){\n try {\n // Tokenizer11.g:517:3: ( 'a' .. 'z' | '\\\\u00C0' .. '\\\\u00D6' | '\\\\u00D8' .. '\\\\u00F6' | '\\\\u00F8' .. '\\\\u02FF' | '\\\\u0370' .. '\\\\u037D' | '\\\\u037F' .. '\\\\u1FFF' | '\\\\u200C' .. '\\\\u200D' | '\\\\u2070' .. '\\\\u218F' | '\\\\u2C00' .. '\\\\u2FEF' | '\\\\u3001' .. '\\\\uD7FF' | '\\\\uF900' .. '\\\\uFDCF' | '\\\\uFDF0' .. '\\\\uFFFD' ) \n // Tokenizer11.g: \n {\n if ( ($this->input->LA(1)>=$this->getToken('97') && $this->input->LA(1)<=$this->getToken('122'))||($this->input->LA(1)>=$this->getToken('192') && $this->input->LA(1)<=$this->getToken('214'))||($this->input->LA(1)>=$this->getToken('216') && $this->input->LA(1)<=$this->getToken('246'))||($this->input->LA(1)>=$this->getToken('248') && $this->input->LA(1)<=$this->getToken('767'))||($this->input->LA(1)>=$this->getToken('880') && $this->input->LA(1)<=$this->getToken('893'))||($this->input->LA(1)>=$this->getToken('895') && $this->input->LA(1)<=$this->getToken('8191'))||($this->input->LA(1)>=$this->getToken('8204') && $this->input->LA(1)<=$this->getToken('8205'))||($this->input->LA(1)>=$this->getToken('8304') && $this->input->LA(1)<=$this->getToken('8591'))||($this->input->LA(1)>=$this->getToken('11264') && $this->input->LA(1)<=$this->getToken('12271'))||($this->input->LA(1)>=$this->getToken('12289') && $this->input->LA(1)<=$this->getToken('55295'))||($this->input->LA(1)>=$this->getToken('63744') && $this->input->LA(1)<=$this->getToken('64975'))||($this->input->LA(1)>=$this->getToken('65008') && $this->input->LA(1)<=$this->getToken('65533')) ) {\n $this->input->consume();\n\n }\n else {\n $mse = new MismatchedSetException(null,$this->input);\n $this->recover($mse);\n throw $mse;}\n\n\n }\n\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"private function hasSpecialChar(): bool\n {\n if (1 == preg_match('/[^\\p{Lu}\\p{Ll}\\d]/', $this->password)) {\n return true;\n }\n array_push($this->errorMessages, \"Special character missing.\");\n return false;\n }",
"static function validateEspecialChars($val) {\n\t\t$res = false;\n\t\tif (isset($val) && ($val != \"\") && preg_match(\"/^[a-zA-Záéíóúñ()0-9\\s]+$/i\",$val)){\n\t\t\t$res = true;\n\t\t}\n\t\treturn ($res);\n\t}",
"function checkParanoia(){\necho date(\"d M Y H:i:s\",time()).\"<br>Checking paranoia chars...<br><br>\";\n while(list($d,$r)=each($this->para)){\n echo $d.\". <b>\".$r.\"</b> = <b>\".ord($r).\"</b><br>\";\n }\n\n}",
"public function authenticationWithValidLatin1SpecialCharClassPassword() {}",
"public function authenticationWithValidLatin1SpecialCharClassPassword() {}",
"public function authenticationWithValidLatin1SpecialCharClassPassword() {}",
"function mPN_CHARS(){\n try {\n // Tokenizer11.g:557:3: ( PN_CHARS_U | MINUS | ( '0' .. '9' ) | '\\\\u00B7' | '\\\\u0300' .. '\\\\u036F' | '\\\\u203F' .. '\\\\u2040' ) \n $alt29=6;\n $LA29_0 = $this->input->LA(1);\n\n if ( ($LA29_0==$this->getToken('95')||($LA29_0>=$this->getToken('97') && $LA29_0<=$this->getToken('122'))||($LA29_0>=$this->getToken('192') && $LA29_0<=$this->getToken('214'))||($LA29_0>=$this->getToken('216') && $LA29_0<=$this->getToken('246'))||($LA29_0>=$this->getToken('248') && $LA29_0<=$this->getToken('767'))||($LA29_0>=$this->getToken('880') && $LA29_0<=$this->getToken('893'))||($LA29_0>=$this->getToken('895') && $LA29_0<=$this->getToken('8191'))||($LA29_0>=$this->getToken('8204') && $LA29_0<=$this->getToken('8205'))||($LA29_0>=$this->getToken('8304') && $LA29_0<=$this->getToken('8591'))||($LA29_0>=$this->getToken('11264') && $LA29_0<=$this->getToken('12271'))||($LA29_0>=$this->getToken('12289') && $LA29_0<=$this->getToken('55295'))||($LA29_0>=$this->getToken('63744') && $LA29_0<=$this->getToken('64975'))||($LA29_0>=$this->getToken('65008') && $LA29_0<=$this->getToken('65533'))) ) {\n $alt29=1;\n }\n else if ( ($LA29_0==$this->getToken('45')) ) {\n $alt29=2;\n }\n else if ( (($LA29_0>=$this->getToken('48') && $LA29_0<=$this->getToken('57'))) ) {\n $alt29=3;\n }\n else if ( ($LA29_0==$this->getToken('183')) ) {\n $alt29=4;\n }\n else if ( (($LA29_0>=$this->getToken('768') && $LA29_0<=$this->getToken('879'))) ) {\n $alt29=5;\n }\n else if ( (($LA29_0>=$this->getToken('8255') && $LA29_0<=$this->getToken('8256'))) ) {\n $alt29=6;\n }\n else {\n $nvae = new NoViableAltException(\"\", 29, 0, $this->input);\n\n throw $nvae;\n }\n switch ($alt29) {\n case 1 :\n // Tokenizer11.g:558:3: PN_CHARS_U \n {\n $this->mPN_CHARS_U(); \n\n }\n break;\n case 2 :\n // Tokenizer11.g:559:5: MINUS \n {\n $this->mMINUS(); \n\n }\n break;\n case 3 :\n // Tokenizer11.g:560:5: ( '0' .. '9' ) \n {\n // Tokenizer11.g:560:5: ( '0' .. '9' ) \n // Tokenizer11.g:560:6: '0' .. '9' \n {\n $this->matchRange(48,57); \n\n }\n\n\n }\n break;\n case 4 :\n // Tokenizer11.g:561:5: '\\\\u00B7' \n {\n $this->matchChar(183); \n\n }\n break;\n case 5 :\n // Tokenizer11.g:562:5: '\\\\u0300' .. '\\\\u036F' \n {\n $this->matchRange(768,879); \n\n }\n break;\n case 6 :\n // Tokenizer11.g:563:5: '\\\\u203F' .. '\\\\u2040' \n {\n $this->matchRange(8255,8256); \n\n }\n break;\n\n }\n }\n catch(Exception $e){\n throw $e;\n }\n }",
"function find_special($string){\r\n\t$string = utf8_decode($string);\r\n\tfor($i = 0; $i < strlen($string); $i++){\r\n\t\t$o = ord(substr($string, $i, 1));\r\n\t\tif($o >= 192 && $o <= 255){\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}\r\n\treturn FALSE;\r\n}",
"public function checkSpecialCharacter($value)\n {\n $illegal = \"#$%^&*()+=-[]';,./{}|:<>?~\";\n // 1: ko có chứa ký tự đặc biệt\n return (false === strpbrk($value, $illegal)) ? 1 : 0;\n }",
"function passwordGood($pass) {\n\t// default encoding/encoding specified in php.ini for nginx's php fpm module\n\t// is 'UTF-8'\n\t$len = mb_strlen($pass);\n\t//$len = strlen($pass);\n\t// original code of ($len >= 8 && $len <= 24) doesn't seem to work since I think\n\t// when true these return 1, when false they seem to return nothing, when printed empty string\n\t// be careful, these seem to return nothing or they don't print properly\n\t// this does work though :P\n\tif ( ( $len < 8 ) || ( $len > 24 ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}",
"private function pre_defined_password(): string\r\n {\r\n $regx = \"/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[#$@!%&*?])[A-Za-z\\d#$@!%&*?]{6,30}$/\";\r\n if (!preg_match($regx, $this->field)) {\r\n return $this->message(\"must 1 uppercase, lowercase, number & special char\");\r\n }\r\n }",
"protected function check_string()\n {\n $string_regex = \"/^string@.*/\";\n $backslash_regex = \"/\\\\\\/\";\n $escape_regex = \"/\\\\\\[0-9]{3}/\";\n $test = preg_match($escape_regex, $this->token);\n $result = preg_match($string_regex, $this->token);\n // checks if token is string\n if($result)\n {\n $backslashes = preg_match_all($backslash_regex, $this->token);\n // if token has backslashes\n if($backslashes > 0)\n {\n // get count of sequences\n $escapes = preg_match_all($escape_regex, $this->token);\n // if there is not same number of escapes and sequences = error\n if($escapes != $backslashes)\n {\n fwrite(STDERR, \"Error, wrong escape sequence!\\n\");\n exit(23);\n }\n }\n }\n }",
"function checkAllowedChars($value){\n $allowed=\"0123456789,~\";\n $val=trim($value);\n if($val==''){\n return 0;\n }\n $cnt=strlen($val);\n for($i=0;$i<$cnt;$i++){\n $c= substr($val,$i,1);\n if(!strpos($allowed,$c)){\n return 0;\n }\n }\n return 1;\n }",
"function hasValidFormat($u, $p){\n $pattern = \"/[<>]/\";\n if (preg_match($pattern, $u)){\n echo \"<p style='color:red;font-style:italic'>\".htmlentities($u).\" contains illegal characters. Try again.</p>\";\n return false;\n }\n else if (preg_match($pattern, $p)){\n echo \"<p style='color:red;font-style:italic'>Password contains illegal characters. Try again.</p>\";\n return false;\n }\n else {\n return true;\n }\n}",
"function ctypeAlpha($text){ \n $response = preg_match(\"/[A-Za-z]/\",$text);\n return $response;\n}",
"public function authenticationWithValidLatin1UmlautCharClassPassword() {}",
"public function authenticationWithValidLatin1UmlautCharClassPassword() {}",
"public function authenticationWithValidLatin1UmlautCharClassPassword() {}",
"abstract public function hasUTF();",
"function containsBadCharacters($string) {\r\n\tif(preg_match('/[^a-z_\\A-Z\\0-9]/', $string)) {\r\n\t\treturn true;\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n}",
"public function testManyLowercaseCharacter ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 1,\n 'digit' => 1,\n 'upper' => 1,\n 'lower' => 5\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){1})(?=(?:[^a-z]*[a-z]){5})(?=(?:[^A-Z]*[A-Z]){1})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){1})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }",
"function valid($valid)\n{\n if ($valid == \"\") \n return false;\n \n\n $split = preg_split('//u', $valid, null, PREG_SPLIT_NO_EMPTY);\n $allowed_chars = \"абвгдежзийклмнопрстуфхцчшщъьюяАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪѝЮЯ ,\";\n\n for ($i = 0; $i < mb_strlen($valid); ++$i) {\n if (mb_strpos($allowed_chars, $split[$i]) === false) \n return false;\n }\n\n return true;\n}",
"function randomcode ($len=\"10\"){\n\t\t\t\tglobal $pass;\n\t\t\t\tglobal $lchar;\n\t\t\t\t$code = NULL;\n\t\t\n\t\t\t\tfor ($i=0;$i<$len;$i++){\n\t\t\t\t\t$char = chr(rand(48,122));\n\t\t\t\t\twhile(!ereg(\"[a-zA-Z0-9]\", $char)){\n\t\t\t\t\t\tif($char == $lchar) { continue; }\n\t\t\t\t\t\t\t$char = chr(rand(48,90));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pass .= $char;\n\t\t\t\t\t\t$lchar = $char;\n\t\t\t\t\t}\n\t\t\t\treturn $pass;\n\t\t\t}",
"public function testOnlyCharactersAllowedInPhrasesAreUsed()\n {\n\n $allowedBytes = array_merge(\n range(\\ord('a'), \\ord('z')), range(\\ord('A'), \\ord('Z')),\n range(\\ord('0'), \\ord('9')),\n [\\ord('!'), \\ord('*'), \\ord('+'), \\ord('-'), \\ord('/')]\n );\n $encoder = new QpMimeHeaderEncoder();\n foreach (range(0x00, 0xFF) as $byte) {\n $char = pack('C', $byte);\n $encodedChar = $encoder->encodeString($char, 'iso-8859-1');\n if (\\in_array($byte, $allowedBytes)) {\n $this->assertEquals($char, $encodedChar, 'Character '.$char.' should not be encoded.');\n } elseif (0x20 == $byte) {\n // special case\n $this->assertEquals('_', $encodedChar, 'Space character should be replaced.');\n } else {\n $this->assertEquals(sprintf('=%02X', $byte), $encodedChar, 'Byte '.$byte.' should be encoded.');\n }\n }\n }",
"function checkPassword($clientPassword){\r\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\r\n return preg_match($pattern, $clientPassword);\r\n }",
"private function checkSymbolLength(): bool\n {\n $passwordLength = strlen($this->password);\n if ($passwordLength > 6) {\n return true;\n }\n array_push($this->errorMessages, \"Please add atleast \" . 7 - $passwordLength . \" characters to your password\");\n return false;\n }",
"public function letter_num_validation($input){\n\t\tif(!preg_match('/^[a-zA-Z0-9]*$/',$input)){ \n\t\t\treturn true;\n \t}\n }",
"public function validate()\n {\n if (empty($this->outputString)) {\n return false;\n }\n \n if (ctype_alpha($this->outputString)) {\n return true;\n } else {\n if (ctype_digit(\"\".$this->outputString)) {\n return false;\n } else {\n if( strpos($this->outputString, 'I') === false && strpos($this->outputString, 'O') === false && strpos($this->outputString, '0') === false ) {\n return true;\n }\n return false;\n }\n }\n\n return false;\n }",
"protected static function is_ascii($text)\n {\n }",
"function checkPassword($clientPassword)\n{\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\n return preg_match($pattern, $clientPassword);\n}",
"public function testRandomChars()\n {\n $numChars = rand(20, 40);\n\n $chars = $this->randomChars($numChars);\n $this->assertEquals($numChars, strlen($chars));\n }",
"function password_security($tested_password){\r\n $isSecured = false;\r\n $contains_letter = preg_match('/[a-zA-Z]/', $tested_password);\r\n $contains_capital = preg_match('/[A-Z]/', $tested_password);\r\n $contains_digit = preg_match('/\\d/', $tested_password);\r\n $contains_special = preg_match('/[^a-zA-Z\\d]/', $tested_password);\r\n\r\n $contains_all = $contains_letter && $contains_capital && $contains_digit && $contains_special;\r\n\r\n if (strlen($tested_password) >= 8 && $contains_all == \"1\") {\r\n $isSecured = true;\r\n }\r\n return $isSecured;\r\n}",
"function character_validations($value, $isPhone, $isEmail, $isUsername){\n //Possible regex expressions for:\n //phone: -> '/^[0-9]{3}[-][0-9]{3}[-][0-9]{4}$/'\n //email: -> '/^[^0-9.\\_][A-Za-z0-9]+[@][A-Za-z0-9_]+[.][a-z]{3}'\n if($isPhone){\n //if the string mathces this pattern then it will return true or\n return preg_match('/^[0-9]{3}[-][0-9]{3}[-][0-9]{4}$/', $value);\n } elseif($isEmail){\n //this condition is if its for an email\n return preg_match(\"/^[A-Za-z0-9._\\%-]+@[A-Za-z0-9.-]+\\.[a-z]{3}$/\", $value);\n } elseif($isUsername){\n //check if username has proper characters\n return !(preg_match(\"/[\\W]/\", $value));\n }\n }",
"static function isValidPass($pass) {\n $pattern = \"/^[a-zA-Z0-9]{8,32}$/\";\n if(preg_match($pattern, $pass)) {\n return true;\n } else {\n return false;\n }\n }",
"function verify($string)\n{\n\t$string = preg_replace(\"/[^a-z0-9\\-]/\", \"\", $string);\n\tif(strlen($string) == 36)\n\t{\n\t\t$hash = explode(\"-\", $string);\n\t\t$hash = $hash[4].$hash[0].$hash[3].$hash[1].$hash[2];\n\t\treturn $hash;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}",
"function verifyAlphaNum($testString) {\r\n return (preg_match (\"/^([[:alnum:]]|-|\\.| |\\'|&|;|#)+$/\", $testString));\r\n}",
"function validatePasswordSpecialChar(&$Model, $data, $compare) {\r\n\t\tif (in_array($this->settings[$Model->alias]['passwordPolicy'], array('weak', 'normal', 'medium'))) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t$key = key($data);\r\n\t\t$value = $data[$key];\r\n\t\t$compare = $Model->data[$Model->alias][$compare[0]];\r\n\t\tif (!(preg_match('/.*[^\\w].*/', $compare))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"function validate_password($candidate) \n{\n if (!empty($candidate))\n {\n // Declare and Initialize Local Variables\n $CritCount = 0; //Tabulator for keeping track of number of criteria matched\n\n /*\n Regular Expression Example $\\S*(?=\\S{8,})(?=\\S*[a-z])(?=\\S*[A-Z])(?=\\S*[\\d])(?=\\S*[\\W])\\S*$\n $ = beginning of string\n \\S* = any set of characters\n (?=\\S{8,}) = of at least length 8\n (?=\\S*[a-z]) = containing at least one lowercase letter\n (?=\\S*[A-Z]) = and at least one uppercase letter\n (?=\\S*[\\d]) = and at least one number\n (?=\\S*[\\W]) = and at least a special character (non-word characters)\n $ = end of the string\n\n */\n // Test for each requirement \n if (strlen($candidate) >= 8) $CritCount = $CritCount + 10; // Value of 10 for minimum length\n if (preg_match('/[a-z]/', $candidate)) $CritCount = $CritCount + 1; //Contains lower case a-z\n if (preg_match('/[A-Z]/', $candidate)) $CritCount = $CritCount + 1; //Contains UPPER case A-Z\n if (preg_match('/[\\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one numeric digit\n if (preg_match('/[^a-zA-Z\\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one special Character (!@#$%^&*()-_, etc.)\n \n if ($CritCount > 12) //Meets minimum length, plus 3 additional criteria\n {\n return TRUE;\n }\n else \n {\n return FALSE;\n }\n }\n else\n return false;\n}",
"private function valid_password() {\n return (strlen($this->password) == 6);\n }",
"public function isValid($cek){\n\t\tif($cek==null || $cek==\"\"){\n\t\t\treturn \"null\";\n\t\t}\n\n\t\telse if(preg_match('/[^a-z0-9]/i', $cek)){\n\t\t\treturn \"symbolerror\";\n\t\t}\t\t\n\t}",
"public function verifyContainsAlsoNoneDigitChars(): bool\n {\n $count_digits = preg_match_all(\"/[0-9]/\", $this->input);\n if (mb_strlen($this->input) > $count_digits) {\n return true;\n }\n \n return false;\n }",
"function alphanumeric_space($str)\n\t{\t\t\n\t\t$this->CI->form_validation->set_message('alphanumeric_space', \"El campo %s debe contener una combinación de caracteres alfanuméricos y espacios.\");\n\t\treturn (bool) preg_match(\"/(^[a-zA-Z0-9\\xF1\\xD1\\sñÑ]+$)|^$/\", $str);\n\t}",
"function allCharactersAreUnique2($str)\n{\n $uniqueCharsArray = [];\n for ($i = 0; $i < strlen($str); ++$i)\n {\n if (in_array($str[$i] , $uniqueCharsArray))\n {\n return false;\n }\n $uniqueCharsArray[] = $str[$i];\n }\n return true;\n}",
"public function chars($value, array $chars)\n\t{\n\t\treturn ! preg_match('![^'.implode('', $chars).']!u', $value);\n\t}",
"function is_a_to_z_character($char) {\n return (($char >= 'a' && $char <= 'z') || ($char >= 'A' && $char <= 'Z')) ? true : false;\n }",
"public function check_if_solvable()\n {\n for ($key = $this->number_of_equal_first_characters; $key < strlen($this->final_word); $key++) {\n if($this->final_word[$key] > 'z' || $this->final_word[$key] < 'a'){\n $this->is_solvable = false;\n return;\n }\n }\n\n $this->is_solvable = true;\n }",
"protected function checkAllowedCharacters($value)\n {\n $length = mb_strlen($value, 'UTF-8');\n $array = array_flip($this->params['chars']);\n if (!empty($array)) {\n for ($i = 0; $i < $length; $i++) {\n $tmp = mb_substr($value, $i, 1, 'UTF-8');\n $found = isset($array[$tmp]);\n if (($this->params['allowed'] && !$found)\n || (!$this->params['allowed'] && $found)\n ) {\n $this->setErrorMessage($this->params['chars_error']);\n return false;\n }\n }\n }\n return true;\n }",
"public function has8bitChars($text)\n {\n }",
"public function testPasswordIsValid($data)\n {\n $pattern = \"/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }",
"public function getRegisteredChars() {}",
"function cjpopups_is_password_strong($pass_string, $compare = 1) {\n $r1='/[A-Z]/'; //Uppercase\n $r2='/[a-z]/'; //lowercase\n $r3='/[!@#$%^&*()\\-_=+{};:,<.>]/'; // whatever you mean by 'special char'\n $r4='/[0-9]/'; //numbers\n if(preg_match_all($r1,$pass_string, $o) < $compare) return FALSE;\n if(preg_match_all($r2,$pass_string, $o) < $compare) return FALSE;\n if(preg_match_all($r3,$pass_string, $o) < $compare) return FALSE;\n if(preg_match_all($r4,$pass_string, $o) < $compare) return FALSE;\n if(strlen($pass_string) < 8) return FALSE;\n return TRUE;\n}",
"public static function hasChars($str, $charlist) {}",
"function validate_askfor($string,$char='_'){\r\n\t $isvalid = 0;\r\n\t\t$safe_askfor ='';\r\n\t\t$safe_srchtyp ='';\r\n\t\t$safe_fromdat ='';\r\n //\t\r\n //$tmp =preg_split('@['.$char.']+@', $string ); \t\r\n\t $tmp = explode($char, $string); \r\n\t if ( count($tmp)==3 ) {\r\n\t\t for ($i=0;$i<3;$i++){\r\n \t\t $scrub = $tmp[$i];\r\n if ($this->str_is_clean($scrub) ){\r\n\t\t\t\tif ($i==0){ if ($this->is_known_askfor ($scrub)){$safe_askfor =$scrub;$isvalid=$isvalid+1;} }\r\n\t\t\t\tif ($i==1){ if ($this->is_known_searchmethd ($scrub)){$safe_srchtyp =$scrub;$isvalid=$isvalid+1;} }\r\n\t\t\t\tif ($i==2){ if ($this->is_known_searchtype ($scrub)){$safe_fromdat =$scrub;$isvalid=$isvalid+1;} }\r\n\t \t\t }\r\n \t }\r\n\t\t}//make sure ONLY three parts -> (NO SQL injection here!) \r\n\t\tif ($isvalid==3) {\r\n\t\t $out = array();\r\n\t\t array_push($out,$safe_askfor) ; \r\n\t\t array_push($out,$safe_srchtyp) ; \r\n\t\t array_push($out,$safe_fromdat) ; \r\n return $out;\t\t \r\n\t\t}//if all three pass\r\n\t\treturn 0;\r\n\t }",
"function acucPassToCode( $arrayPasscode )\r\n{\r\n\tglobal $acucUsableChars;\r\n\t\r\n\t$arrayReturnPasscode = $arrayPasscode;\r\n\t\r\n\tif( count($arrayPasscode) < 28 )\r\n\t\treturn false;\r\n\t\r\n\tfor( $idx = 0; $idx < 28; $idx++ )\r\n\t{\r\n\t\t$arrayReturnPasscode[$idx] = array_search( $arrayPasscode[$idx], $acucUsableChars);\r\n\t\tif( $arrayReturnPasscode[$idx] === false )\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\treturn $arrayReturnPasscode;\r\n}",
"public function password_strength_check($str)\n\t{\n\t\tif (preg_match('#[0-9]#', $str) && preg_match('#[a-zA-Z]#', $str)) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\t$this->form_validation->set_message('password_strength_check', 'Your password must be at least 6-19 characters in length and contain a number and both uppercase and lowercase letters');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t\n\t}",
"function hasSpecial($str){\nreturn preg_match('/[\\'\\^\\.\\£\\$\\%\\&\\*\\(\\)\\}\\{\\@\\#\\~\\?\\>\\<\\>\\,\\|\\=\\_\\+\\¬\\-]/', $string);\n}",
"public function testEncodingAsciiCharactersProducesValidToken()\n {\n $string = '';\n foreach (range(0x00, 0x7F) as $octet) {\n $char = pack('C', $octet);\n $string .= $char;\n }\n $encoder = new Rfc2231Encoder();\n $encoded = $encoder->encodeString($string);\n\n foreach (explode(\"\\r\\n\", $encoded) as $line) {\n $this->assertMatchesRegularExpression($this->rfc2045Token, $line, 'Encoder should always return a valid RFC 2045 token.');\n }\n }",
"public function valid() : bool\n {\n // dd($this->position >= 65 && $this->position <= 90);\n return $this->position >= 65 && $this->position <= 90;\n }",
"function StripValidator ()\n {\n\n $this->params['chars'] = array();\n\n }",
"public function hasCharid(){\n return $this->_has(4);\n }",
"public function ValidPassword($check) {\n\t // have to extract the value to make the function generic\n\t $value = array_values($check);\n\t $value = $value[0];\n\n\t //$uppercase = preg_match('@[A-Z]@', $value);\n\t $lowercase = preg_match('@[a-z]@', $value);\n\t $number = preg_match('@[0-9]@', $value);\n\t //$specialchars = preg_match('/[!@#$%^&*()\\-_=+{};:,<.>]/', $value);\n\t \t// var_dump($value);\n\t // exit();\n\t if(!$lowercase || !$number || strlen($value) < 6 ) {\n\t \t \treturn false; \n\t } else {\n\t return true;\n\t\t\t}\n\t\t}",
"public static function isCharacterEncodingValid(string $name): bool;",
"public function enforceRulePassword($data){\n if (strlen($data) >= 8){\n \t$validPassword= $data;\n \t} \n \telse{\n \t$validPassword= FALSE;\n\t\t\t}\n\t\t\t\n\t\t\t/*if (preg_match (\"/^.*(?=.{8,})(?=.*\\d)(?=.*[a-zA-Z]).*$/\", $data)){\n \t$validPassword= $data;\n \t} \n \telse{\n \t$validPassword= FALSE;\n\t\t\t}*/\n\t\t\t\n\t\t\treturn $validPassword;\n }",
"public function testGetChars()\n {\n $this->todo('stub');\n }",
"function verifyAlphaNum ($testString)\n\t{\n return (preg_match(\"/^([[:alnum:]]|-|\\.| |')+$/\", $testString));\n }",
"static function checkAddress($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d,][\\W\\w\\d\\s,]{1,40}$/', $input)) {\r\n return true; //Illegal Character found!\r\n }\r\n else{\r\n echo PageBuilder::printError(\"Please enter alphabets and numbers with comma seperation, maximum of 40 characters.\");\r\n return false;\r\n }\r\n }",
"function is_escape_2($char)\n{\n\tif ($char === \".\" || $char === \"|\" || $char === \"(\" || $char === \")\" || $char === \"*\" || $char === \"+\")\n\t\treturn true;\n\treturn false;\n}",
"public static function validCharacter($input)\n {\n $charInvalid = [\"<\", \">\", \";\", \"|\", \"\\\"\", \"'\", \"/\"];\n\n foreach ($charInvalid as $char) {\n if (strpos($input, $char) === true) {\n return false;\n }\n }\n return true;\n }",
"function startSpecialChar($str = null){\n if ($str) {\n $firstChar =substr($str,0 ,1);\n if (preg_match('/[^a-zA-Z\\d]/', $firstChar)) {\n echo \"input starts with a Special Character<br>\";\n return true;\n }else\n return false;\n }\n}",
"function _verify()\n {\n $e = \"\";\n if (isset($_POST['login'])) {\n $user = validate($_POST['gebruikersnaam']);\n $pass = validate($_POST['wachtwoord']);\n\n if (strlen($user) < 3 || strlen($user) > 20) {\n $e .= '<p class=\"text-danger mb-n1\">Voer een geldige gebruikersnaam in!</p>';\n }\n if (strlen($pass) < 3 || strlen($pass) > 20) {\n $e .= '<p class=\"text-danger mb-n1\">Voer een geldige wachtwoord in!</p>';\n } else if ($this->mismatch) {\n $e .= '<p class=\"text-danger mb-n1\">Gebruikersnaam en/of wachtwoord komen niet overeen!</p>';\n }\n return $e;\n }\n return $e;\n }"
] | [
"0.7257428",
"0.72537047",
"0.71623266",
"0.6640905",
"0.66130507",
"0.6561246",
"0.6551506",
"0.6551506",
"0.6551506",
"0.6519381",
"0.646823",
"0.6441206",
"0.6441206",
"0.64219373",
"0.6401491",
"0.6383617",
"0.6361444",
"0.6349091",
"0.6340479",
"0.63344306",
"0.6329818",
"0.6316492",
"0.6315266",
"0.6302311",
"0.6298607",
"0.62783724",
"0.6271116",
"0.6264475",
"0.6258653",
"0.62384236",
"0.6230459",
"0.6224176",
"0.62051964",
"0.62038636",
"0.62038636",
"0.62038636",
"0.6196028",
"0.616277",
"0.61530656",
"0.61392003",
"0.61199325",
"0.6106059",
"0.60965073",
"0.609362",
"0.6092528",
"0.6072282",
"0.6072282",
"0.6072282",
"0.60665584",
"0.6058997",
"0.60486853",
"0.6034337",
"0.60285276",
"0.60243136",
"0.6018746",
"0.60168296",
"0.6000518",
"0.5982974",
"0.597827",
"0.5975929",
"0.5958205",
"0.59411854",
"0.59305835",
"0.59303117",
"0.59189034",
"0.5917645",
"0.5916467",
"0.59132314",
"0.58909684",
"0.5890701",
"0.58902216",
"0.5890102",
"0.58783334",
"0.5877452",
"0.5877003",
"0.58713144",
"0.5869804",
"0.5852306",
"0.5847972",
"0.5842053",
"0.58350337",
"0.5830555",
"0.58153534",
"0.58091086",
"0.5799656",
"0.57964873",
"0.57906085",
"0.57791334",
"0.57756585",
"0.577459",
"0.57685643",
"0.5759452",
"0.57560873",
"0.5755216",
"0.5745827",
"0.5740961",
"0.57396394",
"0.57315814",
"0.57272387",
"0.57255614"
] | 0.67725116 | 3 |
used to sanitize chars | function doMkCharacter ($string)
{
return preg_replace ('/[^a-zA-Z0-9\-_:\.=;]/i', '', trim (substr ($string, 0, 35)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function sanitize();",
"protected function sanitize() {}",
"function sanitize($str){\n $find = array( 'á', 'é', 'í', 'ó', 'ú', 'Á', 'É', 'Í', 'Ó', 'Ú', 'ñ', 'Ñ' );\n $replace = array( 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'n', 'N' );\n return strtolower(preg_replace('/[^a-zA-Z0-9 ]/s', '',str_ireplace($find, $replace, preg_replace('/[^\\w ]/', '', $str))));\n\n }",
"public abstract function sanitize($string);",
"function make_clean($value) {\n\t\t$legal_chars = \"%[^0-9a-zA-Z������� ]%\"; //allow letters, numbers & space\n\t\t$new_value = preg_replace($legal_chars,\"\",$value); //replace with \"\"\n\t\treturn $new_value;\n\t}",
"private static function stripIllegalChars()\n {\n $input_arr = array();\n foreach ($_POST as $key => $input_arr)\n {\n $_POST[$key] = preg_replace(\"/[^a-zA-Z0-9\\s!@#$%&*()_\\-=+?.,:\\/]/\", \"\", $input_arr);\n }\n }",
"function normalize_special_characters($str, $unwanted=false) {\n \n\t# Quotes cleanup\n\t$str = str_replace(chr(ord(\"`\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"„\")), \",\", $str);\n\t$str = str_replace(chr(ord(\"`\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\t$str = str_replace(chr(ord(\"“\")), \"\\\"\", $str);\n\t$str = str_replace(chr(ord(\"”\")), \"\\\"\", $str);\n\t$str = str_replace(chr(ord(\"´\")), \"'\", $str);\n\n\t$unwanted_array = array('Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y');\n\tif($unwanted)\n \t$str = strtr($str, $unwanted_array);\n\n\t# Bullets, dashes, and trademarks\n\t$str = str_replace(chr(149), \"•\", $str);\t# bullet •\n\t$str = str_replace(chr(150), \"–\", $str);\t# en dash\n\t$str = str_replace(chr(151), \"—\", $str);\t# em dash\n\t$str = str_replace(chr(153), \"™\", $str);\t# trademark\n\t$str = str_replace(chr(169), \"©\", $str);\t# copyright mark\n\t$str = str_replace(chr(174), \"®\", $str);\t# registration mark\n\n\treturn $str;\n}",
"function clean_unwanted_characters($oneStr){\n\t$cleaned_str = $oneStr;\r\n// \t$cleaned_str = str_ireplace(\"\\\"\", \"/\", $oneStr);\r\n// \t$cleaned_str = str_ireplace(\"\\\\\", \"/\", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\b\", \" \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\f\", \" / \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\r\", \" / \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\t\", \" \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"\\\\u\", \" \", $cleaned_str);\r\n// \t$cleaned_str = str_ireplace(\"</\", \"<\\/\", $cleaned_str);\r\n\treturn $cleaned_str;\n\r\n}",
"public function sanitize() {\n }",
"function sanitize($string) {\n\t//return $string;\n\treturn preg_replace ('/[^\\x{0009}\\x{000a}\\x{000d}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}]+/u', '.', $string);\n}",
"function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}",
"function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}",
"function sanitize_input($str) {\n\treturn preg_replace(\"/[?'&<>\\\"]/\", \"\", $str);\n}",
"function sanitise_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function remove_strange_chars($txt){\n\t\treturn(str_replace(array('<','>',\"'\",\";\",\"&\",\"\\\\\"),'',$txt));\n\t}",
"function sanitize($string, $force_lowercase = false, $anal = false)\n{\n $strip = ['~', '`', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '=', '+', '[', '{', ']', '}', '\\\\', '|', ';', ':', '\"', \"'\", '‘', '’', '“', '”', '–', '—', '—', '–', ',', '<', '.', '>', '/', '?'];\n $clean = trim(str_replace($strip, '', strip_tags($string)));\n $clean = preg_replace('/\\s+/', '-', $clean);\n $clean = ($anal) ? preg_replace('/[^a-zA-Z0-9]/', '', $clean) : $clean;\n\n return ($force_lowercase) ?\n (function_exists('mb_strtolower')) ?\n mb_strtolower($clean, 'UTF-8') :\n strtolower($clean) :\n $clean;\n}",
"public function remove_xss($val) {\n // this prevents some character re-spacing such as <java\\0script>\n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=@avascript:alert('XSS')>\n $search = 'abcdefghijklmnopqrstuvwxyz';\n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $search .= '1234567890!@#$%^&*()';\n $search .= '~`\";:?+/={}[]-_|\\'\\\\';\n for ($i = 0; $i < strlen($search); $i++) {\n // ;? matches the ;, which is optional\n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n\n // @ @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n // @ @ 0{0,7} matches '0' zero to seven times\n $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n }\n\n // now the only remaining whitespace attacks are \\t, \\n, and \\r\n $ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n $ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n $ra = array_merge($ra1, $ra2);\n\n $found = true; // keep replacing as long as the previous round replaced something\n while ($found == true) {\n $val_before = $val;\n for ($i = 0; $i < sizeof($ra); $i++) {\n $pattern = '/';\n for ($j = 0; $j < strlen($ra[$i]); $j++) {\n if ($j > 0) {\n $pattern .= '(';\n $pattern .= '(&#[xX]0{0,8}([9ab]);)';\n $pattern .= '|';\n $pattern .= '|(�{0,8}([9|10|13]);)';\n $pattern .= ')*';\n }\n $pattern .= $ra[$i][$j];\n }\n $pattern .= '/i';\n $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n if ($val_before == $val) {\n // no replacements were made, so exit the loop\n $found = false;\n }\n }\n }\n return $val;\n }",
"function sanitizeString($str_input) {\r\n $str_input = strip_tags($str_input);\r\n $str_input = htmlentities($str_input);\r\n $str_input = stripslashes($str_input);\r\n return $str_input;\r\n}",
"function sanitize_input($data)\n {\n $data = trim($data); //remove whitespaces \n $data = stripslashes($data); //such as '\n $data = htmlspecialchars($data); //such as >,<&\n return $data;\n }",
"public function sanitizer($var){\n\t\t$forbidden = array(\"²\",\"&\",\"\\\"\",\"'\",\"(\",\"è\",\"é\",\"ê\",\"ë\",\"ç\",\"à\",\")\",\"=\",\"~\",\"#\",\"{\",\"[\",\"|\",\"`\",\"\\\\\",\"^\",\"@\",\"]\",\"}\",\"+\",\"°\",\"%\",\"¤\",\"*\",\"!\",\":\",\",\",\";\",\"?\",\"/\",\"$\",\"£\",\"€\",\"<\",\">\",\" \");\n\t\t$allowed = array(\"-\",\"-\",\"-\",\"-\",\"-\",\"e\",\"e\",\"e\",\"e\",\"c\",\"a\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"-\",\"_\");\n\n\t\t$sanitized = str_replace($forbidden,\"_\",$var);\n\n\t\tif(strlen($sanitized) >= 33) $sanitized = substr($sanitized,0,31);\n\n\t\treturn \t$sanitized;\n\t}",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitise_input($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitize_input($data) { \r\n $data = trim($data); \r\n $data = stripslashes($data); \r\n $data = htmlspecialchars($data); \r\n return $data; \r\n }",
"public static function sanitize($input){\n\t\t\t\t\n \t\t return $s = preg_replace(\"/[^A-Z0-9a-z\\w ]/u\",\"\", $input);\n\n\t\t}",
"function StripValidator ()\n {\n\n $this->params['chars'] = array();\n\n }",
"function strip_bad_chars( $input ) {\n $output = preg_replace( \"/[^a-zA-Z0-9_-]/\", \"\", $input );\n return $output;\n }",
"function sanitize(){\r\n\t\t $outar = Array();\r\n \t $arg_list = func_get_args();\r\n\t\t foreach($arg_list[0] as $key => $value){\r\n\t\t\t\t $data = $value;\r\n\t\t\t\t $data = PREG_REPLACE(\"/[^0-9a-zA-Z]/i\", '', $data);\r\n\t\t\t\t array_push($outar,$data);\r\n\t\t }\r\n\t\treturn $outar;\r\n\t }",
"function sanitize_string_xss(string $data): string\n{\n return filter_var($data, FILTER_SANITIZE_STRING);\n}",
"function remove_xss($val) {\n // this prevents some character re-spacing such as <java\\0script>\n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=@avascript:alert('XSS')>\n $search = 'abcdefghijklmnopqrstuvwxyz';\n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $search .= '1234567890!@#$%^&*()';\n $search .= '~`\";:?+/={}[]-_|\\'\\\\';\n for ($i = 0; $i < strlen($search); $i++) {\n // ;? matches the ;, which is optional\n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n // @ @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n // @ @ 0{0,7} matches '0' zero to seven times\n $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n }\n\n // now the only remaining whitespace attacks are \\t, \\n, and \\r\n $ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n $ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n $ra = array_merge($ra1, $ra2);\n\n $found = true; // keep replacing as long as the previous round replaced something\n while ($found == true) {\n $val_before = $val;\n for ($i = 0; $i < sizeof($ra); $i++) {\n $pattern = '/';\n for ($j = 0; $j < strlen($ra[$i]); $j++) {\n if ($j > 0) {\n $pattern .= '(';\n $pattern .= '(&#[xX]0{0,8}([9ab]);)';\n $pattern .= '|';\n $pattern .= '|(�{0,8}([9|10|13]);)';\n $pattern .= ')*';\n }\n $pattern .= $ra[$i][$j];\n }\n $pattern .= '/i';\n $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n if ($val_before == $val) {\n // no replacements were made, so exit the loop\n $found = false;\n }\n }\n }\n return $val;\n}",
"function remove_xss($val) {\n // this prevents some character re-spacing such as <java\\0script>\n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=@avascript:alert('XSS')>\n $search = 'abcdefghijklmnopqrstuvwxyz';\n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $search .= '1234567890!@#$%^&*()';\n $search .= '~`\";:?+/={}[]-_|\\'\\\\';\n for ($i = 0; $i < strlen($search); $i++) {\n // ;? matches the ;, which is optional\n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n\n // @ @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n // @ @ 0{0,7} matches '0' zero to seven times\n $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n }\n\n // now the only remaining whitespace attacks are \\t, \\n, and \\r\n $ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n $ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n $ra = array_merge($ra1, $ra2);\n\n $found = true; // keep replacing as long as the previous round replaced something\n while ($found == true) {\n $val_before = $val;\n for ($i = 0; $i < sizeof($ra); $i++) {\n $pattern = '/';\n for ($j = 0; $j < strlen($ra[$i]); $j++) {\n if ($j > 0) {\n $pattern .= '(';\n $pattern .= '(&#[xX]0{0,8}([9ab]);)';\n $pattern .= '|';\n $pattern .= '|(�{0,8}([9|10|13]);)';\n $pattern .= ')*';\n }\n $pattern .= $ra[$i][$j];\n }\n $pattern .= '/i';\n $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n if ($val_before == $val) {\n // no replacements were made, so exit the loop\n $found = false;\n }\n }\n }\n return $val;\n}",
"function sanitize($dirty){\n return htmlentities($dirty,ENT_QUOTES,\"UTF-8\");\n}",
"function char_filter($ojb)\n {\n $badchars='Ý`~!@$%^()+-_=[]{}\\'\\\\:\"|,/<>? '; # Nhung ky tu khong cho phep duoc len danh sach tai day\n for ($i=0;$i<strlen($badchars);$i++){\n $ojb=str_replace($badchars[$i],\"\",$ojb);\n\n }\n\n return $ojb;\n }",
"function secure_input($input) {\n\t\t\t$input = trim($input);\n\t\t\t$input = htmlspecialchars($input);\n\t\t\treturn $input;\n\t\t}",
"function sanitize_text_field($str)\n {\n }",
"static public function clean_invalid_char($var) {\n $var = strip_tags($var);\n //$var = str_replace(\"&\", \"&&\", $var);\n $var = str_replace('&', '', $var);\n $var = str_replace(\"<\", \"<\", $var);\n $var = str_replace(\">\", \">\", $var);\n $var = trim($var);\n return ($var);\n }",
"function sanitize($string){\n\t$strip = strip_tags($string);\n\t$trim = trim($strip);\n\t$htmlchar = htmlspecialchars($trim);\n\treturn $htmlchar;\n\n}",
"function sanitize_utf8($str){\n return htmlentities($str);\n }",
"function sanitize($str) {\n return addslashes($str);\n}",
"function search_strip_badchars($line) {\n// \n $line = str_replace(\".\", \" \", $line);\n $line = str_replace(\"\\\"\", \" \", $line);\n $line = str_replace(\"'\", \"\", $line);\n $line = str_replace(\"+\", \" \", $line);\n $line = str_replace(\"-\", \" \", $line);\n $line = str_replace(\"*\", \" \", $line);\n $line = str_replace(\"/\", \" \", $line);\n $line = str_replace(\"!\", \" \", $line);\n $line = str_replace(\"%\", \" \", $line);\n $line = str_replace(\">\", \" \", $line);\n $line = str_replace(\"<\", \" \", $line);\n $line = str_replace(\"^\", \" \", $line);\n $line = str_replace(\"(\", \" \", $line);\n $line = str_replace(\")\", \" \", $line);\n $line = str_replace(\"[\", \" \", $line);\n $line = str_replace(\"]\", \" \", $line);\n $line = str_replace(\"{\", \" \", $line);\n $line = str_replace(\"}\", \" \", $line);\n $line = str_replace(\"\\\\\", \" \", $line);\n $line = str_replace(\"=\", \" \", $line);\n $line = str_replace(\"$\", \" \", $line);\n $line = str_replace(\"#\", \" \", $line);\n $line = str_replace(\"?\", \" \", $line);\n $line = str_replace(\"~\", \" \", $line);\n $line = str_replace(\":\", \" \", $line);\n $line = str_replace(\"_\", \" \", $line);\n $line = str_replace(\" \", \" \", $line);\n $line = str_replace(\"&\", \" \", $line);\n $line = str_replace(\"©\", \" \", $line);\n $line = str_replace(\" \", \" \", $line);\n $line = str_replace(\""\", \" \", $line);\n $line = str_replace(\"&\", \" \", $line);\n $line = str_replace(\";\", \" \", $line);\n $line = str_replace(\"\\n\", \" \", $line);\n return $line;\n}",
"function str_sanitize($str){\n\t\t global $database;\n\t\t $str = $database->real_escape_string($str);\n\t return trim($str);\t\n}",
"function Strip_Bad_chars($input)\n{\n //$output = preg_replace(\"/[^a-zA-Z0-9_-]/\", \"\", $input);\n $output = preg_replace(\"/[^0-9]/\", \"\", $input);\n return $output;\n}",
"function rehtmlspecialchars($arg){\n\t//$arg = str_replace(\"\", \"<\", $arg);\n\t//$arg = str_replace(\" \", \"_\", $arg);\n\t$arg = str_replace(\"/\", \"\", $arg);\n\t$arg = str_replace(\"&\", \"\", $arg);\n\t$arg = str_replace(\"'\", \"\", $arg);\n\t$arg = str_replace(\"#\", \"\", $arg);\n\t$arg = str_replace(\"(\", \"\", $arg);\n\t$arg = str_replace(\")\", \"-\", $arg);\n\t$arg = str_replace(\".\", \"\", $arg);\n\t\n\treturn $arg;\n\t}",
"function clean_input($data){\r\n\t\t\t\t\t$data = trim($data);\r\n\t\t\t\t\t$data = stripslashes($data);\r\n\t\t\t\t\t$data = htmlspecialchars($data);\r\n\t\t\t\t\treturn $data;\r\n\t\t\t\t}",
"function _xssClean($str) {\n\t\tif (is_array($str)) {\n\n\t\t\twhile (list($key) = each($str)) {\n\n\t\t\t\t$str[$key] = $this->_xssClean($str[$key]);\n\t\t\t}\n\n\t\t\treturn $str;\n\t\t}\n\n\n\t\t$str = _removeInvisibleCharacters($str);\n\t\t$str = _htmlEncode($str);\n\t\t$str = filter_var($str, FILTER_SANITIZE_STRING);\n\n\t\treturn $str;\n\t}",
"function sanitize($input) {\n\t\n\t\t$input = stripslashes($input);\n\t\t$input = htmlspecialchars($input);\n\t\n\t\treturn $input;\n\t}",
"function ATsanitize($input)\n{\n $user_input = trim($input);\n \n if (get_magic_quotesgpc())\n {\n $input = stripslashes($input);\n }\n}",
"function sanitise_str ($x, $flags = 0) {\n global $EscapeSequencesA, $EscapeSequencesB;\n $x = (string)$x;\n if ( $flags & STR_GPC and\n PHP_MAJOR_VERSION < 6 and\n get_magic_quotes_gpc()\n ) {\n $x = stripslashes($x);\n }\n if ( $flags & STR_ENSURE_ASCII ) { $x = ensure_valid_ascii($x); }\n else { $x = ensure_valid_utf8($x); }\n if ( $flags & STR_TO_UPPERCASE ) { $x = strtoupper($x); }\n if ( $flags & STR_TO_LOWERCASE ) { $x = strtolower($x); }\n if ( ~$flags & STR_NO_TRIM ) { $x = trim($x); }\n if ( ~$flags & STR_NO_STRIP_CR ) { $x = str_replace(\"\\r\", '', $x); }\n if ( $flags &\n ( STR_ESCAPE_HTML |\n STR_PERMIT_FORMATTING |\n STR_HANDLE_IMAGES |\n STR_PERMIT_ADMIN_HTML |\n STR_DISREGARD_GAME_STATUS |\n STR_EMAIL_FORMATTING\n )\n ) {\n $x = htmlspecialchars($x, ENT_COMPAT, 'UTF-8');\n }\n if ( $flags & STR_CONVERT_ESCAPE_SEQUENCES ) {\n $x = str_replace($EscapeSequencesA, $EscapeSequencesB, $x);\n }\n if ( $flags & STR_STRIP_TAB_AND_NEWLINE ) {\n $x = str_replace(array(\"\\n\",\"\\t\"), '', $x);\n }\n return $x;\n}",
"function clean_input($data) {\n $data = trim($data); // strips whitespace from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n}",
"function sa_sanitize_chars($filename) {\n return strtolower(preg_replace('/[^a-zA-Z0-9-_\\.]/', '', $filename));\n}",
"function sanitize_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}",
"function htmlRemoveSpecialCharacters($input){\n\t\tfor($i=0; $i<strlen($input); $i++){\n\n\t\t\t$value = ord($input[$i]);\n\t\t\tif($value >= 48 && $value <= 57);\n\t\t\telseif ($value >= 65 && $value <= 90) ;\n\t\t\telseif ($value >= 97 && $value <= 122) ;\n\t\t\telseif ($value == 32) ;\n\t\t\telse{\n\t\t\t\t$input = substr($input, 0, $i) . '\\\\' . substr($input, $i);\n\t\t\t}\n\t\t}\n\t\techo $input;\n\t\treturn $input;\n\t}",
"public function sanitize( $input ) {\n }",
"function sanitize($str) {\n return trim(htmlspecialchars($str));\n}",
"function sanitize($data){\r\n\t\t\t$data=stripslashes($data); // Remove all slashses\r\n\t\t\t$data=strip_tags($data); //Remove all tags\r\n\t\t\treturn $data;\r\n\t\t}",
"function sanitxt($sanitxt) {\r\n\t$sanitxt = str_replace('><','> <',$sanitxt);\r\n\r\n\t// remove HTML tags\r\n\t$sanitxt = strip_tags($sanitxt);\r\n\r\n\t// remove multiple spaces\r\n\t$sanitxt = preg_replace('/\\s+/', ' ', $sanitxt);\r\n\r\n\t// convert smart quotes into normal\r\n\tconvert_smart_quotes($sanitxt);\r\n\r\n\t// replace quotes and ampersands with HTML chars (recommended)\r\n\t// and encode string to UTF-8. UTF-8 is default from PHP 5.4.0 only\r\n\r\n\t$sanitxt = htmlspecialchars($sanitxt,ENT_QUOTES,\"UTF-8\",FALSE);\r\n\r\nreturn($sanitxt);\r\n}",
"function filterSpecials($data){\n\n if(!$this->isUTF8($data))\n $data = utf8_encode($data);\n $data = htmlspecialchars($data, ENT_QUOTES);\n\n return $data;\n }",
"function sanitizeName() {\n $pattern = \"/[0-9`!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?~]/\";\n if (!preg_match($pattern, $this->fname) && !preg_match($pattern, $this->lname)) {\n $this->fname = trim($this->fname);\n $this->lname = trim($this->lname);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function cleanInput($data) { \r\n return htmlspecialchars(stripslashes(trim($data)));\r\n }",
"function cleanInput($data){ //sanitize data \n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitizeString($str){\n\t\tif(get_magic_quotes_gpc()) $str = stripslashes($str);\t\n\t\t$str= htmlentities($str);\n\t\t$str=strip_tags($str);\n\t\treturn $str;\n\t}",
"function html_xss_clean($text) {\n return htmlspecialchars($text);\n}",
"function SafeConvert($data){\n\t$data=trim($data);\n\t//convert special characters to html entities\n\t//most hacking inputs in XSS are HTML in nature, so converting them to special characters so that they are not harmful\n\t$data=htmlspecialchars($data);\n\t//sanitize before using any MySQL database queries\n\t//this will escape quotes in the input.\n\t$data = mysql_real_escape_string($data);\n\treturn $data;\n}",
"function cleanInput($data) {\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t\t}",
"function clean_input($data){\r\n\t$data = trim($data);\r\n\t$data = stripslashes($data);\r\n\t$data = htmlspecialchars($data);\r\n\treturn $data;\t\r\n}",
"function sanitize_string($str)\r\n{\r\n\t$str = strip_tags($str);\r\n $str = htmlentities($str, ENT_QUOTES);\r\n return $str;\r\n}",
"function sanitize($data) {\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}",
"function sanitize_validate_input($data){\n\t\t \t \t$data = filter_var($data, FILTER_SANITIZE_STRING);\n\t\t \t \t//$data = filter_var($data, FILTER_VALIDATE_EMAIL);\n\t\t \t \t$data = stripcslashes($data);\n\t\t \t \t$data = trim($data);\n\t\t \t \t$data = htmlspecialchars($data);\n\t\t \t \t\n\t\t \t \treturn $data; }",
"function sanitize($string, $force_lowercase = true, $anal = false, $trunc = 100) {\n\t$strip = array(\"~\", \"`\", \"!\", \"@\", \"#\", \"$\", \"%\", \"^\", \"&\", \"*\", \"(\", \")\", \"=\", \"+\", \"{\",\n\t\t\t\t \"}\", \"\\\\\", \"|\", \";\", \":\", \"\\\"\", \"'\", \"‘\", \"’\", \"“\", \"”\", \"–\", \"—\",\n\t\t\t\t \"—\", \"–\", \",\", \"<\", \".\", \">\", \"/\", \"?\");\n\t$clean = trim(str_replace($strip, \"\", strip_tags($string)));\n\t$clean = preg_replace('/\\s+/', \"-\", $clean);\n\t$clean = ($anal ? preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $clean) : $clean);\n\t$clean = ($trunc ? substr($clean, 0, $trunc) : $clean);\n\treturn ($force_lowercase) ?\n\t\t(function_exists('mb_strtolower')) ?\n\t\t\tmb_strtolower($clean, 'UTF-8') :\n\t\t\tstrtolower($clean) :\n\t\t$clean;\n}",
"function sanitize($data) {\n $data = htmlentities(get_magic_quotes_gpc() ? stripslashes($data) : $data, ENT_QUOTES, 'UTF-8');\n return $data;\n }",
"function sanitation($postVal){\n\t$rawinfo= $postVal;\n\t$removeSpecial = htmlspecialchars($rawinfo);\n\t$finalForm = escapeshellcmd($removeSpecial);\n\treturn $finalForm;\n}",
"function cleanInput($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}",
"function clean($data){\n\t\t$this->data = $data;\n\t\t$data = trim($data);\n\t\t$data = stripcslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}",
"public function sanitize($str){\n\t\tglobal $con;\n\t\t$invalid_characters = array(\"$\", \"%\", \"#\", \"<\", \">\", \"|\");\n\t\t$str = str_replace($invalid_characters, \"\", $str);\n\t\t$str=mysqli_real_escape_string($con,$str);\n\t\treturn $str;\n\t}",
"function clean_input($data) \n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function validate_input($data)\n{\n $data = stripslashes($data);\n // $data = preg_replace('/\\s+/', '', $data);\n $data = htmlspecialchars($data);\n \n //$data = trim($data);\n $data = str_replace(\"'\", \"\", $data);\n $data = str_replace(\" \", \"\", $data);\n $data = mb_strtolower($data);\n\n return $data;\n}",
"function sanitize_null_character($param) {\n\treturn input_filter($param);\n}",
"function sanitize($val){\n return htmlentities(stripslashes(trim($val)), ENT_QUOTES);\n}",
"public static function sanitize($filename) {\n\t\t$replace_chars = array(\n\t\t\t'Š'=>'S', 'š'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A',\n\t\t\t'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I',\n\t\t\t'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U',\n\t\t\t'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a',\n\t\t\t'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i',\n\t\t\t'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u',\n\t\t\t'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'ƒ'=>'f'\n\t\t);\n\t\t$f = strtr($filename, $replace_chars);\n\n\t\t// convert & to \"and\", @ to \"at\", and # to \"number\"\n\t\t//\n\t\t$f = preg_replace(array('/[\\&]/', '/[\\@]/', '/[\\#]/'), array('-and-', '-at-', '-number-'), $f);\n\t\t$f = preg_replace('/[^(\\x20-\\x7F)]*/','', $f); // removes any special chars we missed\n\t\t$f = str_replace(' ', '-', $f); // convert space to hyphen\n\t\t$f = str_replace('\\'', '', $f); // removes apostrophes\n\t\t$f = preg_replace('/[^\\w\\-\\.]+/', '', $f); // remove non-word chars (leaving hyphens and periods)\n\t\t$f = preg_replace('/[\\-]+/', '-', $f); // converts groups of hyphens into one\n\t\treturn strtolower($f);\n\t}",
"function secure($input)\n {\n\n $input = trim($input);\n $input = htmlentities($input);\n return $input;\n }",
"function xss_clean($str, $is_image = FALSE)\n{ \n $security =& load_class('Security','core');\n return $security->xss_clean($str, $is_image);\n}",
"function sanitize($str){\n $str = strip_tags($str);//erasing tag or smthg\n $str = rtrim($str);//agadi re pachadi ko space hatauchha\n return $str;\n }",
"function sanitizeDBData($input) {\n $halfSan = filter_var($input, FILTER_SANITIZE_EMAIL);\n\n //sets slashes infront of \" ' and \\\n $output = filter_var($halfSan, FILTER_SANITIZE_MAGIC_QUOTES);\n\n return $output;\n}",
"function sanitize($str,$length=50) {\r\n\t\t$str = trim($str);\r\n\t\t$str = htmlentities($str, ENT_QUOTES);\r\n\t\treturn substr($str,0,$length);\r\n \t}",
"function xss_clean_data($string)\n{\n $CI = & get_instance();\n $return = $CI->security->xss_clean($string);\n return $return;\n}",
"function sanitize($string)\n{\n $MAX_LENGTH = 250; // bytes per chat or text message - fixme?\n $string = substr($string, 0, $MAX_LENGTH);\n $string = no_naughty($string);\n // breaks apos and quot: // $string = htmlentities($string,ENT_QUOTES);\n // useless since the above gets rid of quotes...\n //$string = str_replace(\"'\",\"’\",$string);\n //$string = str_replace(\"\\\"\",\"”\",$string);\n //$string = str_replace('#','£',$string); // special case\n $string = my_utf8($string);\n $string = safe_typing($string);\n return trim($string);\n}",
"function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}",
"function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}",
"function sanitize($bad){\r\n\t\t\t$bad = stripslashes($bad);\r\n\t\t\t$bad = strip_tags($bad);\r\n\t\t\t$good = htmlentities($bad);\r\n\t\t\treturn $good;\r\n\t\t}",
"public function ex_sanitize($data){\n\n\t\treturn mysql_real_escape_string(htmlentities(trim($data)));\n\n\t}",
"private static function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }",
"function sanitize_text(string $text = '')\n{\n return filter_var(trim($text), FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n}",
"function sanitizeData($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\n\t\treturn $data;\n\t}",
"function quake_sanitize_twitter_handler( $input ){\n $output = sanitize_text_field( $input ); // for html charcters\n $output = str_replace('@', '', $output); // for @ chracter\n return $output;\n}",
"public function filter_input($var){\n $var = trim($var);\n return $var = filter_var($var,FILTER_SANITIZE_SPECIAL_CHARS);\n }",
"function replace_specials_characters($s) {\r\n\t\t\t//$s = mb_convert_encoding($s, 'UTF-8','');\r\n\t\t\t$s = preg_replace(\"/á|à|â|ã|ª/\",\"a\",$s);\r\n\t\t\t$s = preg_replace(\"/Á|À|Â|Ã/\",\"A\",$s);\r\n\t\t\t$s = preg_replace(\"/é|è|ê/\",\"e\",$s);\r\n\t\t\t$s = preg_replace(\"/É|È|Ê/\",\"E\",$s);\r\n\t\t\t$s = preg_replace(\"/í|ì|î/\",\"i\",$s);\r\n\t\t\t$s = preg_replace(\"/Í|Ì|Î/\",\"I\",$s);\r\n\t\t\t$s = preg_replace(\"/ó|ò|ô|õ|º/\",\"o\",$s);\r\n\t\t\t$s = preg_replace(\"/Ó|Ò|Ô|Õ/\",\"O\",$s);\r\n\t\t\t$s = preg_replace(\"/ú|ù|û/\",\"u\",$s);\r\n\t\t\t$s = preg_replace(\"/Ú|Ù|Û/\",\"U\",$s);\r\n\t\t\t$s = str_replace(array(\"ñ\", \"Ñ\"), array(\"n\", \"N\"), $s);\r\n\t\t\t$s = str_replace(array('ç', 'Ç'), array('c', 'C'), $s);\r\n\r\n\t\t\t//$s = str_replace(\" \",\"_\",$s);\r\n\t\t\t//$s = preg_replace('/[^a-zA-Z0-9_\\.-]/', '', $s);\r\n\t\t\treturn $s;\r\n\t\t}",
"function ids_sanitize($txt){\r\n\t\t$txt = html_entity_decode($txt);\r\n\t\t$txt = str_replace('-','',$txt);\r\n\t\t$txt = str_replace('\\'','',$txt);\r\n\t\t$txt = str_replace('|','',$txt);\r\n\t\t$txt = str_replace(':','',$txt);\r\n\t\t$txt = str_replace(',','',$txt);\r\n\t\treturn $txt;\r\n\t}",
"function sanitize( $input ){\n $mysqli = self::dbconnect();\n $input = $mysqli->real_escape_string( $input );\n $input = trim($input);\n $input = htmlentities($input);\n $mysqli->close();\n return $input;\n }",
"function fsl_scrub($string){\n \n $xss = new xss_filter();\n $string = $xss->filter_it($string); \n return $string;\n}",
"function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n}",
"static function removeXss($val) {\n\t\t// this prevents some character re-spacing such as <java\\0script>\n\t\t// note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n\t\t$val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n\t\t// straight replacements, the user should never need these since they're normal characters\n\t\t// this prevents like <IMG SRC=@avascript:alert('XSS')>\n\t\t$search = 'abcdefghijklmnopqrstuvwxyz';\n\t\t$search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$search .= '1234567890!@#$%^&*()';\n\t\t$search .= '~`\";:?+/={}[]-_|\\'\\\\';\n\t\tfor ($i = 0; $i < strlen($search); $i++) {\n\t\t // ;? matches the ;, which is optional\n\t\t // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n\n\t\t // @ @ search for the hex values\n\t\t $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n\t\t // @ @ 0{0,7} matches '0' zero to seven times\n\t\t $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n\t\t}\n\n\t\t// now the only remaining whitespace attacks are \\t, \\n, and \\r\n\t\t$ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n\t\t$ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n\t\t$ra = array_merge($ra1, $ra2);\n\n\t\t$found = true; // keep replacing as long as the previous round replaced something\n\t\twhile ($found == true) {\n\t\t $val_before = $val;\n\t\t for ($i = 0; $i < sizeof($ra); $i++) {\n\t\t $pattern = '/';\n\t\t for ($j = 0; $j < strlen($ra[$i]); $j++) {\n\t\t if ($j > 0) {\n\t\t $pattern .= '(';\n\t\t $pattern .= '(&#[xX]0{0,8}([9ab]);)';\n\t\t $pattern .= '|';\n\t\t $pattern .= '|(�{0,8}([9|10|13]);)';\n\t\t $pattern .= ')*';\n\t\t }\n\t\t $pattern .= $ra[$i][$j];\n\t\t }\n\t\t $pattern .= '/i';\n\t\t $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n\t\t $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n\t\t if ($val_before == $val) {\n\t\t // no replacements were made, so exit the loop\n\t\t $found = false;\n\t\t }\n\t\t }\n\t\t}\n\t\treturn $val;\n\t}",
"function removeXSS($val)\t{\n\t// this prevents some character re-spacing such as <java\\0script>\n\t// note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n\t$val = preg_replace('/([\\x00-\\x08][\\x0b-\\x0c][\\x0e-\\x20])/', '', $val);\n\n\t// straight replacements, the user should never need these since they're normal characters\n\t// this prevents like <IMG SRC=@avascript:alert('XSS')>\n\t$search = 'abcdefghijklmnopqrstuvwxyz';\n\t$search.= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t$search.= '1234567890!@#$%^&*()';\n\t$search.= '~`\";:?+/={}[]-_|\\'\\\\';\n\n\tfor ($i = 0; $i < strlen($search); $i++) {\n\t\t// ;? matches the ;, which is optional\n\t\t// 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n\n\t\t// @ @ search for the hex values\n\t\t$val = preg_replace('/(&#[x|X]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n\t\t// @ @ 0{0,7} matches '0' zero to seven times\n\t\t$val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n\t}\n\n\t// now the only remaining whitespace attacks are \\t, \\n, and \\r\n\t$ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n\t$ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n\t$ra = array_merge($ra1, $ra2);\n\n\t$found = true; // keep replacing as long as the previous round replaced something\n\twhile ($found == true) {\n\t\t$val_before = $val;\n\t\tfor ($i = 0; $i < sizeof($ra); $i++) {\n\t\t\t$pattern = '/';\n\t\t\tfor ($j = 0; $j < strlen($ra[$i]); $j++) {\n\t\t\t\tif ($j > 0) {\n\t\t\t\t\t$pattern .= '(';\n\t\t\t\t\t$pattern .= '(&#[x|X]0{0,8}([9][a][b]);?)?';\n\t\t\t\t\t$pattern .= '|(�{0,8}([9][10][13]);?)?';\n\t\t\t\t\t$pattern .= ')?';\n\t\t\t\t}\n\t\t\t\t$pattern .= $ra[$i][$j];\n\t\t\t}\n\t\t\t$pattern .= '/i';\n\t\t\t$replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n\t\t\t$val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n\t\t\tif ($val_before == $val) {\n\t\t\t\t// no replacements were made, so exit the loop\n\t\t\t\t$found = false;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $val;\n}"
] | [
"0.7659934",
"0.761776",
"0.733047",
"0.7316185",
"0.72285694",
"0.7210332",
"0.7189878",
"0.7189062",
"0.71694165",
"0.7159178",
"0.71560365",
"0.71560365",
"0.7132802",
"0.71139026",
"0.7093043",
"0.7077166",
"0.70734566",
"0.7070928",
"0.706726",
"0.7064417",
"0.7050964",
"0.7050964",
"0.7048897",
"0.7038776",
"0.70364773",
"0.7031303",
"0.7020119",
"0.701582",
"0.6998581",
"0.69966805",
"0.69932014",
"0.698858",
"0.69854516",
"0.69800377",
"0.69721204",
"0.69700843",
"0.69668084",
"0.69630075",
"0.6955057",
"0.69516927",
"0.6944218",
"0.69441605",
"0.6943735",
"0.69373286",
"0.69350994",
"0.69211817",
"0.69206846",
"0.69128555",
"0.68958026",
"0.6893788",
"0.68907064",
"0.6888401",
"0.68854636",
"0.6884074",
"0.68822604",
"0.6875982",
"0.6875262",
"0.68672484",
"0.68604136",
"0.6857146",
"0.6848462",
"0.6846611",
"0.6844985",
"0.6843266",
"0.68401855",
"0.6833072",
"0.6832424",
"0.68294156",
"0.6815156",
"0.68127084",
"0.68114275",
"0.6809649",
"0.68092114",
"0.6799772",
"0.67940027",
"0.67932326",
"0.67929757",
"0.6786538",
"0.6785968",
"0.67856944",
"0.6785524",
"0.6782144",
"0.67810017",
"0.67724174",
"0.6768925",
"0.6765789",
"0.67601",
"0.6757695",
"0.67564994",
"0.6750481",
"0.6749177",
"0.6743802",
"0.6737688",
"0.6725742",
"0.67253184",
"0.6718413",
"0.67173237",
"0.6716861",
"0.67166615",
"0.6714618",
"0.6712834"
] | 0.0 | -1 |
used to sanitize alphaonly text | function doMkAlpha ($string)
{
return preg_replace ('/[^a-z0-9]/i', '', $string);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function filteralpha($s){\n return preg_replace(\"/[^: ()_\\-a-zA-Z0-9+]/\",\"\", $s);\n}",
"function sanitizeAlphaNum($var)\n{\n return preg_replace('/[^a-zA-Z0-9]/', '', $var);\n}",
"function sanitize($str){\n $find = array( 'á', 'é', 'í', 'ó', 'ú', 'Á', 'É', 'Í', 'Ó', 'Ú', 'ñ', 'Ñ' );\n $replace = array( 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'n', 'N' );\n return strtolower(preg_replace('/[^a-zA-Z0-9 ]/s', '',str_ireplace($find, $replace, preg_replace('/[^\\w ]/', '', $str))));\n\n }",
"function sanitize_text_field($str)\n {\n }",
"function sanitize_text(string $text = '')\n{\n return filter_var(trim($text), FILTER_SANITIZE_FULL_SPECIAL_CHARS);\n}",
"function cleanText($text)\n{\n\t$text = strtolower($text);\n\t//$text = iconv('utf-8', 'ascii//TRANSLIT', $text);\n\t$text = preg_replace(\"/&([a-z])[a-z]+;/i\", \"$1\", htmlentities($text));\n\t$text = preg_replace(\"#[[:punct:]]#\", \"\", $text);\n\treturn ($text);\n}",
"function textfilter_specialchars($text){\n\t$text = strip_tags(trim($text));\n\t$text = mb_convert_case($text, MB_CASE_LOWER, \"UTF-8\");\n\treturn $text;\n\t}",
"function filter_alphanum($input) {\n return preg_replace(\"/[^a-zA-Z0-9]+/\", \"\", $input);\n}",
"function sanitize($string, $force_lowercase = false, $anal = false)\n{\n $strip = ['~', '`', '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '=', '+', '[', '{', ']', '}', '\\\\', '|', ';', ':', '\"', \"'\", '‘', '’', '“', '”', '–', '—', '—', '–', ',', '<', '.', '>', '/', '?'];\n $clean = trim(str_replace($strip, '', strip_tags($string)));\n $clean = preg_replace('/\\s+/', '-', $clean);\n $clean = ($anal) ? preg_replace('/[^a-zA-Z0-9]/', '', $clean) : $clean;\n\n return ($force_lowercase) ?\n (function_exists('mb_strtolower')) ?\n mb_strtolower($clean, 'UTF-8') :\n strtolower($clean) :\n $clean;\n}",
"function clean_str( $text )\n\t{ // tomreyn says: I'm afraid this function is more likely to cause to trouble than to fix stuff (you have mysql escaping and html escaping elsewhere where it makes more sense, but strip off < and > here already, but then you don't filter non-visible bytes here)\n\t\t//$text=strtolower($text);\n\t\t//$code_entities_match = array('!','@','#','$','%','^','&','*','(',')','_','+','{','}','|','\"','<','>','?','[',']','\\\\',';',\"'\",',','/','*','+','~','`','=');\n\t\t//$code_entities_replace = array('','','','','','','','','','','','','','','','','','','','','');\n\t\t$code_entities_match = array('$','%','^','&','_','+','{','}','|','\"','<','>','?','[',']','\\\\',';',\"'\",'/','+','~','`','=');\n\t\t$code_entities_replace = array('','','','','','','','','','','','','');\n \n\t\t$text = str_replace( $code_entities_match, $code_entities_replace, $text );\n\t\treturn $text;\n\t}",
"function removeNonAlphabets($character){\n return (ctype_alpha($character));\n}",
"function sanitize($name)\n {\n return preg_replace('/[^A-Za-z0-9\\-]/', '', $name);\n }",
"function html_xss_clean($text) {\n return htmlspecialchars($text);\n}",
"public static function sanitize($input){\n\t\t\t\t\n \t\t return $s = preg_replace(\"/[^A-Z0-9a-z\\w ]/u\",\"\", $input);\n\n\t\t}",
"function sanitize_username($s) {\n\treturn preg_replace(\"/[^a-zA-Z0-9-_]/\", '', trim($s));\n}",
"function ctypeAlpha($text){ \n $response = preg_match(\"/[A-Za-z]/\",$text);\n return $response;\n}",
"function alpha_space_only($str) {\n if (!preg_match(\"/^[a-zA-Z ]+$/\",$str)) {\n $this->form_validation->set_message('alpha_space_only', 'The %s field must contain only alphabets and space');\n return FALSE;\n } else {\n return TRUE;\n }\n }",
"function alpha_space_only($str)\n {\n if (!preg_match(\"/^[a-zA-Z- ]+$/\",$str))\n {\n $this->form_validation->set_message('alpha_space_only', 'Le champs %s ne doit contenir que des lettres, tiret (-) et espace.');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n }",
"function alpha_space_only($str){\n\t\tif (!preg_match(\"/^[a-zA-Z ]+$/\",$str)){\n\t\t\t$this->form_validation->set_message('alpha_space_only', 'The %s field must contain only alphabets and space');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn TRUE;\n\t\t}\n\t}",
"function strip_bad_chars( $input ) {\n $output = preg_replace( \"/[^a-zA-Z0-9_-]/\", \"\", $input );\n return $output;\n }",
"function txt_alphanumerical_clean( $t, $additional_tags=\"\" )\n\t{\n\t\tif ( $additional_tags )\n\t\t{\n\t\t\t$additional_tags = preg_quote( $additional_tags, \"/\" );\n\t\t}\n\t\t\n\t\treturn preg_replace( \"/[^a-zA-Z0-9\\-\\_\".$additional_tags.\"]/\", \"\" , $t );\n }",
"function alpha_only_space($str)\r\n\t{\r\n\t\tif (!preg_match(\"/^([-a-z ])+$/i\", $str))\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t}",
"function sa_sanitize_chars($filename) {\n return strtolower(preg_replace('/[^a-zA-Z0-9-_\\.]/', '', $filename));\n}",
"function removeSpecialChars($oldText)\r\n{\r\n // Se corrige os acentos com iso, taca iso\r\n if ( strlen($oldText) > strlen(utf8_decode($oldText)) )\r\n {\r\n $oldText = utf8_decode($oldText);\r\n }\r\n\r\n /*\r\n * A função \"strtr\" substitui os caracteres acentuados pelos não acentuados.\r\n * A função \"ereg_replace\" utiliza uma expressão regular que remove todos os\r\n * caracteres que não são letras, números e são diferentes de \"_\" (underscore).\r\n */\r\n $newText = preg_replace('[^a-zA-Z0-9_-.]', '', strtr($oldText, 'áàãâéêíóôõúüçÁÀÃÂÉÊÍÓÔÕÚÜÇ ', 'aaaaeeiooouucAAAAEEIOOOUUC_'));\r\n\r\n if ( !(strlen($newText) > 0) )\r\n {\r\n $newText = 'nome_invalido-'.getRandomNumbers().getRandomNumbers();\r\n }\r\n\r\n return $newText;\r\n}",
"function Strip_Bad_chars($input)\n{\n //$output = preg_replace(\"/[^a-zA-Z0-9_-]/\", \"\", $input);\n $output = preg_replace(\"/[^0-9]/\", \"\", $input);\n return $output;\n}",
"function alpha_space_only($str)\r\n {\r\n if (!preg_match(\"/^[a-zA-Z ]+$/\",$str))\r\n {\r\n $this->form_validation->set_message('alpha_space_only', 'The %s field must contain only alphabets and space');\r\n return FALSE;\r\n }\r\n else\r\n {\r\n return TRUE;\r\n }\r\n }",
"function make_clean($value) {\n\t\t$legal_chars = \"%[^0-9a-zA-Z������� ]%\"; //allow letters, numbers & space\n\t\t$new_value = preg_replace($legal_chars,\"\",$value); //replace with \"\"\n\t\treturn $new_value;\n\t}",
"function remove_nonalphanum( $data ) {\n\t$text = trim( $data, ' ' );\n\t$text = str_replace( ' ', '-', $text );\n\t$text = preg_replace( '/[^A-Za-z0-9-]/', '', $text );\n\treturn strtolower( $text );\n}",
"function filter_chars($str) {\n\treturn preg_replace(\"/[^A-Za-z0-9_]*/\", \"\", $str);\n}",
"function sanitize_text_field($str) {\n\t$filtered = wp_check_invalid_utf8( $str );\n\n\tif ( strpos($filtered, '<') !== false ) {\n\t\t$filtered = wp_pre_kses_less_than( $filtered );\n\t\t// This will strip extra whitespace for us.\n\t\t$filtered = wp_strip_all_tags( $filtered, true );\n\t} else {\n\t\t$filtered = trim( preg_replace('/[\\r\\n\\t ]+/', ' ', $filtered) );\n\t}\n\n\t$found = false;\n\twhile ( preg_match('/%[a-f0-9]{2}/i', $filtered, $match) ) {\n\t\t$filtered = str_replace($match[0], '', $filtered);\n\t\t$found = true;\n\t}\n\n\tif ( $found ) {\n\t\t// Strip out the whitespace that may now exist after removing the octets.\n\t\t$filtered = trim( preg_replace('/ +/', ' ', $filtered) );\n\t}\n\n\t/**\n\t * Filter a sanitized text field string.\n\t *\n\t * @since 2.9.0\n\t *\n\t * @param string $filtered The sanitized string.\n\t * @param string $str The string prior to being sanitized.\n\t */\n\treturn apply_filters( 'sanitize_text_field', $filtered, $str );\n}",
"function alpha_space_only($str)\n {\n if (!preg_match(\"/^[a-zA-Z ]+$/\",$str))\n {\n $this->form_validation->set_message('alpha_space_only', 'The %s field must contain only alphabets and space');\n return FALSE;\n }\n else\n {\n return TRUE;\n }\n }",
"function _xss_sanitization_esc_attr( $text ) {\n $safe_text = wp_check_invalid_utf8( $text );\n $safe_text = _wp_specialchars( $safe_text, ENT_QUOTES );\n return $safe_text;\n}",
"function sanitizeFormString($inputText)\n{\n $inputText = strip_tags($inputText);\n $inputText = str_replace(\" \", \"\", $inputText);\n //This will make the first character uppercase if a user negelects to do so\n $inputText = ucfirst(strtolower($inputText));\n return $inputText;\n}",
"static function alphaNum( $st_data )\r\n {\r\n $st_data = preg_replace(\"([[:punct:]]| )\",'',$st_data);\r\n return $st_data;\r\n }",
"function scrub($str) {\n\t$str = preg_replace('/[^A-Za-z0-9]/','',$str);\n\treturn $str;\n}",
"public static function clean($text)\n {\n $text = preg_replace('/\\W+/', '', $text);\n \n // trim and lowercase\n $text = strtolower(trim($text, '-'));\n \n return $text;\n }",
"function april_sanitize_alphanumeric ( $s ) {\n\treturn preg_replace(\"/[^a-zA-Z0-9\\\\-]+/\", \"\", $s);\n}",
"public function alpha($content) {\r\n $content = preg_replace ( '/\\s+/', '', $content );\r\n \r\n if (! ctype_alpha ( $content ) && strlen ( $content ) > 0) {\r\n throw new ValidationException ( self::ERROR_NOT_ALPHA );\r\n }\r\n }",
"function sanitize($string, $force_lowercase = true, $anal = false, $trunc = 100) {\n\t$strip = array(\"~\", \"`\", \"!\", \"@\", \"#\", \"$\", \"%\", \"^\", \"&\", \"*\", \"(\", \")\", \"=\", \"+\", \"{\",\n\t\t\t\t \"}\", \"\\\\\", \"|\", \";\", \":\", \"\\\"\", \"'\", \"‘\", \"’\", \"“\", \"”\", \"–\", \"—\",\n\t\t\t\t \"—\", \"–\", \",\", \"<\", \".\", \">\", \"/\", \"?\");\n\t$clean = trim(str_replace($strip, \"\", strip_tags($string)));\n\t$clean = preg_replace('/\\s+/', \"-\", $clean);\n\t$clean = ($anal ? preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $clean) : $clean);\n\t$clean = ($trunc ? substr($clean, 0, $trunc) : $clean);\n\treturn ($force_lowercase) ?\n\t\t(function_exists('mb_strtolower')) ?\n\t\t\tmb_strtolower($clean, 'UTF-8') :\n\t\t\tstrtolower($clean) :\n\t\t$clean;\n}",
"function specialchars($text){\n\t\t$newtext = trim($text);\n\t\t$newtext = strip_tags($newtext);\n\t\t$newtext=htmlspecialchars(str_replace('\\\\', '', $newtext),ENT_QUOTES);\n\t\t$newtext=eregi_replace('&','&',$newtext);\n\t\t//$newtext=nl2br($newtext);\n\t\treturn $newtext;\n\t}",
"function vAlpha( $name ) \r\n\t\t{\t \r\n\t\t\t\treturn ctype_alpha( $name );\r\n\t\t\t\t\t\t \r\n\t\t}",
"function alpha_extra($str) {\n $this->CI->form_validation->set_message('alpha_extra', 'The %s may only contain alpha-numeric characters, spaces, periods, underscores & dashes.');\n return ( ! preg_match(\"/^([\\.\\s-a-z0-9_-])+$/i\", $str)) ? FALSE : TRUE;\n }",
"function remove_allpuncutation($text)\n{\n\t$otext = $text;\n\t$text = preg_replace('/[^a-zA-Z0-9|+|-|\\*|Š|š|Ž|ž|À|Á|Â|Ã|Ä|Å|Æ|Ç|È|É|Ê|Ë|Ì|Í|Î|Ï|Ñ|Ò|Ó|Ô|Õ|Ö|Ø|Ù|Ú|Û|Ü|Ý|Þ|ß|à|á|â|ã|ä|å|æ|ç|è|é|ê|ë|ì|í|î|ï|ð|ñ|ò|ó|ô|õ|ö|ø|ù|ú|û|ý|þ|ÿ]/is', ' ', $text);\n\t\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",3);\n\t\n\treturn $text;\n}",
"function anti_xss($text){\n\t\t$a = array( \n\t\t\t'@< [/!]*?[^<>]*?>@si',\n\t\t\t'@< ![sS]*?--[ tnr]*>@',\n\t\t\t'/(?i)\\<script\\>(.*?)\\<\\/script\\>/i',\n\t\t\t'/(?i)\\<script (.*?)\\>(.*?)\\<\\/script>/i',\n\t\t\t'/(?i)\\<style\\>(.*?)\\<\\/style\\>/i',\n\t\t\t'/(?i)\\<style (.*?)\\>(.*?)\\<\\/style>/i'\n\t ); \n\n\t $b = array( \n\t\t\t'',\n\t\t\t'',\n\t\t\thtml_entity_decode('<script>\\\\1</script>'),\n\t\t\thtml_entity_decode('<script \\\\1>\\\\2</script>'),\n\t\t\thtml_entity_decode('<style>\\\\1</style>'),\n\t\t\thtml_entity_decode('<style \\\\1>\\\\2</style>')\n\t\t);\n\n foreach($a AS $key => $val){\n\t\t\twhile(preg_match($val, $text)){\n\t\t\t\t$text = preg_replace($val, '', $text);\n\t\t\t}\n\t\t}\n\t\t$text = preg_replace($a, $b, $text);\n\t\treturn $text;\n\t}",
"private function process_alpha($value)\n {\n return ! preg_match('/[^a-zA-Z]/', $value);\n }",
"function filter($word)\r\n{\r\n $word = trim($word);\r\n $word = preg_replace('/[^A-Za-z0-9\\-]/','', $word);\r\n return strtolower($word);\r\n}",
"function alphaOnly($str){\n\tif(preg_match(\"/[^a-zA-Z]/\",$str))\n\t{return false;}else{return true;} //opposite logic from email?\n}",
"public static function string_sanitize($s) {\n $result = preg_replace(\"/[^a-zA-Z0-9]+/\", \"\", html_entity_decode($s, ENT_QUOTES));\n return $result;\n }",
"function clean_text($text) {\n\treturn $text;\n}",
"function the_champ_sanitize_user($username, $rawUsername, $strict){\r\n\t$username = wp_strip_all_tags($rawUsername);\r\n\t$username = remove_accents($username);\r\n\t$username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);\r\n\t$username = preg_replace('/&.+?;/', '', $username);\r\n\t// If strict, reduce to ASCII and Cyrillic characters for max portability.\r\n\tif($strict){\r\n\t\t$settings = get_option('wscu_settings');\r\n\t\t$username = preg_replace('|[^a-z\\p{Arabic}\\p{Cyrillic}0-9 _.\\-@]|iu', '', $username);\r\n\t}\r\n\t$username = trim($username);\r\n\t// Consolidate contiguous whitespace\r\n\t$username = preg_replace('|\\s+|', ' ', $username);\r\n\r\n\treturn $username;\r\n}",
"function validate_input($data)\n{\n $data = stripslashes($data);\n // $data = preg_replace('/\\s+/', '', $data);\n $data = htmlspecialchars($data);\n \n //$data = trim($data);\n $data = str_replace(\"'\", \"\", $data);\n $data = str_replace(\" \", \"\", $data);\n $data = mb_strtolower($data);\n\n return $data;\n}",
"function remove_strange_chars($txt){\n\t\treturn(str_replace(array('<','>',\"'\",\";\",\"&\",\"\\\\\"),'',$txt));\n\t}",
"static public function is_alpha($value) {\n\t\treturn !preg_match(\"/[^a-zA-Z_-\\s]/\",$value);\n\t}",
"public abstract function sanitize($string);",
"function check_plain($text) {\n return validate_utf8($text) ? htmlspecialchars($text, ENT_QUOTES) : '';\n}",
"function secure_input($input) {\n\t\t\t$input = trim($input);\n\t\t\t$input = htmlspecialchars($input);\n\t\t\treturn $input;\n\t\t}",
"public static function onlyAlpha($value)\n {\n return preg_replace('#[^[:alpha:]]#', '', $value);\n }",
"function sanitizeName() {\n $pattern = \"/[0-9`!@#$%^&*()_+\\-=\\[\\]{};':\\\"\\\\|,.<>\\/?~]/\";\n if (!preg_match($pattern, $this->fname) && !preg_match($pattern, $this->lname)) {\n $this->fname = trim($this->fname);\n $this->lname = trim($this->lname);\n } else {\n die(\"Error. Check your form data\");\n }\n }",
"function filter_user_text($str) {\r\n\tif (!$str) return '';\r\n\r\n\t$str = preg_replace('/(\\r?\\n)+/', ' ', $str);\r\n\t$str = preg_replace('/\\s+/', ' ', $str);\r\n\t$str = str_replace('\"', '\\\"', $str);\r\n//\t$str = str_replace(\"'\", \"\\'\", $str);\r\n\t\r\n\treturn $str;\r\n}",
"function preclean($dirtyString){\n\t\t//1. removes any bad characters\n\t\t//2. trims whitespace\n\n\t\treturn ereg_replace(\"[^A-Za-z0-9-]\", \"\", trim($dirtyString));\n\t}",
"protected function filterAlphanum($value) {\n return preg_replace(\"/[^a-z0-9]/i\", \"\", $value);\n }",
"function slugify2($text){\r\n\r\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\r\n\r\n\r\n\r\n // transliterate\r\n\r\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\r\n\r\n\r\n\r\n // remove unwanted characters\r\n\r\n $text = preg_replace('~[^-\\w]+~', '', $text);\r\n\r\n\r\n\r\n // trim\r\n\r\n $text = trim($text, '-');\r\n\r\n\r\n\r\n // remove duplicated - symbols\r\n\r\n $text = preg_replace('~-+~', '-', $text);\r\n\r\n\r\n\r\n // lowercase\r\n\r\n $text = strtolower($text);\r\n\r\n\r\n\r\n if (empty($text)) {\r\n\r\n return 'n-a';\r\n\r\n }\r\n\r\n\r\n\r\n return $text;\r\n\r\n}",
"function sanitizeFormUsername($inputText)\n{\n\n //The strip_tags() function strips a string from HTML, XML, and PHP tags. Strips all html elements that may be on a string \n //this is a security measure. Users can alter the site if they can submit html elements in a form. \n $inputText = strip_tags($inputText);\n\n //finding every single space in the string and replacing it with no space. Needed if a user enters a username with a space. \n //takes eveything in the first parameter and replaces it with whatever is located in the second parameter\n $inputText = str_replace(\" \", \"\", $inputText);\n\n return $inputText;\n}",
"function remove_xss($val) {\n // this prevents some character re-spacing such as <java\\0script>\n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=@avascript:alert('XSS')>\n $search = 'abcdefghijklmnopqrstuvwxyz';\n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $search .= '1234567890!@#$%^&*()';\n $search .= '~`\";:?+/={}[]-_|\\'\\\\';\n for ($i = 0; $i < strlen($search); $i++) {\n // ;? matches the ;, which is optional\n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n // @ @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n // @ @ 0{0,7} matches '0' zero to seven times\n $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n }\n\n // now the only remaining whitespace attacks are \\t, \\n, and \\r\n $ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n $ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n $ra = array_merge($ra1, $ra2);\n\n $found = true; // keep replacing as long as the previous round replaced something\n while ($found == true) {\n $val_before = $val;\n for ($i = 0; $i < sizeof($ra); $i++) {\n $pattern = '/';\n for ($j = 0; $j < strlen($ra[$i]); $j++) {\n if ($j > 0) {\n $pattern .= '(';\n $pattern .= '(&#[xX]0{0,8}([9ab]);)';\n $pattern .= '|';\n $pattern .= '|(�{0,8}([9|10|13]);)';\n $pattern .= ')*';\n }\n $pattern .= $ra[$i][$j];\n }\n $pattern .= '/i';\n $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n if ($val_before == $val) {\n // no replacements were made, so exit the loop\n $found = false;\n }\n }\n }\n return $val;\n}",
"protected static function _alphaNumeric(){\n if (self::$_ruleValue) {\n $str = trim(self::$_elementValue);\n if (!preg_match('/[a-zA-z0-9]/', $str)) {\n self:: setErrorMessage(\"Alphanumeric only\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }",
"function char_filter($ojb)\n {\n $badchars='Ý`~!@$%^()+-_=[]{}\\'\\\\:\"|,/<>? '; # Nhung ky tu khong cho phep duoc len danh sach tai day\n for ($i=0;$i<strlen($badchars);$i++){\n $ojb=str_replace($badchars[$i],\"\",$ojb);\n\n }\n\n return $ojb;\n }",
"function is_clean_text($string, $min_length = 0, $max_length = 0)\r\n{\r\n $ret = _is_valid($string, $min_length, $max_length, \"[a-zA-Z[:space:]!()=?¿ÀÁÂÃÄŰ\\\\\\\"/ÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ`´']+\");\r\n\r\n return($ret);\r\n}",
"public function alpha_space_only($str)\n\t{\n\t\tif (!preg_match(\"/^[a-zA-Z ]+$/\",$str))\n\t\t{\n\t\t\t$this->form_validation->set_message('alpha_space_only', 'The %s field must contain only alphabets and space');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}",
"function filter($string){\n\t\t\t\t\t\t$string = htmlspecialchars($string);\n\t\t\t\t\t\t$string = preg_replace(array('`[^a-z0-9]`i','`[-]+`'), '-', $string);\n\t\t\t\t\t\t$string = mysql_escape_string($string);\n\t\t\t\t\t\treturn $string;\n\t\t\t\t\t}",
"function remove_puncutation($text)\n{\t\n\t$otext = $text;\n\t$text = preg_replace('/[^a-zA-Z0-9|+|-|*|\\/|\\.|?|!|Š|š|Ž|ž|À|Á|Â|Ã|Ä|Å|Æ|Ç|È|É|Ê|Ë|Ì|Í|Î|Ï|Ñ|Ò|Ó|Ô|Õ|Ö|Ø|Ù|Ú|Û|Ü|Ý|Þ|ß|à|á|â|ã|ä|å|æ|ç|è|é|ê|ë|ì| í|î|ï|ð|ñ|ò|ó|ô|õ|ö|ø|ù|ú|û|ý|þ|ÿ]/i', ' ', $text);\n\t\n\trunDebug( __FILE__, __FUNCTION__, __LINE__, \"In: $otext Out:$text\",3);\n\t\n\treturn $text;\n}",
"function slugify($text)\r\n{\r\n // replace non letter or digits by -\r\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\r\n\r\n // transliterate\r\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\r\n\r\n // remove unwanted characters\r\n $text = preg_replace('~[^-\\w]+~', '', $text);\r\n\r\n // trim\r\n $text = trim($text, '-');\r\n\r\n // remove duplicate -\r\n $text = preg_replace('~-+~', '-', $text);\r\n\r\n // lowercase\r\n $text = strtolower($text);\r\n\r\n if (empty($text)) {\r\n return 'n-a';\r\n }\r\n\r\n return $text;\r\n}",
"function sAlphanumeric( $string )\r\n\t\t{\r\n\t\t\t\treturn preg_replace( '/[^a-zA-Z0-9]/', '', $string );\r\n\t\t\t\t\r\n\t\t}",
"function sanitizeCallback(\n $var, \n $options = array('options' => 'isLowerAlpha'), \n $filterType = FILTER_CALLBACK)\n{\n\n $varOutput = filter_var( $var, $filterType, $options);\n\n return stripslashes(strip_tags(htmlentities($varOutput, ENT_QUOTES)));\n\n}",
"function vAlphanumeric( $string )\r\n\t\t{\r\n\t\t\treturn ctype_alnum ( $string );\r\n\t\t\t\t\r\n\t\t}",
"function validateCharsDie(&$text)\n{\n\t$matches = preg_match('/[^-a-z0-9]/', $text);\n\n\tif($matches)\n\t\tdie('Invalid characters specified in input. This could be caused by invalid cookie data, thus it is recommended to clear your cookies.');\n}",
"function safeString($string)\n {\n return eregi_replace('[^[:alnum:] ]', '', $string);\n }",
"private static function stripIllegalChars()\n {\n $input_arr = array();\n foreach ($_POST as $key => $input_arr)\n {\n $_POST[$key] = preg_replace(\"/[^a-zA-Z0-9\\s!@#$%&*()_\\-=+?.,:\\/]/\", \"\", $input_arr);\n }\n }",
"function remove_xss($val) {\n // this prevents some character re-spacing such as <java\\0script>\n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=@avascript:alert('XSS')>\n $search = 'abcdefghijklmnopqrstuvwxyz';\n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $search .= '1234567890!@#$%^&*()';\n $search .= '~`\";:?+/={}[]-_|\\'\\\\';\n for ($i = 0; $i < strlen($search); $i++) {\n // ;? matches the ;, which is optional\n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n\n // @ @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n // @ @ 0{0,7} matches '0' zero to seven times\n $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n }\n\n // now the only remaining whitespace attacks are \\t, \\n, and \\r\n $ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n $ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n $ra = array_merge($ra1, $ra2);\n\n $found = true; // keep replacing as long as the previous round replaced something\n while ($found == true) {\n $val_before = $val;\n for ($i = 0; $i < sizeof($ra); $i++) {\n $pattern = '/';\n for ($j = 0; $j < strlen($ra[$i]); $j++) {\n if ($j > 0) {\n $pattern .= '(';\n $pattern .= '(&#[xX]0{0,8}([9ab]);)';\n $pattern .= '|';\n $pattern .= '|(�{0,8}([9|10|13]);)';\n $pattern .= ')*';\n }\n $pattern .= $ra[$i][$j];\n }\n $pattern .= '/i';\n $replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n if ($val_before == $val) {\n // no replacements were made, so exit the loop\n $found = false;\n }\n }\n }\n return $val;\n}",
"function text_filter($text)\r\n\t{\r\n\t\t$text = htmlspecialchars($text);\r\n\t\t$text = nl2br($text);\r\n\t\treturn $text;\r\n\t}",
"function cleanName($name) {\n \t$search_array=array('Р Т‘','Р”','С†','Р В¦','РЎРЉ','Р В¬','ä','Ä','ö','Ö','ü','Ü');\n \t$replace_array=array('ae','Ae','oe','Oe','ue','Ue','ae','Ae','oe','Oe','ue','Ue');\n \t$name=str_replace($search_array,$replace_array,$name); \t\n \t\n $replace_param='/[^a-zA-Z0-9]/';\n $name=preg_replace($replace_param,'-',$name); \n return $name;\n }",
"function sanitize_input($str) {\n\treturn preg_replace(\"/[?'&<>\\\"]/\", \"\", $str);\n}",
"public function filterInput(string $input) : string {\n return trim(preg_replace('/[^a-zA-Z0-9\\s]/', '',$input));\t\n }",
"function sanitize(){\r\n\t\t $outar = Array();\r\n \t $arg_list = func_get_args();\r\n\t\t foreach($arg_list[0] as $key => $value){\r\n\t\t\t\t $data = $value;\r\n\t\t\t\t $data = PREG_REPLACE(\"/[^0-9a-zA-Z]/i\", '', $data);\r\n\t\t\t\t array_push($outar,$data);\r\n\t\t }\r\n\t\treturn $outar;\r\n\t }",
"public function alpha_only_space($str)\n {\n if (!preg_match(\"/^([-a-z ])+$/i\", $str)) {\n $this->form_validation->set_message('alpha_only_space', 'The %s field must contain only alphabets or spaces');\n return FALSE;\n } else {\n return TRUE;\n }\n }",
"abstract public function sanitize();",
"function slugify($text)\n\t{\n\t $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\t\n\t // trim\n\t $text = trim($text, '-');\n\t\n\t // transliterate\n\t if (function_exists('iconv'))\n\t {\n\t\t$text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n\t }\n\t\n\t // lowercase\n\t $text = strtolower($text);\n\t\n\t // remove unwanted characters\n\t $text = preg_replace('~[^-\\w]+~', '', $text);\n\t\n\t if (empty($text))\n\t {\n\t\treturn 'n-a';\n\t }\n\t\n\t return $text;\n\t}",
"function validateText($text)\n {\n return addslashes(htmlentities(strip_tags($text))); \n }",
"function sanitize_string_xss(string $data): string\n{\n return filter_var($data, FILTER_SANITIZE_STRING);\n}",
"public static function sanitize($filename) {\n\t\t$replace_chars = array(\n\t\t\t'Š'=>'S', 'š'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A',\n\t\t\t'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I',\n\t\t\t'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U',\n\t\t\t'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a',\n\t\t\t'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i',\n\t\t\t'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u',\n\t\t\t'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y', 'ƒ'=>'f'\n\t\t);\n\t\t$f = strtr($filename, $replace_chars);\n\n\t\t// convert & to \"and\", @ to \"at\", and # to \"number\"\n\t\t//\n\t\t$f = preg_replace(array('/[\\&]/', '/[\\@]/', '/[\\#]/'), array('-and-', '-at-', '-number-'), $f);\n\t\t$f = preg_replace('/[^(\\x20-\\x7F)]*/','', $f); // removes any special chars we missed\n\t\t$f = str_replace(' ', '-', $f); // convert space to hyphen\n\t\t$f = str_replace('\\'', '', $f); // removes apostrophes\n\t\t$f = preg_replace('/[^\\w\\-\\.]+/', '', $f); // remove non-word chars (leaving hyphens and periods)\n\t\t$f = preg_replace('/[\\-]+/', '-', $f); // converts groups of hyphens into one\n\t\treturn strtolower($f);\n\t}",
"function justAlphanumeric($var)\n{\n return preg_replace('/[^0-9A-Za-z]/', '', $var);\n}",
"function alaya_filter_mark($text){ \n\tif(trim($text)=='')return ''; \n\t$text=preg_replace(\"/[[:punct:]\\s]/\",' ',$text); \n\t$text=urlencode($text); \n\t$text=preg_replace(\"/(%7E|%60|%21|%40|%23|%24|%25|%5E|%26|%27|%2A|%28|%29|%2B|%7C|%5C|%3D|\\-|_|%5B|%5D|%7D|%7B|%3B|%22|%3A|%3F|%3E|%3C|%2C|\\.|%2F|%A3%BF|%A1%B7|%A1%B6|%A1%A2|%A1%A3|%A3%AC|%7D|%A1%B0|%A3%BA|%A3%BB|%A1%AE|%A1%AF|%A1%B1|%A3%FC|%A3%BD|%A1%AA|%A3%A9|%A3%A8|%A1%AD|%A3%A4|%A1%A4|%A3%A1|%E3%80%82|%EF%BC%81|%EF%BC%8C|%EF%BC%9B|%EF%BC%9F|%EF%BC%9A|%E3%80%81|%E2%80%A6%E2%80%A6|%E2%80%9D|%E2%80%9C|%E2%80%98|%E2%80%99|%EF%BD%9E|%EF%BC%8E|%EF%BC%88)+/\",' ',$text); \n\t$text=urldecode($text); \n\treturn trim($text); \n}",
"function sanitize($str) {\n return trim(htmlspecialchars($str));\n}",
"function cws_clean( $string ) {\n\t$string = str_replace( array( '[\\', \\']' ), '', $string);\n\t$string = preg_replace( '/\\[.*\\]/U', '', $string );\n\t$string = preg_replace( '/&(amp;)?#?[a-z0-9]+;/i', '-', $string );\n\t$string = htmlentities( $string, ENT_COMPAT, 'utf-8' );\n\t$string = preg_replace( '/&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);/i', '\\\\1', $string );\n\t$string = preg_replace( array('/[^a-z0-9]/i', '/[-]+/') , '-', $string );\n\n\treturn strtolower( trim( $string, '-' ) );\n}",
"function slugify($text)\r\n{\r\n $text = preg_replace('~[^\\pL\\d]+~u', '-', $text);\r\n\r\n // transliterate\r\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\r\n\r\n // remove unwanted characters\r\n $text = preg_replace('~[^-\\w]+~', '', $text);\r\n\r\n // trim\r\n $text = trim($text, '-');\r\n\r\n // remove duplicate -\r\n $text = preg_replace('~-+~', '-', $text);\r\n\r\n // lowercase\r\n $text = strtolower($text);\r\n\r\n if (empty($text)) {\r\n return 'n-a';\r\n }\r\n\r\n return $text;\r\n}",
"public function filter($value)\n {\n $whiteSpace = $this->allowWhiteSpace ? '\\s' : '';\n\n if ($this->englishAlphabethOnly || !self::$unicodeEnabled) {\n $pattern = '/[^a-zA-Z' . $whiteSpace . ']/';\n }\n else {\n $pattern = '/[^\\p{L}' . $whiteSpace . ']/u';\n }\n\n return preg_replace($pattern, '', (string) $value);\n }",
"function cleanString($text) {\r\n\t\t\t// 1) convert á ô => a o\r\n\t\t\t$text = preg_replace(\"/[áàâãªä]/u\",\"a\",$text);\r\n\t\t\t$text = preg_replace(\"/[ÁÀÂÃÄ]/u\",\"A\",$text);\r\n\t\t\t$text = preg_replace(\"/[ÍÌÎÏ]/u\",\"I\",$text);\r\n\t\t\t$text = preg_replace(\"/[íìîï]/u\",\"i\",$text);\r\n\t\t\t$text = preg_replace(\"/[éèêë]/u\",\"e\",$text);\r\n\t\t\t$text = preg_replace(\"/[ÉÈÊË]/u\",\"E\",$text);\r\n\t\t\t$text = preg_replace(\"/[óòôõºö]/u\",\"o\",$text);\r\n\t\t\t$text = preg_replace(\"/[ÓÒÔÕÖ]/u\",\"O\",$text);\r\n\t\t\t$text = preg_replace(\"/[úùûü]/u\",\"u\",$text);\r\n\t\t\t$text = preg_replace(\"/[ÚÙÛÜ]/u\",\"U\",$text);\r\n\t\t\t$text = preg_replace(\"/[’‘‹›‚]/u\",\"'\",$text);\r\n\t\t\t$text = preg_replace(\"/[“”«»„]/u\",'\"',$text);\r\n\t\t\t$text = str_replace(\"–\",\"-\",$text);\r\n\t\t\t$text = str_replace(\" \",\" \",$text);\r\n\t\t\t$text = str_replace(\"ç\",\"c\",$text);\r\n\t\t\t$text = str_replace(\"Ç\",\"C\",$text);\r\n\t\t\t$text = str_replace(\"ñ\",\"n\",$text);\r\n\t\t\t$text = str_replace(\"Ñ\",\"N\",$text);\r\n\t \r\n\t\t\t//2) Translation CP1252. – => -\r\n\t\t\t$trans = get_html_translation_table(HTML_ENTITIES); \r\n\t\t\t$trans[chr(130)] = '‚'; // Single Low-9 Quotation Mark \r\n\t\t\t$trans[chr(131)] = 'ƒ'; // Latin Small Letter F With Hook \r\n\t\t\t$trans[chr(132)] = '„'; // Double Low-9 Quotation Mark \r\n\t\t\t$trans[chr(133)] = '…'; // Horizontal Ellipsis \r\n\t\t\t$trans[chr(134)] = '†'; // Dagger \r\n\t\t\t$trans[chr(135)] = '‡'; // Double Dagger \r\n\t\t\t$trans[chr(136)] = 'ˆ'; // Modifier Letter Circumflex Accent \r\n\t\t\t$trans[chr(137)] = '‰'; // Per Mille Sign \r\n\t\t\t$trans[chr(138)] = 'Š'; // Latin Capital Letter S With Caron \r\n\t\t\t$trans[chr(139)] = '‹'; // Single Left-Pointing Angle Quotation Mark \r\n\t\t\t$trans[chr(140)] = 'Œ'; // Latin Capital Ligature OE \r\n\t\t\t$trans[chr(145)] = '‘'; // Left Single Quotation Mark \r\n\t\t\t$trans[chr(146)] = '’'; // Right Single Quotation Mark \r\n\t\t\t$trans[chr(147)] = '“'; // Left Double Quotation Mark \r\n\t\t\t$trans[chr(148)] = '”'; // Right Double Quotation Mark \r\n\t\t\t$trans[chr(149)] = '•'; // Bullet \r\n\t\t\t$trans[chr(150)] = '–'; // En Dash \r\n\t\t\t$trans[chr(151)] = '—'; // Em Dash \r\n\t\t\t$trans[chr(152)] = '˜'; // Small Tilde \r\n\t\t\t$trans[chr(153)] = '™'; // Trade Mark Sign \r\n\t\t\t$trans[chr(154)] = 'š'; // Latin Small Letter S With Caron \r\n\t\t\t$trans[chr(155)] = '›'; // Single Right-Pointing Angle Quotation Mark \r\n\t\t\t$trans[chr(156)] = 'œ'; // Latin Small Ligature OE \r\n\t\t\t$trans[chr(159)] = 'Ÿ'; // Latin Capital Letter Y With Diaeresis \r\n\t\t\t$trans['euro'] = '€'; // euro currency symbol \r\n\t\t\tksort($trans); \r\n\t\t\t \r\n\t\t\tforeach ($trans as $k => $v) {\r\n\t\t\t\t\t$text = str_replace($v, $k, $text);\r\n\t\t\t}\r\n\t \r\n\t\t\t// 3) remove <p>, <br/> ...\r\n\t\t\t//$text = strip_tags($text); \r\n\t\t\t \r\n\t\t\t// 4) & => & " => '\r\n\t\t\t//$text = html_entity_decode($text);\r\n\t\t\t \r\n\t\t\t// 5) remove Windows-1252 symbols like \"TradeMark\", \"Euro\"...\r\n\t\t\t$text = preg_replace('/[^(\\x20-\\x7F)]*/','', $text); \r\n\t\t\t \r\n\t\t\t$targets=array('\\r\\n','\\n','\\r','\\t');\r\n\t\t\t$results=array(\" \",\" \",\" \",\"\");\r\n\t\t\t$text = str_replace($targets,$results,$text);\r\n\t \r\n\t\t\t//XML compatible\r\n\t\t\t/*\r\n\t\t\t$text = str_replace(\"&\", \"and\", $text);\r\n\t\t\t$text = str_replace(\"<\", \".\", $text);\r\n\t\t\t$text = str_replace(\">\", \".\", $text);\r\n\t\t\t$text = str_replace(\"\\\\\", \"-\", $text);\r\n\t\t\t$text = str_replace(\"/\", \"-\", $text);\r\n\t\t\t*/\r\n\t\t\t \r\n\t\t\treturn ($text);\r\n\t\t}",
"function _sanitize_text_fields($str, $keep_newlines = \\false)\n {\n }",
"function slugify($text)\n{\n // replace non letter or digits by -\n $text = preg_replace('~[^\\\\pL\\d]+~u', '-', $text);\n\n // trim\n $text = trim($text, '-');\n\n // transliterate\n if (function_exists('iconv')) {\n $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text);\n }\n\n // lowercase\n $text = strtolower($text);\n\n // remove unwanted characters\n $text = preg_replace('~[^-\\w]+~', '', $text);\n\n if (empty($text)) {\n return 'n-a';\n }\n\n return $text;\n}",
"function quake_sanitize_twitter_handler( $input ){\n $output = sanitize_text_field( $input ); // for html charcters\n $output = str_replace('@', '', $output); // for @ chracter\n return $output;\n}",
"public static function clean ($text) {\n\t\t$to_return = strtolower($text);\n\t\t$to_return = preg_replace(\"/(?![.=$'€%-])\\p{P}/u\", \"\", $to_return);\n\t\t$to_return = trim($to_return);\n\t\t// remove double spacing\n\t\twhile (strpos($to_return, ' ')) {\n\t\t\t$to_return = str_replace(' ', ' ', $to_return);\n\t\t}\n\t\treturn $to_return;\n\t}"
] | [
"0.7380427",
"0.73453593",
"0.7321304",
"0.72482264",
"0.71862984",
"0.7178205",
"0.71196127",
"0.7102588",
"0.7020207",
"0.7005669",
"0.6992209",
"0.69258165",
"0.69006103",
"0.68854904",
"0.68537664",
"0.68440825",
"0.682285",
"0.68161887",
"0.68047416",
"0.6803805",
"0.6782711",
"0.6770633",
"0.67571646",
"0.67540324",
"0.67536503",
"0.6752641",
"0.67387205",
"0.67276263",
"0.6712231",
"0.6710545",
"0.6708476",
"0.6707693",
"0.6702875",
"0.66970736",
"0.6685893",
"0.66824305",
"0.66708934",
"0.6670393",
"0.66700447",
"0.6654908",
"0.6621347",
"0.65873224",
"0.6581144",
"0.656268",
"0.6551383",
"0.6545594",
"0.6543844",
"0.6525693",
"0.6508613",
"0.6502619",
"0.64898956",
"0.6483114",
"0.64819914",
"0.64689165",
"0.64593905",
"0.64571303",
"0.645657",
"0.6447506",
"0.64460737",
"0.64459896",
"0.6434259",
"0.64280635",
"0.6415081",
"0.6411786",
"0.64097595",
"0.64063483",
"0.6405871",
"0.6405019",
"0.64016813",
"0.639827",
"0.63949907",
"0.63937527",
"0.6392016",
"0.6390367",
"0.63884133",
"0.63865334",
"0.6385412",
"0.6382698",
"0.6381537",
"0.6378508",
"0.6375706",
"0.6362532",
"0.63571936",
"0.6354476",
"0.6352734",
"0.63515466",
"0.6346694",
"0.6346335",
"0.6329924",
"0.632951",
"0.632499",
"0.6320979",
"0.6313073",
"0.6308876",
"0.6305514",
"0.6303057",
"0.6302951",
"0.6300433",
"0.62998366",
"0.6294667"
] | 0.6937573 | 11 |
used to make the passwords | function doMkPassword ($string)
{
global $main;
return ($main->conf['account']['hashing']['type'] == 'md5' ? md5 (sprintf ($main->conf['account']['hashing']['seed'], $string)) : sha1 (sprintf ($main->conf['account']['hashing']['seed'], $string)));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function generatePassword() {\n // 57 prefixes\n $aPrefix = array('aero', 'anti', 'ante', 'ande', 'auto', \n 'ba', 'be', 'bi', 'bio', 'bo', 'bu', 'by', \n 'ca', 'ce', 'ci', 'cou', 'co', 'cu', 'cy', \n 'da', 'de', 'di', 'duo', 'dy', \n 'eco', 'ergo', 'exa', \n 'geo', 'gyno', \n 'he', 'hy', 'ki',\n 'intra', \n 'ma', 'mi', 'me', 'mo', 'my', \n 'na', 'ni', 'ne', 'no', 'ny', \n 'omni', \n 'pre', 'pro', 'per', \n 'sa', 'se', 'si', 'su', 'so', 'sy', \n 'ta', 'te', 'tri',\n 'uni');\n\n // 30 suffices\n $aSuffix = array('acy', 'al', 'ance', 'ate', 'able', 'an', \n 'dom', \n 'ence', 'er', 'en',\n 'fy', 'ful', \n 'ment', 'ness',\n 'ist', 'ity', 'ify', 'ize', 'ise', 'ible', 'ic', 'ical', 'ous', 'ish', 'ive', \n 'less', \n 'sion',\n 'tion', 'ty', \n 'or');\n\n // 8 vowel sounds \n $aVowels = array('a', 'o', 'e', 'i', 'y', 'u', 'ou', 'oo'); \n\n // 20 random consonants \n $aConsonants = array('w', 'r', 't', 'p', 's', 'd', 'f', 'g', 'h', 'j', \n 'k', 'l', 'z', 'x', 'c', 'v', 'b', 'n', 'm', 'qu');\n\n // Some consonants can be doubled\n $aDoubles = array('n', 'm', 't', 's');\n\n // \"Salt\"\n $aSalt = array('!', '#', '%', '?');\n\n $pwd = $aPrefix[array_rand($aPrefix)];\n\n // add random consonant(s)\n $c = $aConsonants[array_rand($aConsonants)];\n if ( in_array( $c, $aDoubles ) ) {\n // 33% chance of doubling it\n if (rand(0, 2) == 1) { \n $c .= $c;\n }\n }\n $pwd .= $c;\n\n // add random vowel\n $pwd .= $aVowels[array_rand($aVowels)];\n\n $pwdSuffix = $aSuffix[array_rand($aSuffix)];\n // If the suffix begins with a vovel, add one or more consonants\n if ( in_array( $pwdSuffix[0], $aVowels ) ) {\n $pwd .= $aConsonants[array_rand($aConsonants)];\n }\n $pwd .= $pwdSuffix;\n\n $pwd .= rand(2, 999);\n # $pwd .= $aSalt[array_rand($aSalt)];\n\n // 50% chance of capitalizing the first letter\n if (rand(0, 1) == 1) {\n $pwd = ucfirst($pwd);\n }\n return $pwd;\n }",
"function createNewPassword() {\n\t $genKey = \"0123456789abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ!@#$%&*()_+\";//set the random generator key from a-z and A-Z and 0-9\n\t $pass = array(); //declare $pass as the variable to store array\n\t $genKeyLength = strlen($genKey) - 1; //put the length -1 in cache\n\t for ($i = 0; $i < 10; $i++) {\n\t $n = rand(0, $genKeyLength);//set $n to store the generated random key\n\t $pass[] = $genKey[$n]; //set $pass to store the array of generated key\n\t }\n\t return implode($pass); // used implode turn the array into a string\n\t}",
"function wp_generate_password($length = 12, $special_chars = \\true, $extra_special_chars = \\false)\n {\n }",
"public function olvidoPassword(){\n\t}",
"private function generate_pass()\n {\n echo password_hash('admin', PASSWORD_BCRYPT);\n }",
"public static function renderPassword();",
"function makePassword() {\n $alphaNum = array(2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, h, i, j, k, m, n, p, q, r, s, t, u, v, w, x, y, z);\n srand ((double) microtime() * 1000000);\n $pwLength = \"7\"; // this sets the limit on how long the password is.\n for($i = 1; $i <=$pwLength; $i++) {\n $newPass .= $alphaNum[(rand(0,31))];\n }\n return ($newPass);\n}",
"public function generate_pw(){\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = str_shuffle($alphabet);\n $pass = substr($pass, 0, 8);\n $this->setPassword($pass);\n return $pass; //turn the array into a string\n }",
"public function password()\n {\n }",
"public static function makePassword()\n {\n $pass = \"\";\n $chars = array(\n \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\",\n \"a\", \"A\", \"b\", \"B\", \"c\", \"C\", \"d\", \"D\", \"e\", \"E\", \"f\", \"F\", \"g\", \"G\", \"h\", \"H\", \"i\", \"I\", \"j\", \"J\",\n \"k\", \"K\", \"l\", \"L\", \"m\", \"M\", \"n\", \"N\", \"o\", \"O\", \"p\", \"P\", \"q\", \"Q\", \"r\", \"R\", \"s\", \"S\", \"t\", \"T\",\n \"u\", \"U\", \"v\", \"V\", \"w\", \"W\", \"x\", \"X\", \"y\", \"Y\", \"z\", \"Z\");\n\n $count = count($chars) - 1;\n\n srand((double) microtime() * 1000000);\n\n for ($i = 0; $i < 8; $i++) {\n $pass .= $chars[rand(0, $count)];\n }\n\n return ($pass);\n }",
"public function setPassword(){\n\t}",
"private function genPass() {\r\n $random = 0;\r\n $rand78 = \"\";\r\n $randpass = \"\";\r\n $pass = \"\";\r\n $maxcount = rand( 4, 9 );\r\n // The rand() limits (min 4, max 9) don't actually limit the number\r\n // returned by rand, so keep looping until we have a password that's\r\n // more than 4 characters and less than 9.\r\n if ( ($maxcount > 8) or ( $maxcount < 5) ) {\r\n do {\r\n $maxcount = rand( 4, 9 );\r\n } while ( ($maxcount > 8) or ( $maxcount < 5) );\r\n }\r\n $rand78 = \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-=_+abcdefghijklmnopqrstuvwxyz\";\r\n for ( $count = 0; $count <= $maxcount; $count++ ) {\r\n $random = rand( 0, 77 );\r\n $randpass = substr( $rand78, $random, 1 );\r\n $pass = $pass . $randpass;\r\n }\r\n $pass = substr( $pass, 0, 8 ); // Just in case\r\n return($pass);\r\n }",
"function password_recovery()\n\t{\n\n\n\t}",
"public function necesitaCambiarPassword();",
"public function CreatePassword($plain) {\n $tmppassw = md5(\"De e la bara so himla fint va?\".$plain);\n\t$tmppassw = substr($tmppassw,6).substr($tmppassw,0,5);\n\treturn md5($plain);\n }",
"function generatePassword() {\n\t//* (c) Hitech Scripts 2003\n\t//* For more information, visit http://www.hitech-scripts.com\n\t//* modified for phpgiftreg by Chris Clonch\n\tmt_srand((double) microtime() * 1000000);\n\t$newstring = \"\";\n\tif ($GLOBALS[\"OPT\"][\"password_length\"] > 0) {\n\t\twhile(strlen($newstring) < $GLOBALS[\"OPT\"][\"password_length\"]) {\n\t\t\tswitch (mt_rand(1,3)) {\n\t\t\t\tcase 1: $newstring .= chr(mt_rand(48,57)); break; // 0-9\n\t\t\t\tcase 2: $newstring .= chr(mt_rand(65,90)); break; // A-Z\n\t\t\t\tcase 3: $newstring .= chr(mt_rand(97,122)); break; // a-z\n\t\t\t}\n\t\t}\n\t}\n\treturn $newstring;\n}",
"function password_add($data) {\n\t}",
"private function generateLevelPassword(){\n\t\tif( !isset($this->password) ){\n\t\t\tif( !isset($_SESSION['levelPass']) ){\n\t\t\t\t$_SESSION['levelPass'] = array();\n\t\t\t}\n\t\t\tif( isset($_SESSION['levelPass'][$this->level_id]) ){\n\t\t\t\t$this->password = $_SESSION['levelPass'][$this->level_id];\n\t\t\t} else {\n\t\t\t\t$this->password = BasicLevel::generatePassword(7);\n\t\t\t\t$_SESSION['levelPass'][$this->level_id] = $this->password;\n\t\t\t}\n\t\t}\n\t}",
"function generate_password($username, $password1, $password2) {\n $password1 = $password2 = wp_generate_password();\n }",
"function gen_pwd($chars) \n\t{\n\t\t$ci = get_instance()->load->helper('myencrypt');\n\t\treturn random_str($chars);\n\t}",
"public function genaratepassword() {\r\r\n $length = 10;\r\r\n $alphabets = range('A', 'Z');\r\r\n $numbers = range('0', '9');\r\r\n $additional_characters = array('1', '3');\r\r\n $final_array = array_merge($alphabets, $numbers, $additional_characters);\r\r\n $password = '';\r\r\n while ($length--) {\r\r\n $key = array_rand($final_array);\r\r\n $password .= $final_array[$key];\r\r\n }\r\r\n return $password;\r\r\n }",
"function makePassword($len = 8)\r\n{\r\n $vowels = array('a', 'e', 'i', 'o', 'u', 'y');\r\n $confusing = array('I', 'l', '1', 'O', '0');\r\n $replacements = array('A', 'k', '3', 'U', '9');\r\n $choices = array(0 => rand(0, 1), 1 => rand(0, 1), 2 => rand(0, 2));\r\n $parts = array(0 => '', 1 => '', 2 => '');\r\n\r\n if ($choices[0]) $parts[0] = rand(1, rand(9,99));\r\n if ($choices[1]) $parts[2] = rand(1, rand(9,99));\r\n\r\n $len -= (strlen($parts[0]) + strlen($parts[2]));\r\n for ($i = 0; $i < $len; $i++)\r\n {\r\n if ($i % 2 == 0)\r\n {\r\n do $con = chr(rand(97, 122));\r\n while (in_array($con, $vowels));\r\n $parts[1] .= $con;\r\n }\r\n else\r\n {\r\n $parts[1] .= $vowels[array_rand($vowels)];\r\n }\r\n }\r\n if ($choices[2]) $parts[1] = ucfirst($parts[1]);\r\n if ($choices[2] == 2) $parts[1] = strrev($parts[1]);\r\n\r\n $r = $parts[0] . $parts[1] . $parts[2];\r\n $r = str_replace($confusing, $replacements, $r);\r\n return $r;\r\n}",
"private function generarPassword() {\r\n $minusculas = \"abcdefghijklmnopqrstuvwxyz\";\r\n $mayusculas = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\r\n $numeros = \"1234567890\";\r\n $may = \"\";\r\n $min = \"\";\r\n $num = \"\";\r\n for ($i = 0; $i < 11; $i++) {\r\n $min .= substr($minusculas, rand(0, 26), 1);\r\n $may .= substr($mayusculas, rand(0, 26), 1);\r\n $num .= substr($numeros, rand(0, 10), 1);\r\n }\r\n $password = substr($may, 0, 2) . substr($min, 0, 5) . '-' . substr($num, 0, 3);\r\n return $password;\r\n }",
"function generarPassword() {\n\t\t$str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$cad = \"\";\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$cad .= substr($str, rand(0, 62), 1);\n\t\t}\n\t\treturn $cad;\n\t}",
"public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"public static function generatePassword() {\n\t\t$consonants = array (\n\t\t\t\t\"b\",\n\t\t\t\t\"c\",\n\t\t\t\t\"d\",\n\t\t\t\t\"f\",\n\t\t\t\t\"g\",\n\t\t\t\t\"h\",\n\t\t\t\t\"j\",\n\t\t\t\t\"k\",\n\t\t\t\t\"l\",\n\t\t\t\t\"m\",\n\t\t\t\t\"n\",\n\t\t\t\t\"p\",\n\t\t\t\t\"r\",\n\t\t\t\t\"s\",\n\t\t\t\t\"t\",\n\t\t\t\t\"v\",\n\t\t\t\t\"w\",\n\t\t\t\t\"x\",\n\t\t\t\t\"y\",\n\t\t\t\t\"z\" \n\t\t);\n\t\t$vocals = array (\n\t\t\t\t\"a\",\n\t\t\t\t\"e\",\n\t\t\t\t\"i\",\n\t\t\t\t\"o\",\n\t\t\t\t\"u\" \n\t\t);\n\t\t\n\t\t$password = '';\n\t\t\n\t\tsrand ( ( double ) microtime () * 1000000 );\n\t\tfor($i = 1; $i <= 4; $i ++) {\n\t\t\t$password .= $consonants [rand ( 0, 19 )];\n\t\t\t$password .= $vocals [rand ( 0, 4 )];\n\t\t}\n\t\t$password .= rand ( 0, 9 );\n\t\t\n\t\treturn $password;\n\t}",
"protected function changePassword() {}",
"public static function generate_password()\n\t{\n\t\t$chars = array(\n\t\t\t'a','b','c','d','e','f','g','h','i','j','k','l','m','n',\n\t\t\t'o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D',\n\t\t\t'E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T',\n\t\t\t'U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0',\n\t\t\t'!','@','#','$','%','^','&','*','(',')','_','-','+','=','{','~',\n\t\t\t'}','[',']','|','/','?','>','<',':',';'\n\t\t);\n\n\t\t$new_pw = '';\n\t\tfor($i=0;$i<20;$i++)\n\t\t{\n\t\t\t$new_pw .= $chars[rand(0, count($chars)-1)];\n\t\t}\n\n\t\treturn $new_pw;\n\t}",
"public function addLetters() {\n\n for ($i=0; $i <$this->letterPorsion ; $i++) {\n $this->password = $this->password.substr($this->str, rand(0, strlen($this->str) - 1), 1);\n }\n }",
"function generaPass(){\n $cadena = \"1234567890\";\n //Obtenemos la longitud de la cadena de caracteres\n $longitudCadena=strlen($cadena);\n \n //Se define la variable que va a contener la contraseña\n $pass = \"\";\n //Se define la longitud de la contraseña, en mi caso 10, pero puedes poner la longitud que quieras\n $longitudPass=5;\n \n //Creamos la contraseña\n for($i=1 ; $i<=$longitudPass ; $i++){\n //Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\n $pos=rand(0,$longitudCadena-1);\n \n //Vamos formando la contraseña en cada iteraccion del bucle, añadiendo a la cadena $pass la letra correspondiente a la posicion $pos en la cadena de caracteres definida.\n $pass .= substr($cadena,$pos,1);\n }\n return $pass;\n}",
"public static function generatePassword()\n\t{\n\t\t$consonants = array(\"b\", \"c\", \"d\", \"f\", \"g\", \"h\", \"j\", \"k\", \"l\", \"m\", \"n\", \"p\", \"r\", \"s\", \"t\", \"v\", \"w\", \"x\", \"y\", \"z\");\n\t\t$vocals = array(\"a\", \"e\", \"i\", \"o\", \"u\");\n\n\t\t$password = '';\n\n\t\tsrand((double)microtime() * 1000000);\n\t\tfor ($i = 1; $i <= 4; $i++) {\n\t\t\t$password .= $consonants[rand(0, 19)];\n\t\t\t$password .= $vocals[rand(0, 4)];\n\t\t}\n\t\t$password .= rand(0, 9);\n\n\t\treturn $password;\n\t}",
"public function generate_new_passwords() {\n // all users added with \"password\" will be automatically sent a welcome message\n // and new password\n $resetpassword = 'password'; \n // get users\n $user_list = $this->get_user->get_all_users();\n // go through users \n foreach($user_list as $user) {\n // check if password is \"password\"\n $user_id = $user->user_id;\n if ($this->get_user->check_password($user_id, $resetpassword) == 1) {\n // generate simple random password\n $newpassword = uniqid();\n // write new password to database\n $data = array(\n 'password' => $newpassword\n );\n $this->get_user->update('user_id', $user_id, $data);\n // email user new password \n $this->send_password_mail($user_id, $newpassword);\n }\n \n }\n \n \n }",
"public static function generatePassword() {\r\n return StringGenerator::generateRandomAlphaAndNumbersAndSpecial(12);\r\n }",
"function generaPass() {\n $cadena = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n //Obtenemos la longitud de la cadena de caracteres\n $longitudCadena = strlen($cadena);\n\n //Se define la variable que va a contener la contraseña\n $pass = \"\";\n //Se define la longitud de la contraseña, en mi caso 10, pero puedes poner la longitud que quieras\n $longitudPass = 10;\n\n //Creamos la contraseña\n for ($i = 1; $i <= $longitudPass; $i++) {\n //Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\n $pos = rand(0, $longitudCadena - 1);\n //Vamos formando la contraseña en cada iteraccion del bucle, añadiendo a la cadena $pass la letra correspondiente a la posicion $pos en la cadena de caracteres definida.\n $pass .= substr($cadena, $pos, 1);\n }\n return $pass;\n}",
"function createPwd($characters) {\n $possible = '23456789bcdfghjkmnpqrstvwxyz';\n $code = '';\n $i = 0;\n while ($i < $characters) {\n $code .= substr($possible, mt_rand(0, strlen($possible)-1), 1);\n $i++;\n }\n return $code;\n}",
"public function createRandomPassword() {\n\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\t\n\t\tsrand((double)microtime()*1000000);\n\t\t\n\t\t$i = 0;\n\t\t\n\t\t$pass = '' ;\n\t\t\n\t\twhile ($i <= 7) {\n\t\t\n\t\t\t$num = rand() % 33;\n\t\t\n\t\t\t$tmp = substr($chars, $num, 1);\n\t\t\n\t\t\t$pass = $pass . $tmp;\n\t\t\n\t\t\t$i++;\n\t\t\n\t\t}\n\t\treturn $pass;\n\t}",
"function genPassword($length=7){\n $newPass = \"\";\n for ($i = 0; $i < $length; $i++) {\n if (rand(0,1)){\n if (rand(0,1)){\n $newPass .= chr(rand(97,122));\n }else{\n $newPass .= chr(rand(65,90));\n }\n }else{\n $newPass .= chr(rand(48,57));\n }\n }\n return $newPass;\n}",
"public function generateNewPassword($mail);",
"function createpass(){\n$s=\"\";\nfor ($i=0;$i<7;$i++)\n$s.=rand(0,9);\nreturn $s;\n}",
"public function getPW() {}",
"function update_password()\n {\n }",
"function getPassword(){\n\n}",
"function generaPass(){\n $cadena = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n //Obtenemos la longitud de la cadena de caracteres\n $longitudCadena=strlen($cadena);\n\n //Se define la variable que va a contener la contraseña\n $pass = \"\";\n //Se define la longitud de la contraseña, en mi caso 10, pero puedes poner la longitud que quieras\n $longitudPass=10;\n\n //Creamos la contraseña\n for($i=1 ; $i<=$longitudPass ; $i++){\n //Definimos numero aleatorio entre 0 y la longitud de la cadena de caracteres-1\n $pos=rand(0,$longitudCadena-1);\n\n //Vamos formando la contraseña en cada iteraccion del bucle, añadiendo a la cadena $pass la letra correspondiente a la posicion $pos en la cadena de caracteres definida.\n $pass .= substr($cadena,$pos,1);\n }\n return $pass;\n}",
"public function pwgen()\n\t{\n\t\t// $timetarget = 0.05;\n\t\t// $cost = 8;\n\t\t// do {\n\t\t// \t$cost++;\n\t\t// \t$start = microtime(true);\n\t\t// \tpassword_hash(\"testing\", PASSWORD_BCRYPT, ['cost' => $cost]);\n\t\t// \t$end = microtime(true);\n\t\t// \techo \"{$cost}<br><hr>\";\n\t\t// } while (($end - $start) < $timetarget);\n\t\t// selesai mencari $argon2i$v=19$m=1024,t=2,p=2$czZrU3NmSkwyZWFCZzZqcg$4BCXT3Xjj+nwslQZOa8I2rO760hSmVmzCiSQ/8cfcDs\n\n\t\t$a = password_hash('admin', PASSWORD_ARGON2I);\n\t\techo \"{$a}<br>\";\n\t\t$b = password_verify('superadmin', $a);\n\t\techo \"{$b}\";\n\t\tdie();\n\t}",
"function Genera_Password($cadena){\r\n $cadena_1 = \"1234567890\";\r\n\t$cadena_2 = \"&%$/.@*_-#\";\r\n //Obtenemos la longitud de la cadena de caracteres\r\n $longitudCadena_1=strlen($cadena_1);\r\n\t$longitudCadena_2=strlen($cadena_2);\r\n\r\n //Se define la variable que va a contener la contrase�a\r\n $pass = \"\";\r\n //Se define la longitud de la contrase�a, en mi caso 10, pero puedes poner la longitud que quieras\r\n $longitudPass=4;\r\n\r\n\t$pass = $cadena.substr($cadena_1,rand(0,$longitudCadena_1-1),1).substr($cadena_1,rand(0,$longitudCadena_1-1),1).substr($cadena_2,rand(0,$longitudCadena_2-1),1).substr($cadena_2,rand(0,$longitudCadena_2-1),1);\r\n\r\n return $pass;\r\n}",
"public function makePassword($pw)\n\t\t{\n\t\t\treturn $this->useHash ? sha1($pw . $this->salt) : $pw;\n\t\t}",
"public function generatePassword()\n {\n $a = $this->generateUsername();\n $b = random_int(0, 9);\n $c = random_int(0, 9);\n $d = random_int(0, 9);\n return \"$a$b$c$d\";\n }",
"public function generateSecurePassword()\n {\n\n try {\n // Generate the random salt, \n // replace byte por byte for utf8 support\n $this->_salt = strtr(base64_encode(mcrypt_create_iv(22, MCRYPT_DEV_URANDOM)), '+', '.');\n\n // generate the password with the salt\n $this->password = password_hash($this->password, PASSWORD_BCRYPT, ['salt' => $this->_salt]);\n } catch (\\Exception $ex) {\n \\kerana\\Exceptions::showError('LoginError', $ex);\n }\n }",
"function createRandomPassword() { \n $chars \t= \"abcdefghijkmnopqrstuvwxyz023456789\"; \n srand((double)microtime()*1000000); \n $i \t\t= 0; \n $pass \t= '' ; \n\n while ($i <= 4) { \n $num \t= rand() % 33; \n $tmp \t= substr($chars, $num, 1); \n $pass \t= $pass . $tmp; \n $i++; \n } \n\n return $pass; \n }",
"public function initPassword() {\n\t\t$this->salt = mt_rand();\n\t\t$clearPassword = mt_rand();\n\t\t$this->password = sha1($this->salt . $clearPassword);\n\t\treturn $clearPassword;\t\n\t}",
"function get_password($usrid){\r\n\t\r\n}",
"function genera_password($longitud,$tipo=\"alfanumerico\"){\n \nif ($tipo==\"alfanumerico\"){\n$exp_reg=\"[^A-Z0-9]\";\n} elseif ($tipo==\"numerico\"){\n$exp_reg=\"[^0-9]\";\n}\n \nreturn substr(eregi_replace($exp_reg, \"\", md5(time())) .\neregi_replace($exp_reg, \"\", md5(time())) .\neregi_replace($exp_reg, \"\", md5(time())),\n0, $longitud);\n}",
"function gen_pass($mask) {\n $extended_chars = \"!@#$%^&*()\";\n $length = strlen($mask);\n $pwd = '';\n for ($c=0;$c<$length;$c++) {\n $ch = $mask[$c];\n switch ($ch) {\n case '#':\n $p_char = rand(0,9);\n break;\n case 'C':\n $p_char = chr(rand(65,90));\n break;\n case 'c':\n $p_char = chr(rand(97,122));\n break;\n case 'X':\n do {\n $p_char = rand(65,122);\n } while ($p_char > 90 && $p_char < 97);\n $p_char = chr($p_char);\n break;\n case '!':\n $p_char = $extended_chars[rand(0,strlen($extended_chars)-1)];\n break;\n }\n $pwd .= $p_char;\n }\n return $pwd; \n}",
"public function getPassword() {}",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function generateRandomPassword(){\n\t\t$new_password = htmlspecialchars(Password::strong_random_password());\n\t\tif(!empty($new_password)){\n\t\t\techo '<input id=\"new_pw\" value=\"'.$new_password.'\" class=\"form-control\" readonly/>';\n\t\t}\n\t}",
"public function generateRandomPassword(){\n\t\t$new_password = htmlspecialchars(Password::strong_random_password());\n\t\tif(!empty($new_password)){\n\t\t\techo '<input id=\"new_pw\" value=\"'.$new_password.'\" class=\"form-control\" readonly/>';\n\t\t}\n\t}",
"private function generatePassword() {\n // account is not wide open if conventional logins are permitted\n $guid = '';\n\n for ($i = 0; ($i < 8); $i++) {\n $guid .= sprintf(\"%x\", mt_rand(0, 15));\n }\n\n return $guid;\n }",
"function randomPassword()\r\n\t{\r\n\t\t$longitud = 8;\r\n\t\t$carac = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\t\t$pwd = '';\r\n\t\tfor ($i=0; $i<$longitud; ++$i){ \r\n\t\t\t $pwd .= substr($carac, (mt_rand() % strlen($carac)), 1);\r\n\t\t}\t \r\n\t return trim($pwd);\r\n\t}",
"function passgen() {\r\n\t$pw = '';\r\n\t$pw_lenght = 8;\r\n $zeichen = \"0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\";\r\n $array_b = explode(\",\",$zeichen);\r\n for($i=0;$i<$pw_lenght;$i++) {\r\n \tsrand((double)microtime()*1000000);\r\n $z = rand(0,25);\r\n $pw .= \"\".$array_b[$z].\"\";\r\n }\r\n\treturn $pw;\r\n}",
"protected function getConfiguredPassword() {}",
"function randomPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyz0123456789!@#$%\";\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); //turn the array into a string\n }",
"function gen_pwd($chars) \n\t{\n\t\t$data = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcefghijklmnopqrstuvwxyz';\n\t\treturn substr(str_shuffle($data), 0, $chars);\n\t}",
"function makeRandomPassword() { \n\t $scheme = \"abchefghjkmnpqrstuvwxyz0123456789\"; \n\t srand((double)microtime()*1000000); \n\t\t $i = 0; \n\t\t while ($i <= 7) { \n\t\t\t\t$num = rand() % 33; \n\t\t\t\t$tmp = substr($scheme, $num, 1); \n\t\t\t\t$pass = $pass . $tmp; \n\t\t\t\t$i++; \n\t\t } \n\t\t return $pass; \n\t}",
"function temp_pass(){\n\treturn 'password199';\n}",
"function genera_password($num=8,$randnum=0){ // By Kernellover \n $voc = 'aeiou'; \n $con = 'bcdfgjklmnpqrstwxyz';\n\t$nvoc = strlen($voc)-1;\n\t$ncon = strlen($con)-1;\n\t$psw =mt_rand(0,1)?$con[mt_rand(0,$ncon)]:''; // defineix si comença per vocal o consonant\n\n\t\n for ($n=0; $n<=ceil($num/2); $n++){ \n $psw .= $voc[mt_rand(0,$nvoc)]; \n $psw .= $con[mt_rand(0,$ncon)]; \n }\n\n\t$cua=$randnum?mt_rand(1,$randnum):'';\n\t$psw = str_replace (array('q','quu','yi','iy'),array('qu','que','ya','ya'),$psw);\n $psw = substr($psw,0,$num-strlen($cua)).$cua; \n\n\n return $psw; \n}",
"protected function generateAdminPassword()\n {\n return\n Util::getRandomString(1, 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') .\n Util::getRandomString(1, '0123456789') .\n Util::getRandomString(1, '@*^%#()<>') .\n Util::getRandomString();\n }",
"function createRandomPassword() {\r\n $chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\r\n srand((double) microtime() * 1000000);\r\n $i = 0;\r\n $pass = '';\r\n\r\n while ($i <= 7) {\r\n $num = rand() % 33;\r\n $tmp = substr($chars, $num, 1);\r\n $pass = $pass . $tmp;\r\n $i++;\r\n }\r\n\r\n return $pass;\r\n }",
"function randomPassword() {\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = array(); //remember to declare $pass as an array\n $alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n for ($i = 0; $i < 8; $i++) {\n $n = rand(0, $alphaLength);\n $pass[] = $alphabet[$n];\n }\n return implode($pass); //turn the array into a string\n }",
"function get_password($words, $symbols) {\n \t\n \t// if user has not tried to generate a password yet, show nothing\n \tif (count($_GET) == 0) {\n \t\treturn;\n \t}\n \t\n \t// password can only be generated with valid number input\n \tif ((!is_numeric($_GET[\"word_num\"]) && strlen($_GET[\"word_num\"]) >= 1) ||\n \t\t(!is_numeric($_GET[\"number_num\"]) && strlen($_GET[\"number_num\"]) >= 1) ||\n \t\t(!is_numeric($_GET[\"symbol_num\"]) && strlen($_GET[\"symbol_num\"]) >= 1)) {\n \t\t\t\n \t\treturn \"Password can only be generated if text fields contain numbers or are left blank.\";\n \t}\n \t\n \t// store initial values\n \t$password = \"\"; \n \t$num_count = $_GET[\"number_num\"];\n \t$symbol_count = $_GET[\"symbol_num\"];\n \t$separator = \"\";\n \t\n \t// set up how words are separated\n \tif ($_GET[\"separator\"] == \"hyphens\") { \n \t\t$separator = \"-\";\n \t} elseif($_GET[\"separator\"] == \"spaces\") { \n \t\t$separator = \" \";\n \t}\n \t\n \t// loop as many times as number of words that user requested \n \tfor ($i = 0; $i < $_GET['word_num']; $i++) {\n \t\t\n \t\t// if numbers to be added randomly and still numbers to be added\n \t\tif ($_GET[\"number_loc\"] == \"random\" && $num_count > 0) {\n \t\t\t\n \t\t\t// 50% chance of adding number\n \t\t\tif (rand(0, 1) == 1) {\n \t\t\t\t// add random number\n \t\t\t\t$password .= rand(0, 9);\n \t\t\t\t$num_count--; \n \t\t\t}\n \t\t}\n \t\t\n \t\t// if symbols to be added randomly and still symbols to be added\n \t\tif ($_GET[\"symbol_loc\"] == \"random\" && $symbol_count > 0) {\n \t\t\t\n \t\t\t// 50% chance of adding symbol\n \t\t\tif (rand(0, 1) == 1) {\n \t\t\t\t\n \t\t\t\t// add random symbol to password\n \t\t\t\t$password .= $symbols[rand(0, count($symbols) - 1)];\n \t\t\t\t$symbol_count--; \n \t\t\t}\n \t\t}\n \t\t\n \t\t// set case of words\n \t\tif ($_GET[\"cases\"] == \"lower\") {\n \t\t\t\n \t\t\t// add random lower case word\n \t\t\t$password .= strtolower($words[rand(0, count($words) - 1)]);\n\n \t\t} elseif ($_GET[\"cases\"] == \"upper\"){\n \t\t\t\n \t\t\t// add random upper case word \n \t\t\t$password .= strtoupper($words[rand(0, count($words) - 1)]);\n \t\t} else {\n \t\t\t\n \t\t\t// add random word with only 1st letter upper case\n \t\t\t$password .= ucfirst($words[rand(0, count($words) - 1)]);\n \t\t}\n\n \t\t// do not add separator to end of password\n \t\tif ($i != $_GET['word_num'] - 1) {\n \t\t\t\n \t\t\t// add separator to password\n \t\t\t$password .= $separator; \n \t\t\t\n \t\t} else {\n \t\t\t\n \t\t\t// if numbers to be added at end or not all randomly placed numbers used up, add numbers to end\n \t\t\tfor($j = 0; $j < $num_count; $j++) {\n \t\t\t\t\t\n \t\t\t\t// add random number to password\n \t\t\t\t$password .= rand(0, 9);\n \t\t\t}\n\n \t\t\t// if symbols to be added at end or not all randomly placed symbols used up, add symbols to end\n \t\t\tfor($j = 0; $j < $symbol_count; $j++) { \n \t\t\t\t\n \t\t\t\t// add random symbol to password\n \t\t\t\t$password .= $symbols[rand(0, count($symbols) - 1)]; \n \t\t\t}\n \t\t}\n \t}\n \t\n \treturn $password; \n }",
"public function setPassword($value);",
"public function setPW($dw) {}",
"function generatePassword($params = array()) {\n\t\t$defaults = array(\n\t\t\t'charset' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n\t\t\t'length' => 6,\n\t\t\t'unique' => true,\n\t\t);\n\t\t$params = array_merge($defaults, $params);\n $password = '';\n $i = 0;\n \n // add random characters to $password until $length is reached\n while ($i < $length) {\n // pick a random character from the possible ones\n $char = substr($charset, mt_rand(0, strlen($charset)-1), 1);\n \n // we don't want this character if it's already in the password\n if (!$unique || !strstr($charset, $char)) {\n $password .= $char;\n $i++;\n }\n }\n return $password;\n }",
"function sloodle_random_web_password()\n {\n // Define the characters we can use in our token, and get the length of it\n $str = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $strlen = strlen($str) - 1;\n // Prepare the password string\n $pwd = '';\n // Loop once for each output character\n for($length = 0; $length < 8; $length++) {\n // Shuffle the string, then pick and store a random character\n $str = str_shuffle($str);\n $char = mt_rand(0, $strlen);\n $pwd .= $str[$char];\n }\n \n return $pwd;\n }",
"public function encryptPassword($pass){\r\n\t\t$this->string = array(\r\n\t\t\t\"string\" => $pass,\r\n\t\t\t\"count\" => strlen($pass)\r\n\t\t);\r\n\t\t//the function setCharacters() is executed to get all the initial characters to use for password encryption.\r\n\t\t$characters = $this->setCharacters();\r\n\t\t/* \r\n\t\t\tIn order to encrypt this password with a unique pattern I took the password and found the position\r\n\t\t\ton my character table. I took all positions that are found on my character table and use those numbers like patters\r\n\t\t\tI set the characters location as ranges in my $start_range variable.\r\n\t\t*/\r\n\t\t$start_range = array();\r\n\t\tfor($x=0; $x<$this->string['count']; $x++){\r\n\t\t\t$start_range[$x] = array_search($this->string['string'][$x], $characters);\r\n\t\t}\r\n\t\tforeach ($start_range as $key => $value) {\r\n\t\t\tif($value == null){\r\n\t\t\t\t$start_range[$key] = $this->string['count'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t//doubles the range to make the password more complex base on mathematical additions; submitted on the 1.2 update\r\n\t\t$a = 0;\r\n\t\tfor ($i=0; $i < $this->string['count']; $i++) {\r\n\t\t\t$start_range[$this->string['count'] + $a] = round(($start_range[$i] * ($this->string['count'] + $a))); \r\n\t\t\t$a++;\r\n\t\t}\r\n\t\t/*\r\n\t\t\tUnique matrix is created depending on number of characters and the location of the characters\r\n\t\t\tI set for what i call my matrix to be 5000 characters to make the mattern more complex. you can set that to your liking i dont recommend going lower than 1000 characters.\r\n\t\t*/\r\n\t\t$matrix = $this->generateMatrix($characters, $start_range, $this->matrixLength);\r\n\t\t/*\r\n\t\t\t@param array will make sure the matrix is as complex as possible.\r\n\t\t*/\r\n\t\t$matrix_final = $this->generateMatrix($matrix, $start_range, $this->matrixLength);\r\n\t\t/*\r\n\t\t\tI have tested with 128 characters, havent test for less or more yet.\r\n\t\t\tthis is where the magic happens and i use the same consept of creating a matrix to create the final encryption.\r\n\t\t*/\r\n\t\t$final_password = $this->generateMatrix($matrix_final, $start_range, $this->passwordEncryptionLenght);\r\n\t\t$this->encPassword = implode('',$final_password);\r\n\t}",
"function the_post_password()\n {\n }",
"function createPasswordSalt() {\n\t\t$userSystem = new SpotUserSystem($this->_db, $this->_settings);\n\t\t$salt = $userSystem->generateUniqueId() . $userSystem->generateUniqueId();\n\t\t\n\t\t$this->setIfNot('pass_salt', $salt);\n\t}",
"private function randomPassword() {\n\t\t$alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n\t\t$pass = array(); //remember to declare $pass as an array\n\t\t$alphaLength = strlen($alphabet) - 1; //put the length -1 in cache\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$n = rand(0, $alphaLength);\n\t\t\t$pass[] = $alphabet[$n];\n\t\t}\n\t\treturn implode($pass); //turn the array into a string\n\t}",
"function generatePassword() {\n //Initialize the random password\n $password = '';\n\n //Initialize a random desired length\n $desired_length = rand(8, 12);\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for ($length = 0; $length < $desired_length; $length++) {\n //Append a random ASCII character (including symbols)\n $password .= $characters[mt_rand(0, strlen($characters) - 1)];\n }\n\n return $password;\n }",
"function setPassword($password){\n\t\t$password = base64_encode($password);\n\t\t$salt5 = mt_rand(10000,99999);\t\t\n\t\t$salt3 = mt_rand(100,999);\t\t\n\t\t$salt1 = mt_rand(0,25);\n\t\t$letter1 = range(\"a\",\"z\");\n\t\t$salt2 = mt_rand(0,25);\n\t\t$letter2 = range(\"A\",\"Z\");\n\t\t$password = base64_encode($letter2[$salt2].$salt5.$letter1[$salt1].$password.$letter1[$salt2].$salt3.$letter2[$salt1]);\n\t\treturn str_replace(\"=\", \"#\", $password);\n\t}",
"public function encryptPass()\n {\n return \"RASAHolaRSSA\";\n }",
"public function testGeneratePassword() {\n // Asking for a password 15 characters long\n $password = security::generate_password( 15 );\n\n // Make sure it's 15 characters\n $this->assertEquals( 15, strlen( $password ) );\n }",
"function _generate_password($length=9, $strength=0) \n\t{\n\t\t$vowels = 'aeuy';\n\t\t$consonants = 'bdghjmnpqrstvz';\n\t\tif ($strength & 1) { $consonants .= 'BDGHJLMNPQRSTVWXZ'; }\n\t\tif ($strength & 2) { $vowels .= \"AEUY\"; }\n\t\tif ($strength & 4) { $consonants .= '23456789'; }\n\t\tif ($strength & 8) { $consonants .= '@#$%'; }\n\t \n\t\t$password = '';\n\t\t$alt = time() % 2;\n\t\tfor ($i = 0; $i < $length; $i++) \n\t\t{\n\t\t\tif ($alt == 1) \n\t\t\t{\n\t\t\t\t$password .= $consonants[(rand() % strlen($consonants))];\n\t\t\t\t$alt = 0;\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\t$password .= $vowels[(rand() % strlen($vowels))];\n\t\t\t\t$alt = 1;\n\t\t\t}\n\t\t}\n\t\treturn $password;\n\t}",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function getPassword()\n {\n }",
"public function generatePassword($username, $password1, $password2)\n\t{\n\t\t$password1 = $password2 = wp_generate_password();\n\t}",
"function genpassword( $length = 8 ) {\n \t\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:,.?\";\n \t\t $password = substr( str_shuffle( $chars ), 0, $length );\n \treturn $password;\n\t}",
"protected function configureSaltedPasswords() {}",
"function twe_encrypt_password($plain) {\n\n $password=md5($plain);\n\n return $password;\n\n }",
"private function setEncryptPassword(){\n // Encode the new users password\n $encrpyt = $this->get('security.password_encoder');\n $password = $encrpyt->encodePassword($this->user, $this->user->getPassword());\n $this->user->setPassword($password);\n }"
] | [
"0.75499463",
"0.7417094",
"0.7391486",
"0.73332936",
"0.72585887",
"0.7231075",
"0.7162201",
"0.71540916",
"0.7151343",
"0.7121129",
"0.70905644",
"0.7074702",
"0.70609176",
"0.7056405",
"0.7036923",
"0.70178896",
"0.7016233",
"0.7012552",
"0.7001237",
"0.69851434",
"0.6972815",
"0.6945831",
"0.69444823",
"0.6936865",
"0.69333416",
"0.69144857",
"0.69111997",
"0.69099665",
"0.6908488",
"0.68966657",
"0.68886334",
"0.68844783",
"0.686708",
"0.68469405",
"0.68464506",
"0.6845308",
"0.683658",
"0.6822791",
"0.68088937",
"0.6807747",
"0.68067116",
"0.6800753",
"0.6792472",
"0.67873055",
"0.6776718",
"0.6774929",
"0.6767288",
"0.6767237",
"0.67638135",
"0.6763385",
"0.67632294",
"0.67524433",
"0.6750225",
"0.6746292",
"0.6744107",
"0.6744107",
"0.6744107",
"0.6744107",
"0.6744107",
"0.6744107",
"0.6744107",
"0.67407167",
"0.67407167",
"0.6734206",
"0.6723246",
"0.6722111",
"0.67148376",
"0.6710421",
"0.6706772",
"0.6692978",
"0.66894233",
"0.6687737",
"0.66867304",
"0.66768223",
"0.66652024",
"0.6664086",
"0.6658933",
"0.66580516",
"0.66560966",
"0.6644568",
"0.66320515",
"0.662634",
"0.6604654",
"0.65939957",
"0.65917873",
"0.6589115",
"0.6588584",
"0.6587666",
"0.6587222",
"0.65836316",
"0.65836316",
"0.65836316",
"0.65836316",
"0.65836316",
"0.65836316",
"0.65746206",
"0.6574459",
"0.65728647",
"0.65722036",
"0.65625954"
] | 0.6647091 | 79 |
wspolrzedne dla stanu lacznika w RUPS (OTWARTY , ZAMKNIETY) | function stan_lacznika($stan,$nr_rups)
{
if($stan==1 && $nr_rups==1) // zamkniety dla rups1
{
$wspolrzedna=230;
}
elseif($stan==0 && $nr_rups==1) // otwarty dla rups1
{
$wspolrzedna=220;
}
elseif($stan==1 && $nr_rups==2) // zamkniety dla rups2
{
$wspolrzedna=460;
}
elseif($stan==0 && $nr_rups==2) // otwarty dla rups2
{
$wspolrzedna=450;
}
elseif($stan==1 && $nr_rups==3.1) // zamkniety dla rups3
{
$wspolrzedna=690;
}
elseif($stan==0 && $nr_rups==3.1) // otwarty dla rups3
{
$wspolrzedna=680;
}
elseif($stan==1 && $nr_rups==3.2) // zamkniety dla rups3
{
$wspolrzedna=710;
}
elseif($stan==0 && $nr_rups==3.2) // otwarty dla rups3
{
$wspolrzedna=700;
}
elseif($stan==1 && $nr_rups==4) // zamkniety dla rups4
{
$wspolrzedna=940;
}
elseif($stan==0 && $nr_rups==4) // otwarty dla rups4
{
$wspolrzedna=930;
}
elseif($stan==1 && $nr_rups==8) // zamkniety dla rups8
{
$wspolrzedna=1170;
}
elseif($stan==0 && $nr_rups==8) // otwarty dla rups8
{
$wspolrzedna=1160;
}
elseif($stan==1 && $nr_rups==9.1) // zamkniety dla rups9.1
{
$wspolrzedna=1415;
}
elseif($stan==0 && $nr_rups==9.1) // otwarty dla rups9.1
{
$wspolrzedna=1405;
}
elseif($stan==1 && $nr_rups==9.2) // zamkniety dla rups9.2
{
$wspolrzedna=1435;
}
elseif($stan==0 && $nr_rups==9.2) // otwarty dla rups9.2
{
$wspolrzedna=1425;
}
elseif($stan==1 && $nr_rups==9.3) // zamkniety dla rups9.3
{
$wspolrzedna=1455;
}
elseif($stan==0 && $nr_rups==9.3) // otwarty dla rups9.3
{
$wspolrzedna=1445;
}
return $wspolrzedna;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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 wtsCheckWTP($ar){\n $p = new XParam($ar, array('mode'=>'a', 'b'=>0, 'f'=>1));\n $mode = $p->get('mode');\n $bonus = $p->get('b');\n $fidelite = $p->get('f');\n $chipid = $p->get('chipid');\n $accno = $p->get('accno');\n $crc = $p->get('crc');\n // cas ski data à faire (? non fait !)\n $wtp = strtoupper($chipid.'-'.$crc.'-'.$accno);\n $r = array('ok'=>0, 'bonus'=>array('points'=>0, 'jours'=>0));\n\n $kwtp = $this->modresort->knownEPLWTP(array($chipid, $crc, $accno));\n if ($kwtp['ok'] == 1 && $this->modresort->expiredWTP($wtp)){\n $r['ok'] = 0;\n $r['errormess'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpexpire');\n }\n // wtp valide : points bonus eventuels - ceux du panier si il y en a\n if ($kwtp['ok'] == 1){\n $r['ok'] = 1;\n if ($bonus == 1 && $kwtp['eplwtpoid'] != NULL){\n $rs = $this->modloyalty->getCardPoints($kwtp['eplwtpoid']);\n $r['bonus']['points'] = $rs['points'];\n $caddie = $this->getCaddie();\n if (isset($caddie['bonusbycards'][$wtp])){\n $jours = $caddie['bonusbycards'][$wtp];\n if ($jours > 0){\n $jpoints = $this->modloyalty->getPointsFromJours($jours);\n $r['bonus']['points'] = $r['bonus']['points'] - $jpoints;\n }\n }\n $r['bonus']['jours'] = $this->modloyalty->getJoursBonus($r['bonus']['points']);\n }\n if ($this->modresort->expiredWTP($wtp)){\n\t$r['ok'] = 0;\n\t$r['errormess'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpexpire');\n }\n } else {\n // check de la carte 'temoin' pour assurer que c'est pas service indisponible\n if (defined('EPL_TA_CHECKWTPCARD')){\n\tif (!$this->modresort->checkWTP(explode('-', EPL_TA_CHECKWTPCARD))){\n\t $r['errormess'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_serviceindisponible');\n\t if (empty($r['errormess']))\n\t $r['errormess'] = '[Service indisponible, veuillez réessayer dans quelques instants]';\n\t $r['ok'] = 0;\n\t}\n }\n }\n if ($mode == 'a')\n die(json_encode($r));\n return $r;\n }",
"function wtsCtrlSaisieForfaits($ar){\n\n $p = new XParam($ar, array('mode'=>'a'));\n $mode = $p->get('mode');\n $r = array('ok'=>1, 'errors'=>array(), 'message'=>'');\n $cards = $p->get('card');\n $chips = $p->get('CHIPID');\n $accs = $p->get('ACCNO');\n $crcs = $p->get('CRC');\n $cardlabels = $p->get('NEWCARDLabel');\n $usedcards = array();\n // lecture de l'offre\n $offresoid = $p->get('offreoid');\n $productsoid = $p->get('productoid');\n $validfroms = $p->get('validfrom');\n $validtills = $p->get('validtill');\n \n $justgrps = $p->get('justgrp');\n\n // parcours des lignes et controles\n foreach($cards as $lineid => $card){\n $card2 = substr($card, 0, 7);\n /*\n\t$card = \n\tNEWCARD_'oidproduit' = achat nouvelle carte\n\tNEWCARD'uniqid' = carte en commande issue du panier\n\tWTPCARD strictement = saisie du numéro ou copie choix depuis les cartes du compte\n\tWTPCARD'unidiq'= carte saisie sélectionnée dans le panier\n\tdonc si substr(card, 0, 7) == NEWCARD : controles sur cartes en achat \n si substr(card, 0, 7) == WTPCARD : controles sur cartes en rechargement\n */\n if ($card2 == 'WTPCARD'){\n //$wtp = sprintf(\"%s-%s-%s\", $chips[$lineid], $crcs[$lineid], $accs[$lineid]);\n $wtp = $this->modresort->formatWTPParts(array($chips[$lineid], $crcs[$lineid], $accs[$lineid]));\n // TA, SKD 01- ou 1- le reste est fait dans le module\n if (strlen($wtp) != 16 && strlen($wtp) != 25 && strlen($wtp) != 24){\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_remplirwtp');\n break;\n } else if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n // verification du WTP\n $r2 = $this->wtsCheckWTP(array('mode'=>'r', 'b'=>0, 'chipid'=>$chips[$lineid], 'accno'=>$accs[$lineid], 'crc'=>$crcs[$lineid]));\n if ($r2['ok'] != 1){\n $r['ok'] = 0; \n\t if (isset($r2['errormess'])){\n\t $r['message'] = $r2['errormess'];\n\t } else {\n\t $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_wtpinvalide');\n\t }\n\t array_push($r['errors'], \n\t\t array(\"CHIPDID[$lineid]\", '', $lineid), \n\t\t array(\"ACCNO[$lineid]\", '', $lineid), \n\t\t array(\"CRC[$lineid]\", '', $lineid),\n\t\t array(\"WTPMASK[$lineid]\", '', $lineid)\n\t\t );\n }\n // autres controles :\n $productoid = $productsoid[$lineid];\n $offreoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $justgrp = $justgrps[$lineid];\n if ($r['ok'] == 1){\n $r3 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, false, $validfrom, $validtill, $lineid);\n if ($r3['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r3['message'];\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n $r41 = $this->checkProductInCaddie($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r41['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r41['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r41['message'];\n else\n $r['message'] .= \"\\n\".$r41['message'];\n } else {\n $r['message'] = $r41['message'];\n }\n }\n }\n if (($r['ok'] == 1 || $r['ok'] == 0 && $r['iswarn'])){\n\t $r4 = $this->checkProductInOrder($wtp, $offreoid, $productoid, $validfrom, $validtill);\n if ($r4['ok'] != 1){\n $r['ok'] = 0;\n $r['iswarn'] = $r4['iswarn'];\n if ($r['iswarn']){\n if ($r['message'] == '')\n $r['message'] = $r4['message'];\n else\n $r['message'] .= \"\\n\".$r4['message'];\n } else {\n $r['message'] = $r4['message'];\n }\n }\n }\n // verifier que la carte n'est pas déjà dans le panier\n // si oui que ces forfaits sont compatibles ... avec le validfrom\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n } else if ($card2 == 'NEWCARD'){\n $wtp = $cardlabels[$lineid];\n $justgrp = $justgrps[$lineid];\n $productoid = $productsoid[$lineid];\n $validfrom = $validfroms[$lineid];\n $validtill = $validtills[$lineid];\n $r31 = $this->localWTPCheck($wtp, $offreoid, $productoid, $justgrp, true, $validfrom, $validtill, $lineid);\n if ($r31['ok'] != 1){\n $r['ok'] = 0;\n $r['message'] = $r31['message'];\n break;\n }\n if (!isset($usedcards[$wtp])){\n $usedcards[$wtp] = 1;\n }else{\n $r['ok'] = 0;\n $r['message'] = $GLOBALS['XSHELL']->labels->getCustomSysLabel('wts_cartesuniques');\n break;\n }\n }\n }\n // sleep(10);\n\n // si ok vérification des dates (on prend le premier produit, tous devant avoir les même caractériqiques)\n if ($r['ok'] == 1){\n $this->checkDelais($r, $productsoid, $validfroms);\n }\n\n // if ($r['ok'] == 1){\n // $r['ok'] = 0; $r['message']='tests '.$r['message'];\n // $r['iswarn'] = 1;\n // }\n\n\n // TESTS PENDNT AJOUT PANIER\n // $r = array('ok'=>1,'iswarn'=>1, 'errors'=>array('kk'), 'message'=>'PAS DE CONTROLES');\n\n\n if (count($r['errors'])>0)\n $r['ok'] = 0;\n if ($mode == 'a'){\n header('Content-Type:application/json; charset=UTF-8');\n die(json_encode($r));\n }\n return $r;\n }",
"private function __getRupiah()\r\n\t{\r\n\t\t$request = Requests::get('http://www.bca.co.id/id/biaya-limit/kurs_counter_bca/kurs_counter_bca_landing.jsp');\r\n\t\t\r\n\t\tpreg_match('(\\d\\d\\40\\w+\\40\\d\\d\\d\\d\\40/\\40\\d\\d:\\d\\d\\40\\w+)', $request->body, $data['date']);\r\n\t\tpreg_match_all('/\\<td style=\"text-align:right;\"\\>(\\d+.\\d+)\\<\\/td\\>/', $request->body, $data['curr']);\r\n\r\n\t\t$return['date'] = $data['date'][0];\r\n\t\t$return['usd']['sell'] = $data['curr'][1][0];\r\n\t\t$return['usd']['buy'] = $data['curr'][1][1];\r\n\r\n\t\treturn $return;\r\n\t}",
"abstract public function getPasiekimai();",
"function SchedullerPO(){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Cek --> Update PO List, Update Quantity PO Open\n\t\t// echo \"hahah\";\t\t\n\t\trequire_once APPPATH.'third_party/sapclasses/sap.php';\n\t\t$sap = new SAPConnection();\n\t\t$sap->Connect(APPPATH.\"third_party/sapclasses/logon_dataDev.conf\");\n\t\tif ($sap->GetStatus() == SAPRFC_OK ) $sap->Open ();\n\t\tif ($sap->GetStatus() != SAPRFC_OK ) {\n\t\t\techo $sap->PrintStatus();\n\t\t\texit;\n\t\t}\n\n\t\t$fce = &$sap->NewFunction (\"Z_ZCMM_VMI_PO_DETAILC\");\n\t\t\n\t\tif ($fce == false) {\n\t\t\t$sap->PrintStatus();\n\t\t\texit;\n\t\t}\n\t\t\n\t\t$start \t= date(\"20170101\");\t\t\t\t\t// Date start VMI apps\n\t\t$end \t= date(\"Ymd\");\t\t\t\t\t\t// Date Now\n\t\t$opco\t\t\t\t\t= '7000';\n\t\t$fce->COMPANY \t\t\t= \"$opco\";\t\t// BUKRS\n\t\t// $fce->PO_TYPE \t\t= 'ZK17';\n\t\t// $fce->VENDOR \t\t= ;\n\t\t$fce->DATE['SIGN'] \t= 'I';\n\t\t$fce->DATE['OPTION']\t= 'BT';\n\t\t$fce->DATE['LOW'] \t= $start;\n\t\t$fce->DATE['HIGH'] \t= $end;\n\t\t\n\t\t$fce->PO_TYPE->row['SIGN'] \t= 'I';\n\t\t$fce->PO_TYPE->row['OPTION'] \t= 'EQ';\n\t\t$fce->PO_TYPE->row['LOW'] \t= 'ZK10';\n\t\t$fce->PO_TYPE->row['HIGH'] \t= '';\n\t\t$fce->PO_TYPE->Append($fce->PO_TYPE->row);\n\t\t\n\t\t$fce->PO_TYPE->row['SIGN'] \t= 'I';\n\t\t$fce->PO_TYPE->row['OPTION'] \t= 'EQ';\n\t\t$fce->PO_TYPE->row['LOW'] \t= 'ZK17';\n\t\t$fce->PO_TYPE->row['HIGH'] \t= '';\n\t\t$fce->PO_TYPE->Append($fce->PO_TYPE->row);\n\t\t\t\n $fce->call();\n\n if ($fce->GetStatus() == SAPRFC_OK) {\n $fce->T_ITEM->Reset();\n $data=array();\n $empty=0;\n $tampildata=array();\n while ($fce->T_ITEM->Next()) {\n\t\t\t\t$matnr \t\t= $fce->T_ITEM->row[\"MATNR\"];\t// Kode Material\n\t\t\t\t$lifnr \t\t= $fce->T_ITEM->row[\"LIFNR\"];\t// Kode Vendor\n\t\t\t\t$ebeln \t\t= $fce->T_ITEM->row[\"EBELN\"];\t// No PO\n\t\t\t\t$menge \t\t= intval($fce->T_ITEM->row[\"MENGE\"]);\t// Quantity PO\n\t\t\t\t$sisaqty\t= intval($fce->T_ITEM->row[\"DELIV_QTY\"]);\t// Quantity PO Open\n\t\t\t\t$werks \t\t= $fce->T_ITEM->row[\"WERKS\"];\t// Plant\n\t\t\t\t$vendor\t\t= $fce->T_ITEM->row[\"VENDNAME\"];\t// Nama Vendor\n\t\t\t\t$material \t= $fce->T_ITEM->row[\"MAKTX\"];\t// Nama Material\n\t\t\t\t$potype \t= $fce->T_ITEM->row[\"BSART\"];\t// Type PO\n\t\t\t\t// $mins \t\t= $fce->T_ITEM->row[\"EISBE\"];\t// Safety Stock\n\t\t\t\t$mins \t\t= $fce->T_ITEM->row[\"MINBE\"];\t// Re Order Point\n\t\t\t\t$maxs \t\t= $fce->T_ITEM->row[\"MABST\"];\t// Max\n\t\t\t\t$statuspo\t= $fce->T_ITEM->row[\"ELIKZ\"];\t// Max\n\t\t\t\t$start \t\t= date_format(date_create($fce->T_ITEM->row[\"BEDAT\"]),'d M Y');\n\t\t\t\t$end \t\t= date_format(date_create($fce->T_ITEM->row[\"EINDT\"]),'d M Y');\n\t\t\t\t\n\t\t\t\tif($statuspo == 'X' || $statuspo == 'x')\n\t\t\t\t{\n\t\t\t\t\t$sts = 0;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$sts = 1;\n\t\t\t\t}\n\t\t\t\t$sqlread= \"SELECT count(id_list) ADA\n\t\t\t\t\t\t\tFROM VMI_MASTER \n\t\t\t\t\t\t\twhere NO_PO = '$ebeln' and\n\t\t\t\t\t\t\tKODE_MATERIAL = '$matnr' and \n\t\t\t\t\t\t\tKODE_VENDOR = '$lifnr' and\n\t\t\t\t\t\t\tPLANT = '$werks' \n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t//and QUANTITY = '$menge'\n\t\t\t\t$jum \t= $this->db->query($sqlread)->row();\n\t\t\t\t$nilai \t= $jum->ADA;\n\t\t\t\t// echo $nilai.\"->\".$matnr.\" | \".$lifnr.\" | \".$ebeln.\" | \".$menge.\" | \".$werks.\" | \".$vendor.\" | \".$material.\" | \".$start.\" | \".$end.\" ==> \".$potype.\"<br/>\";\n\t\t\t\t// $ebeln == \"6310000038\" || $ebeln == \"6310000039\" || $ebeln == \"6310000040\" || $ebeln == \"6310000041\" || $ebeln == \"6310000042\" || $ebeln == \"6310000043\")\n\t\t\t\t\n\t\t\t\tif($nilai < 1){\n\t\t\t\t\tif($ebeln == \"6310000038\" || $ebeln == \"6310000039\" || $ebeln == \"6310000040\" || $ebeln == \"6310000041\" || $ebeln == \"6310000042\" || $ebeln == \"6310000043\"\n\t\t\t\t\t\t|| $lifnr == \"0000113004\" || $lifnr == \"0000110091\" || $lifnr == \"0000110253\" || $lifnr == \"0000110015\" || $lifnr == \"0000112369\" || $lifnr == \"0000110016\"){\t\t\t\t\t\t\n\t\t\t\t\t\t$sqlcount \t= \"SELECT max(ID_LIST) MAXX FROM VMI_MASTER\";\n\t\t\t\t\t\t$maxid \t\t= $this->db->query($sqlcount)->row();\t\t\n\t\t\t\t\t\t$max_list \t= $maxid->MAXX+1;\n\t\t\t\t\t\t$insert\t\t= \"insert into VMI_MASTER(ID_LIST,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPLANT,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tKODE_MATERIAL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNAMA_MATERIAL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUNIT,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tKODE_VENDOR,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNAMA_VENDOR,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tNO_PO,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPO_ITEM,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCONTRACT_ACTIVE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tCONTRACT_END,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDOC_DATE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSLOC,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMIN_STOCK,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMAX_STOCK,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTOCK_AWAL,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTOCK_VMI,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tQUANTITY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tID_COMPANY,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTATUS)\n\t\t\t\t\t\t\t\t\t\t\t\tvalues('$max_list',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$werks',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$matnr',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$material',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"MEINS\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$lifnr',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$vendor',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$ebeln',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"EBELP\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTO_DATE('\".date_format(date_create($start),'Y-m-d').\"','YYYY-MM-DD'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTO_DATE('\".date_format(date_create($end),'Y-m-d').\"','YYYY-MM-DD'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTO_DATE('\".date_format(date_create($start),'Y-m-d').\"','YYYY-MM-DD'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"LGORT\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"EISBE\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".$fce->T_ITEM->row[\"MABST\"].\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'0',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$sisaqty',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$opco',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$sts'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\";\n\t\t\t\t\t\t$save \t= $this->db->query($insert);\n\t\t\t\t\t\techo \"Baru ==> $ebeln | $material | $vendor | $opco | $werks | $potype<br/>\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"Skip ==> $ebeln | $material | $vendor | $opco | $werks | $potype<br/>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($nilai >= 1){\n\t\t\t\t\t$sqlread1 = \"SELECT ID_LIST\n\t\t\t\t\t\t\tFROM VMI_MASTER \n\t\t\t\t\t\t\twhere NO_PO = '$ebeln' and\n\t\t\t\t\t\t\tKODE_MATERIAL = '$matnr' and \n\t\t\t\t\t\t\tKODE_VENDOR = '$lifnr' and\n\t\t\t\t\t\t\tPLANT = '$werks' \n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t//and QUANTITY = '$menge'\n\t\t\t\t\t$getlist= $this->db->query($sqlread1)->row();\n\t\t\t\t\t$idlist = $getlist->ID_LIST;\n\t\t\t\t\t$update\t\t= \"update VMI_MASTER set quantity = '$sisaqty',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmin_stock = '$mins',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmax_stock = '$maxs',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTATUS = '$sts'\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere ID_LIST = '$idlist'\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t\t$update_data\t= $this->db->query($update);\n\t\t\t\t\t\techo \"$update <br/>\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t\techo \"Skip ==> $ebeln | $material | $vendor | $opco| $werks | $potype<br/>\";\n\t\t\t\t}\n\t\t\t\t// echo \"<hr/>\"; \n\t\t\t}\n\t\t// echo \"<pre>\";\n\t\t// print_r($fce);\n\t\t// echo \"hahaha\";\n $fce->Close();\n\t\t}\n }",
"function uspsRate($weight, $dest_zip, $origin_zip) { \n $userName = '628NORTH2278'; // Your USPS Username\n $url = \"http://Production.ShippingAPIs.com/ShippingAPI.dll\";\n $ch = curl_init();\n\n // set the target url\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, 1);\n\n // parameters to post\n curl_setopt($ch, CURLOPT_POST, 1);\n\n $data = \"API=RateV4&XML=<RateV4Request USERID=\\\"$userName\\\"><Package ID=\\\"1ST\\\"><Service>PRIORITY</Service><ZipOrigination>\";\n\t$data .= $origin_zip;\n\t$data .= \"</ZipOrigination><ZipDestination>\";\n\t$data .= $dest_zip;\n\t$data .= \"</ZipDestination><Pounds>\";\n\t$data .= $weight;\n \t$data .= \"</Pounds><Ounces>0</Ounces><Container>VARIABLE</Container><Size>REGULAR</Size><Machinable>TRUE</Machinable></Package></RateV4Request>\";\n\n // send the POST values to USPS\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\n\n $result=curl_exec ($ch);\n $data = strstr($result, '<?');\n\n // echo '<!-- '. $data. ' -->'; // TESTING USE ONLY\n\n $xml_parser = xml_parser_create();\n xml_parse_into_struct($xml_parser, $data, $vals, $index);\n xml_parser_free($xml_parser);\n $params = array();\n $level = array();\n foreach ($vals as $xml_elem) {\n if ($xml_elem['type'] == 'open') {\n if (array_key_exists('attributes',$xml_elem)) {\n list($level[$xml_elem['level']],$extra) = array_values($xml_elem['attributes']);\n } else {\n $level[$xml_elem['level']] = $xml_elem['tag'];\n }\n }\n if ($xml_elem['type'] == 'complete') {\n $start_level = 1;\n $php_stmt = '$params';\n while($start_level < $xml_elem['level']) {\n $php_stmt .= '[$level['.$start_level.']]';\n $start_level++;\n }\n $php_stmt .= '[$xml_elem[\\'tag\\']] = $xml_elem[\\'value\\'];';\n eval($php_stmt);\n }\n }\n curl_close($ch);\n // echo '<pre>'; print_r($params); echo'</pre>'; // Uncomment to see xml tags\n return $params['RATEV4RESPONSE']['1ST']['1']['RATE'];\n}",
"function wtssaisieforfaits($ar){\n $p = new XParam($ar, array());\n $offre = $p->get('offre');\n // lecture des informations à partir des produits (oid=>nb) \n // par exemple si appel offre de meilleur prix\n if ($p->is_set('products')){\n $products = $p->get('products');\n $wtsvalidfrom = $p->get('validfrom');\n $perror = false;\n $wtspools = array();\n $wtspersons = array();\n $wtstickets = array();\n foreach($products as $poid=>$pnb){\n\t$rsp = selectQuery('select wtspool, wtsperson, wtsticket from '.self::$tableCATALOG.' where PUBLISH=1 and LANG=\"FR\" and KOID=\"'.$poid.'\"');\n\tif($rsp->rowCount() != 1){\n\t XLogs::critical(get_class($this). '::wtssaisieforfaits erreur appel via produits produit : '.$poid);\n\t $perror = true;\n\t}\n\t$orsp = $rsp->fetch();\n\t$wtspools[] = $orsp['wtspool'];\n\t$wtstickets[] = $orsp['wtsticket'];\n\t$wtspersons[$orsp['wtsperson']] = $pnb;\n }\n $rsp->closeCursor();\n unset($orsp);\n unset($products);\n unset($poid);\n unset($pnb);\n $wtspool = array_unique($wtspools);\n $wtsticket = array_unique($wtstickets);\n if (count($wtspool) != 1 || count($wtsticket) != 1){\n\t XLogs::critical(get_class($this). '::wtssaisieforfaits erreur appel via produits plusieurs pools, plusieurs tickets '.implode($wtspools).' '.implode($wtstickets));\n\t $perror = true;\n }\n $wtspool = $wtspools[0];\n $wtsticket = $wtstickets[0];\n $wtsperson = $wtspersons;\n unset($wtspools);\n unset($wtstickets);\n unset($wtspersons);\n if ($perror){\n\tXLogs::critical(get_class($this). '::wtssaisieforfaits erreur appel via produits');\n\tXShell::setNext($GLOBALS['HOME_ROOT_URL']);\n\treturn;\n }\n } else {\n $wtspool = $p->get('wtspool');\n $wtsperson = $p->get('wtspersonnumber');\n $wtsticket = $p->get('wtsticket');\n $wtsvalidfrom = $p->get('wtsvalidfrom');\n }\n $personpackid = uniqid('ppid_');\n $tpl = 'wts';\n // l'offre doit être valide\n if (!$this->modcatalog->validOffer($offre)){\n XLogs::critical(get_class($this). '::wtssaisieforfaits acces offre offline ');\n XShell::setNext($GLOBALS['HOME_ROOT_URL']);\n return;\n }\n if ($p->is_set('wtspersonnumbermo')){\n unset($_REQUEST['wtspersonnumber']);\n $_REQUEST['wtspersonnumber'] = $wtsperson = array($p->get('wtspersonnumbermo')=>1);\n }\n $lines = array();\n // saison\n $season = $this->getSeason();\n // lecture de l'offre en cours\n $doffre = $this->modcatalog->displayOffre(array('_options'=>array('local'=>true),\n\t\t\t\t\t\t 'tplentry'=>$tpl.'_offre',\n\t\t\t\t\t\t 'offre'=>$offre,\n\t\t\t\t\t\t 'caddie'=>true\n\t\t\t\t\t\t )\n\t\t\t\t\t );\n // correction saison dans le cas des offres flashs\n if ($doffre['doffre']['oflash']->raw == 1){\n $season['odatedeb'] = $season['odatedebflash'];\n $season['odelaitrans'] = $season['odelaitransflash'];\n $season['odelaifab'] = $season['odelaifabflash'];\n }\n // premier jour de ski pour controle des dispo cartes\n $firstdaynewcard = $this->getFirstDayNewCard($season);\n\n // lecture des produits (pour ensuite avoir le prix)\n foreach($wtsperson as $personoid=>$personnb){\n if (empty($personnb) || $personnb<1)\n continue;\n $dp = $this->modcatalog->displayProduct($offre, $wtspool, $wtsticket, $personoid);\n if ($dp == NULL)\n continue;\n $dpc = $this->modcatalog->getPrdConf($dp);\n// jcp, bloquant, c'est sur le module => xmodeplspecialoffer::getSpecialOffer\n// $dpsp = $this->dsspoffer->getSpecialOffer($dp);\n\n // ajout des assurances ...\n $assur = $this->modcatalog->getProductAssurance($dp, $dpc);\n\n // ajout des prix de cartes si achat possible a cette date pour ce produit\n $newcard = $this->modcatalog->getNewCard($dp, $dpc, $wtsvalidfrom);\n $availablesNewCards = $this->modcatalog->getAvailablesNewCards($dp, $dpc, $wtsvalidfrom, $firstdaynewcard);\n // recherche des prix fidelite (complements sur le bloc forfait)\n $loyaltymess = $loyaltyprice = $loyaltyProductOid = NULL;\n if ($this->modcustomer->loyaltyActive()){\n list($loyaltymess, $loyaltyprice, $loyaltyProductOid) = $this->modcustomer->preCheckLoyaltyReplacementProduct(array('season'=>$season, 'doffre'=>$doffre['doffre'], 'dp'=>$dp, 'dpc'=>$dpc, 'validfrom'=>$wtsvalidfrom, 'availablesNewCards'=>$availablesNewCards));\n }\n // creation des lignes pour chaque personne\n for($i = 0; $i<$personnb; $i++){\n $lines[] = array('assur'=>$assur,\n 'personpackid'=>$personpackid,\n 'productconf'=>$dpc,\n 'validfrom'=>$wtsvalidfrom,\n 'product'=>$dp,\n 'newcard'=>$newcard, /* a virer */\n 'availablesnewcards'=>$availablesNewCards,\n 'id'=>'line_'.str_replace(':', '', $dp['oid']).sprintf('_%04d', $i),\n 'label'=>$dp['owtsperson']->link['olabel']->raw.' '.($i+1),\n 'amin'=>$dp['owtsperson']->link['oamin']->raw,\n 'amax'=>$dp['owtsperson']->link['oamax']->raw,\n\t\t\t 'personoid'=>$dp['owtsperson']->raw,\n 'saisieident'=>$dp['owtsperson']->link['osaisieident']->raw,\n 'saisiedob'=>$dp['owtsperson']->link['osaisiedob']->raw,\n 'loyaltyproductoid'=>($loyaltyProductOid == NULL)?false:$loyaltyProductOid,\n 'loyaltyprice'=>($loyaltyProductOid == NULL)?false:$loyaltyprice,\n 'loyaltymess'=>($loyaltyProductOid != NULL && $loyaltymess != 'found')?$loyaltymess:false);\n }\n }\n \n // lecture des prix par validfrom/produit\n // calcul validtill\n // disponbilité des cartes / validfrom : forfaits déja présent, delais (cas des nouvelles cartes)\n $caddie = $this->getCaddie();\n $carddispo = $caddie['cards'];\n foreach($lines as $il=>&$line){\n $t = $this->modcatalog->getProductTariff($line['product'], $wtsvalidfrom);\n $line['validtill'] = $this->getValidtill($line['validfrom'], $line['product'], $line['productconf']);\n if ($t['tariff'] != 'NOT FOUND'){\n $line['price'] = $t['tariff'];\n } else {\n $line['price'] = 'NOT FOUND';\n }\n foreach($caddie['lines'] as $lineid=>$pline){\n // exclusions par date de forfaits\n if ($pline['type'] == 'forfait'){\n if (($pline['validfrom']<=$line['validtill'] && $line['validtill']<=$pline['validtill']) || \n\t ($pline['validfrom'] <= $line['validfrom'] && $line['validfrom'] <= $pline['validtill']))\n $carddispo[$pline['cardid']] = false;\n }\n // exclusion par nombre (? a paramétrer ?)\n if (count($caddie['bycards'][$pline['cardid']]['cardlines'])>=3){\n $carddispo[$pline['cardid']] = false;\n }\n // exclusion par type de carte \n }\n /* -- vente de cartes seules -- */\n /* et de toute façon */\n foreach($caddie['bycards'] as $cardid=>$carditems){\n if ($carditems['newcard'] !== false && $line['validfrom']<=$firstdaynewcard)\n $carddispo[$cardid] = false;\n }\n $line['cardsdispo'] = $carddispo;\n }\n unset($line);\n // calcul du meilleur prix (si l'offre ne l'interdit pas)\n if ($doffre['doffre']['obetterprice'] && $doffre['doffre']['obetterprice']->raw == 1){\n $rbo = $this->ctrlChoix($ar);\n if ($r->ok == 0){\n XShell::toScreen2($tpl, 'betteroffers', $rbo);\n }\n }\n // gestion du compte client : raccourcis\n if (!empty($this->aliasmyaccount)){\n $custcards = $this->modcustomer->dispCustCards();\n if (count($custcards['custcardnos'])>0)\n XShell::toScreen2($tpl, 'custcards', $custcards);\n } \n // totaux car catégories (pour offre pro entre autres)\n $summary = array('lines'=>array(), 'totforfait'=>0, 'needAssur'=>false, 'needDob'=>false, 'needIdent'=>false);\n foreach($lines as $il=>$aline){\n $aproductoid = $aline['product']['oid'];\n if (!isset($summary['lines'][$aproductoid])){\n $summary['lines'][$aproductoid] = array('label'=>$aline['product']['label'], 'nb'=>0, 'price'=>$aline['price'], 'tot'=>0);\n }\n $summary['lines'][$aproductoid]['nb'] += 1;\n $summary['lines'][$aproductoid]['tot'] += $aline['price'];\n $summary['totforfait'] += $aline['price'];\n if (isset($aline['assur']))\n $summary['needAssur'] = true;\n if ($aline['saisieident'] == 1)\n $summary['needIdent'] = true;\n if ($aline['saisiedob'] == 1)\n $summary['needDob'] = true;\n }\n // cas offre saisie modification de skieurs ! offre \"coherente ?\" \n $advanced = array('on'=>false);\n if (isset($doffre['doffre']['oadvancedinput']) && $doffre['doffre']['oadvancedinput']->raw == 1){\n //&& count($caddie['lines']) == 0){ \n $advanced['on'] = true;\n $this->defaultStepTemplates['commande2'] = $this->templatesdir.'choix-produit2.html';\n foreach($lines as $il=>&$line){\n\tforeach($doffre['tickets'] as $ticketoid=>$aticket){\n\t if (in_array($wtspool, $aticket['pools'])){\n\t $odp = $this->modcatalog->displayProduct($offre, $wtspool, $ticketoid, $line['personoid']);\n\t if ($odp != NULL){\n\t $line['advanced']['calendar'] = $this->modcatalog->configureOneCalendar($season, array($opd['oprdconf']), $doffre['doffre']);\n\t if ($line['product']['owtsticket']->raw == $ticketoid){\n\t\t$aticket['selected'] = true;\n\t }\n\t $aticket['productoid'] = $odp['oid'];\n\t $line['advanced']['tickets'][$ticketoid] = $aticket;\n\t }\n\t }\n\t}\n }\n }\n XShell::toScreen2($tpl, 'advanced', $advanced);\n XShell::toScreen2($tpl, 'summary', $summary);\n //\n XShell::toScreen2($tpl, 'lines', $lines);\n // blocage du pave haut\n XShell::toScreen1($tpl.'_offre', $doffre);\n XShell::toScreen2($tpl.'_offre', 'lock', true);\n\n // valeurs choisies\n $choix = array('wtsvalidfrom'=>$wtsvalidfrom,\n 'wtspool'=>$wtspool,\n 'wtspersonnumber'=>$wtsperson,\n 'wtsticket'=>$wtsticket);\n\n XShell::toScreen2($tpl.'_offre', 'current', $choix);\n\n $choix['wtsoffre'] = $offre;\n setSessionVar('wts_offre_current', $choix);\n\n $_REQUEST['insidefile'] = $this->defaultStepTemplates['commande2'];\n $this->setOffreLabels($doffre['doffre']);\n $this->wtscallback();\n\n }",
"public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }",
"public function getruang1_semprop(){\n\t\t$query=\"SELECT count(tempat)as jumlah1semprop from penjadwalan where tempat='1' and jenis_ujian='SEMPROP'\"; //Query menampilkan jumlah ruangan 1 pada Seminar proposal\n\t\t$this->eksekusi($query); //Eksekusi query diatas\n\t\treturn $this->result; //Mengembalikan hasil dari query diatas\n\t}",
"public function getBanyakSoal();",
"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 actionUkrainepostShipping()\n {\n echo 20.14;\n }",
"function get_provinsi(){\n\t\t$curl = curl_init();\n\n\t\tcurl_setopt_array($curl, array(\n\t\t\tCURLOPT_URL => \"http://api.rajaongkir.com/starter/province?id=12\",\n\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\tCURLOPT_ENCODING => \"\",\n\t\t\tCURLOPT_MAXREDIRS => 10,\n\t\t\tCURLOPT_TIMEOUT => 30,\n\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n\t\t\tCURLOPT_CUSTOMREQUEST => \"GET\",\n\t\t\tCURLOPT_HTTPHEADER => array(\n\t\t\t\t\"key: 8f22875183c8c65879ef1ed0615d3371\"\n\t\t\t\t),\n\t\t\t));\n\n\t\t$response = curl_exec($curl);\n\t\t$err = curl_error($curl);\n\n\t\tcurl_close($curl);\n\n\t\tif ($err) {\n\t\t\techo \"cURL Error #:\" . $err;\n\t\t} else {\n\t\t\techo $response;\n\t\t}\n\t}",
"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}",
"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}",
"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}",
"function get_cost($from, $to,$weight)\r\n{\r\n require_once 'REST_Ongkir.php';\r\n \r\n $rest = new REST_Ongkir(array(\r\n 'server' =&gt; 'http://api.ongkir.info/'\r\n ));\r\n \r\n//ganti API-Key dibawah ini sesuai dengan API Key yang anda peroleh setalah mendaftar di ongkir.info\r\n $result = $rest-&gt;post('cost/find', array(\r\n 'from' =&gt; $from,\r\n 'to' =&gt; $to,\r\n 'weight' =&gt; $weight.'000',\r\n 'courier' =&gt; 'jne',\r\n'API-Key' =&gt;'ABCDEFGHIJKLMNOPQRSTUVWXYZ123456'\r\n ));\r\n \r\n try\r\n {\r\n $status = $result['status'];\r\n \r\n // Handling the data\r\n if ($status-&gt;code == 0)\r\n {\r\n $prices = $result['price'];\r\n $city = $result['city'];\r\n \r\n echo 'Ongkos kirim dari ' . $city-&gt;origin . ' ke ' . $city-&gt;destination . '&lt;br /&gt;&lt;br /&gt;';\r\n \r\n foreach ($prices-&gt;item as $item)\r\n {\r\n echo 'Layanan: ' . $item-&gt;service . ', dengan harga : Rp. ' . $item-&gt;value . ',- &lt;br /&gt;';\r\n }\r\n }\r\n else\r\n {\r\n echo 'Tidak ditemukan jalur pengiriman dari surabaya ke jakarta';\r\n }\r\n \r\n }\r\n catch (Exception $e)\r\n {\r\n echo 'Processing error.';\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 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 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 rVPS2VPS()\n {\n $output = new stdClass();\n $output->e = false;\n $db = new MySQL(DB_INFO);\n $table = 'ipt_rvps';\n $rvps_id = $_POST['rvps'] ?? 0;\n $rvps = $db->selectId($rvps_id,'*',$table);\n $output->e = ($rvps) ? false : 'Not found rvps !';\n if ($rvps) {\n $vps['object_id'] = $rvps['object_id'];\n $vps['ip_id'] = $rvps['ip_id'];\n $vps['network_id'] = $rvps['network_id'];\n $vps['server_nid'] = $rvps['server_nid'];\n $vps['plan_id'] = $rvps['plan_id'];\n $vps['uuid'] = $rvps['uuid'];\n $vps['os_id'] = $rvps['os_id'];\n $vps['port'] = $rvps['port'];\n $vps['ram'] = $rvps['ram'];\n $vps['cpu_core'] = $rvps['cpu_core'];\n $vps['hdd'] = $rvps['hdd'];\n $vps['ssd'] = $rvps['ssd'];\n $vps['nvme'] = $rvps['nvme'];\n $vps['rvps_meta'] = $rvps['id'].','.$rvps['status'].','.$rvps['timestamp'].','.$rvps['note'];\n $table = 'ipt_vps';\n $insert = $db->insert($vps,$table);\n $output->e = ($insert) ? false : 'Error Insert !';\n $output->res = ($insert) ?? false;\n if ($insert) {\n $table = 'ipt_ips';\n $data['status'] = 3;\n $update = $db->updateId($vps['ip_id'],$data,$table);\n $output->e = ($update) ? false : 'Error Update IP !';\n }\n global $actlog;\n $actlog->add(\"Convert rVPS to VPS\", $rvps, ($insert) ?? null, $output->res);\n\n }\n echo json_encode($output);\n }",
"function UPDSAR()\n{\n $aropen_rows = db::fetchRows($sql, 'DTSDATA.AROPEN'); /* #251 */\n if ($aropen\n ) {\n if ($billpay->BPPAY_ < $billpay->BPNET_\n && $billpay->BPRTN_ === 0\n && $billpay->BPOIN_ > 0\n ) {\n $aropen->AROPPD += $billpay->BPPAY_; /* #258 */\n $aropen->ARONPD += $billpay->BPPAY_; /* #259 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #260 */\n $aropen->update(); /* #261 update record */\n $receipts->CRCID = $aropen->AROCID; /* #263 */\n $receipts->CRPER = $PERIOD; /* #264 */\n $receipts->CRCUST = $aropen->AROCUS; /* #265 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #266 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #267 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #268 */\n $receipts->CRINV_ = $aropen->AROINV; /* #269 */\n $receipts->CRTYPE = '1'; /* #270 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #271 */\n $receipts->CRGLDP = ''; /* #272 */\n $receipts->CRGLAC = ''; /* #273 */\n $receipts->CRDESC = ''; /* #274 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #275 */\n $receipts->CRDUS = 0; /* #276 */\n $receipts->CRSTCM = ''; /* #277 */\n $receipts->CRSTGL = ''; /* #278 */\n $receipts->CRSTS = ''; /* #279 */\n $receipts->CRDST = ''; /* #280 */\n $receipts->insert(); /* #281 insert record */\n $customer_rows = db::fetchRows($sql, 'DTSDATA.MFCUST'); /* #283 */\n $customer->CULRDT = $billpay->BPPDAT; /* #284 */\n $customer->CUREC->update(); /* #285 update record */\n } /* #286 end if */\n } /* #288 end if */\n}",
"public function obtenerViajesplus();",
"function wtsproadd2caddie($ar){\n $p = new XParam($ar, array());\n $prowtps = $p->get('prowtp');\n $offreoid = $p->get('prooffreoid');\n $validfrom = $p->get('provalidfrom');\n $card = 'WTPCARD'; // un rechargement\n $comParms = array('validfrom', 'offreoid', 'card');\n $shortwtps = array_values($prowtps);\n // lecture des cartes correspondandtes ... pour avoir le vrai numero\n // compte tenu du pro en cour\n $eplPro = getSessionVar('EPL_PRO');\n if (empty($eplPro))\n $groupoid = '';\n else\n $groupoid = $eplPro['progroup'];\n $wtpmap = selectQuery('select shortwtp, wtpcard from '.XModEPassLibre::$tableCARDSGROUP.' where lnkgroup=\"'.$groupoid.'\" and shortwtp in (\"'.implode('\",\"', $shortwtps).'\")')->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_COLUMN|PDO::FETCH_UNIQUE);\n foreach($comParms as $pn){\n $ar[$pn] = array();\n }\n $ar['CHIPID'] = array();\n $ar['ACCNO'] = array();\n $ar['CRC'] = array();\n $ar['lineid'] = array();\n $ar['linesOptions'] = array();\n foreach($prowtps as $lineid=>$prowtp){\n if (empty($prowtp))\n continue;\n if (!isset($wtpmap[$prowtp]))\n continue;\n $ar['linesOptions'][$lineid] = array('shortwtp'=>$prowtp);\n $ar['lineid'][] = $lineid;\n list($ar['CHIPID'][$lineid], $ar['CRC'][$lineid], $ar['ACCNO'][$lineid]) = explode('-', $wtpmap[$prowtp]);\n foreach($comParms as $pn){\n $ar[$pn][$lineid] = $$pn;\n }\n \n }\n $r = $this->wtsadd2caddie($ar);\n return $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 uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }",
"function getdataRwyt($skpd_id, $AsetId, $tglakhirperolehan, $tglawalperolehan, $param, $tglpembukuan)\n{\n\n if($param == '01') {\n $tabel_log = 'log_tanah';\n\n $tabel = 'tanah';\n $tabel_view = 'view_mutasi_tanah';\n } elseif($param == '02') {\n $tabel_log = 'log_mesin';\n $tabel = 'mesin';\n $tabel_view = 'view_mutasi_mesin';\n } elseif($param == '03') {\n $tabel_log = 'log_bangunan';\n $tabel = 'bangunan';\n $tabel_view = 'view_mutasi_bangunan';\n } elseif($param == '04') {\n $tabel_log = 'log_jaringan';\n $tabel = 'jaringan';\n $tabel_view = 'view_mutasi_jaringan';\n } elseif($param == '05') {\n $tabel_log = 'log_asetlain';\n $tabel = 'asetlain';\n $tabel_view = 'view_mutasi_asetlain';\n } elseif($param == '06') {\n $tabel_log = 'log_kdp';\n $tabel = 'kdp';\n $tabel_view = 'view_mutasi_kdp';\n }\n\n /*Kode Riwayat\n 0 = Data baru\n 2 = Ubah Kapitalisasi\n 7 = Penghapusan Sebagian\n 21 = Koreksi Nilai\n 26 = Penghapusan Pemindahtanganan\n 27 = Penghapusan Pemusnahan\n */\n/* $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' and l.TglPembukuan>='$tglpembukuan'\n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";*/\n\n $paramLog = \"l.TglPerubahan >'$tglawalperolehan' and l.TglPerubahan <='$tglakhirperolehan' \n AND l.Kd_Riwayat in (0,1,2,3,7,21,26,27,28,50,51,29,30,281,291,36) and l.Kd_Riwayat != 77 \n and l.Aset_ID = '{$AsetId}' \n order by l.Aset_ID ASC\";\n\n\n $log_data = \"select l.* from {$tabel_log} as l \n inner join {$tabel} as t on l.Aset_ID = t.Aset_ID \n where $paramLog\";\n //pr($log_data);\n $splitKodeSatker = explode ('.', $skpd_id);\n if(count ($splitKodeSatker) == 4) {\n $paramSatker = \"kodeSatker = '$skpd_id'\";\n $paramSatker_mts_tr = \"SatkerAwal = '$skpd_id'\";\n $paramSatker_mts_rc = \"SatkerTujuan = '$skpd_id'\";\n\n } else {\n $paramSatker = \"kodeSatker like '$skpd_id%'\";\n $paramSatker_mts_tr = \"SatkerAwal like '$skpd_id%'\";\n $paramSatker_mts_rc = \"SatkerTujuan like '$skpd_id%'\";\n\n }\n $queryALL = array( $log_data );\n for ($i = 0; $i < count ($queryALL); $i++) {\n $result = mysql_query ($queryALL[ $i ]) or die ($param.\"---\".$queryALL[ $i ].\" \".mysql_error());\n if($result) {\n while ($dataAll = mysql_fetch_object ($result)) {\n if($dataAll->Kd_Riwayat == 3 && $dataAll->kodeSatker != $skpd_id) {\n\n } else {\n $getdata[] = $dataAll;\n }\n\n }\n }\n\n }\n if($getdata) {\n return $getdata;\n }\n}",
"public function lulus_SEMPROP(){ //fungsi untuk menghitung jumlah mahasiswa yang lulus semprop\n\t\t$query=\"SELECT COUNT(id_seminar) AS jml_lulus FROM seminar_proposal WHERE status='lulus' GROUP BY status\"; //query untuk menghitung jumlah mahasiswa yang lulus semprop\n\t\t$this->eksekusi($query); //mengeksekusi query diatas\n\t\treturn $this->result; //mengembalikan hasil query diatas\n\t}",
"function testFl($destinationLocation, $originLocation, $departureDate, $adultNo, $childNo, $infantNo, $flightClass)\n{\n $seatRequested = $adultNo+$childNo;//+$infantNo;\n $childExist = \"\";\n $infantExist = \"\";\n if( $childNo != 0 ) {\n $childExist = '<PassengerTypeQuantity Code=\"CNN\" Quantity=\"'.$childNo.'\" />';\n }\n if( $infantNo != 0 ) {\n $infantExist = '<PassengerTypeQuantity Code=\"INF\" Quantity=\"'.$infantNo.'\" />';\n }\n $service = new SWSWebService(\"[email protected]\",\"8888\",\"CTC78866\",\"8HYD\",\"https://webservices.sabre.com/websvc\");\n if($service->SessionCreate())\n {\n if($service->SessionValidate())\n {\n $OTA_AirLowFareSearchRQ = '\n <OTA_AirLowFareSearchRQ xmlns=\"http://www.opentravel.org/OTA/2003/05\" ResponseType=\"OTA\" Version=\"3.4.0\" AvailableFlightsOnly=\"true\">\n <POS>\n <Source PseudoCityCode=\"8HYD\">\n <RequestorID ID=\"1\" Type=\"1\">\n <CompanyName Code=\"TN\" />\n </RequestorID>\n </Source>\n </POS>\n <OriginDestinationInformation RPH=\"1\">\n <DepartureDateTime>'.$departureDate.'</DepartureDateTime>\n <OriginLocation LocationCode=\"'.$originLocation.'\" />\n <DestinationLocation LocationCode=\"'.$destinationLocation.'\" />\n <TPA_Extensions>\n <SegmentType Code=\"O\" />\n <IncludeVendorPref Code=\"AA\"/>\n <IncludeVendorPref Code=\"AC\"/>\n <IncludeVendorPref Code=\"AF\"/>\n <IncludeVendorPref Code=\"AI\"/>\n <IncludeVendorPref Code=\"BA\"/>\n <IncludeVendorPref Code=\"BI\"/>\n <IncludeVendorPref Code=\"BR\"/>\n <IncludeVendorPref Code=\"CA\"/>\n <IncludeVendorPref Code=\"CI\"/>\n <IncludeVendorPref Code=\"CX\"/>\n <IncludeVendorPref Code=\"CZ\"/>\n <IncludeVendorPref Code=\"DG\"/>\n <IncludeVendorPref Code=\"DL\"/>\n <IncludeVendorPref Code=\"EK\"/>\n <IncludeVendorPref Code=\"EY\"/>\n <IncludeVendorPref Code=\"FJ\"/>\n <IncludeVendorPref Code=\"GA\"/>\n <IncludeVendorPref Code=\"GF\"/>\n <IncludeVendorPref Code=\"IT\"/>\n <IncludeVendorPref Code=\"JL\"/>\n <IncludeVendorPref Code=\"KE\"/>\n <IncludeVendorPref Code=\"KL\"/>\n <IncludeVendorPref Code=\"LA\"/>\n <IncludeVendorPref Code=\"LH\"/>\n <IncludeVendorPref Code=\"LX\"/>\n <IncludeVendorPref Code=\"MF\"/>\n <IncludeVendorPref Code=\"MH\"/>\n <IncludeVendorPref Code=\"MI\"/>\n <IncludeVendorPref Code=\"MK\"/>\n <IncludeVendorPref Code=\"MU\"/>\n <IncludeVendorPref Code=\"NH\"/>\n <IncludeVendorPref Code=\"NZ\"/>\n <IncludeVendorPref Code=\"OD\"/>\n <IncludeVendorPref Code=\"OZ\"/>\n <IncludeVendorPref Code=\"PG\"/>\n <IncludeVendorPref Code=\"PR\"/>\n <IncludeVendorPref Code=\"PX\"/>\n <IncludeVendorPref Code=\"QF\"/>\n <IncludeVendorPref Code=\"QR\"/>\n <IncludeVendorPref Code=\"QV\"/>\n <IncludeVendorPref Code=\"SK\"/>\n <IncludeVendorPref Code=\"SQ\"/>\n <IncludeVendorPref Code=\"SU\"/>\n <IncludeVendorPref Code=\"TG\"/>\n <IncludeVendorPref Code=\"TK\"/>\n ';\n if($infantNo == 0) {\n $OTA_AirLowFareSearchRQ .= '<IncludeVendorPref Code=\"TR\"/><IncludeVendorPref Code=\"TT\"/>\n ';}\n else if($childNo == 0) {\n $OTA_BargainMaxFinder .= '\n <IncludeVendorPref Code=\"OD\"/>\n ';\n }\n else {\n\n }\n $OTA_AirLowFareSearchRQ .= '\n <IncludeVendorPref Code=\"TZ\"/><IncludeVendorPref Code=\"UA\"/>\n <IncludeVendorPref Code=\"UB\"/>\n <IncludeVendorPref Code=\"UL\"/>\n <IncludeVendorPref Code=\"VA\"/>\n <IncludeVendorPref Code=\"VN\"/>\n <IncludeVendorPref Code=\"WY\"/>\n <IncludeVendorPref Code=\"8M\"/>\n <IncludeVendorPref Code=\"9W\"/>\n </TPA_Extensions>\n </TPA_Extensions>\n </OriginDestinationInformation>\n <TravelPreferences ValidInterlineTicket=\"false\" SmokingAllowed=\"false\" ETicketDesired=\"false\" MaxStopsQuantity=\"2\">\n <CabinPref PreferLevel=\"Only\" Cabin=\"'.$flightClass.'\"/>\n <TPA_Extensions>\n <TripType Value=\"OneWay\" />\n <LongConnectTime Min=\"780\" Max=\"1200\" Enable=\"true\" />\n <ExcludeCallDirectCarriers Enabled=\"true\" />\n </TPA_Extensions>\n </TravelPreferences>\n <TravelerInfoSummary>\n <SeatsRequested>'.$seatRequested.'</SeatsRequested>\n <AirTravelerAvail>\n <PassengerTypeQuantity Code=\"ADT\" Quantity=\"'.$adultNo.'\" />\n '.$childExist.'\n '.$infantExist.'\n </AirTravelerAvail>\n <PriceRequestInformation NegotiatedFaresOnly=\"false\" CurrencyCode=\"SGD\">\n </PriceRequestInformation>\n </TravelerInfoSummary>\n <TPA_Extensions>\n <IntelliSellTransaction>\n <RequestType Name=\"150ITINS\" />\n <CompressResponse Value=\"false\"/>\n </IntelliSellTransaction>\n </TPA_Extensions>\n </OTA_AirLowFareSearchRQ>';\n $xml = $service->Execute(\"BargainFinderMaxRQ\",$OTA_AirLowFareSearchRQ,\"OTA\",\"Air\");\n echo '<xmp>'.$OTA_AirLowFareSearchRQ.'</xmp>';\n\n $parseResult = simplexml_load_string($xml);\n $arrayFinalFlight = json_decode(json_encode($parseResult), true);\n\n echo '<pre>';\n var_dump($arrayFinalFlight);\n die();\n\n if( $xml ) {\n\n //$result_test = XMLtoArray($xml);\n return $xml;\n }\n else {\n echo htmlspecialchars($service->error);\n }\n }\n else {\n echo htmlspecialchars($service->error);\n }\n }\n else {\n echo htmlspecialchars($service->error);\n }\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 USR() {\n }",
"private function purchaseRestrictionsAwal($ins) {\n \n $dateNow = date('Y-m-d'); // date now\n \n // cek total volume pengisian selama hari ini, apakah >= 100 liter\n $totalVolumeFill = $this->db->query(\"SELECT SUM(liter) AS `total_volume` FROM {$this->transaction_kendaraan} WHERE no_pol = '{$ins['no_pol']}' AND tgl = '{$dateNow}' \")\n ->row_array()['total_volume'];\n \n $lastTotalVolume = floatval($ins['liter']) + floatval($totalVolumeFill);\n \n if($lastTotalVolume > 200) {\n\t $response = [\n\t \"status\" => \"error\", \n\t \"message\" => \"Customer tidak dapat mengisi lebih dari 200 liter ({$lastTotalVolume} liter) dalam satu hari yang sama\"\t \n\t // \"message\" => \"Customer tidak dapat mengisi lebih dari 200 liter ({$lastTotalVolume} liter) dalam pembelian ke - {$ins['numOfBuy']}\", \n\t ];\n\t echo json_encode($response);\n\t \n } else if(floatval($ins['liter']) > 75) {\n\t \n\t $response = [\n\t \"status\" => \"approval\", \n\t \"message\" => \"Customer ingin mengisi lebih dari 75 liter ({$ins['liter']} liter) dalam pembelian {$ins['numOfBuy']}\", \n\t \"question\" => \"Apakah anda setuju melakukan pengisian lebih dari 75 liter ({$ins['liter']} liter) ?\"\n\t ];\n\t echo json_encode($response);\n\t \n } else {\n\t $response = [\n\t \"status\" => \"ok\", \n\t \"message\" => \"Customer ingin mengisi biosolar dengan volume {$ins['liter']} liter pada pembelian ke - {$ins['numOfBuy']}\"\n\t ];\n\t echo json_encode($response);\t \n } \n }",
"function wtsadd2caddie($ar){\n $dps = array();\n $dos = array();\n $persByType = array();\n $switchTo = array();\n $p = new XParam($ar, array());\n $oldcaddie = $this->getCaddie();\n $linesid = $p->get('lineid');\n $formparms = array('personpackid', 'validfrom', 'offreoid', 'productoid',\n 'card', 'CHIPID', 'ACCNO', 'CRC', 'assurance',\n 'NEWCARDLabel', 'joursbonus', 'justphotoidentnom',\n 'justphotoidentprenom', 'justphotoident', 'justphotoidentdob',\n 'justetatciv', 'justdomicile', 'justgrp', 'justgrpname','customercard');\n $lineparms = array('validfrom', 'offreoid', 'productoid');\n foreach($formparms as $parm){\n $$parm = $p->get($parm);\n }\n $season = $this->getSeason();\n $lines = array();\n $cptf = 1;\n foreach($linesid as $lineid){\n $id1 = date('dhis').$cptf.uniqid('_');\n $cptf ++;\n $line = array('type'=>'forfait');\n foreach($lineparms as $parm){\n $v = $$parm;\n if (isset($v[$lineid]))\n $line[$parm]=$v[$lineid];\n else\n $line[$parm]=NULL;\n }\n // passage d'options par prog seulement\n if (isset($ar['linesOptions'][$lineid])){\n $line['options'] = $ar['linesOptions'][$lineid];\n }\n // lecture du produit et des produits associés\n if (!isset($dps[$line['productoid']])){\n\t$dps[$line['productoid']] = $this->productInfos($line['productoid'], $line['validfrom']);\n\t// cause est utilisé directement ...\n\t$dpc = $dps[$line['productoid']]['dpc'];\n }\n // lecture des offre (la meme ... ) pour avoir le flash\n if (!isset($dos[$line['offreoid']])){\n $dos[$line['offreoid']] = $this->modcatalog->displayOffre(array('_options'=>array('local'=>true),\n\t\t\t\t\t\t\t\t\t'tplentry'=>TZR_RETURN_DATA,\n\t\t\t\t\t\t\t\t\t'offre'=>$line['offreoid'],\n\t\t\t\t\t\t\t\t\t'caddie'=>false)); // le stock importe pas ici\n }\n\n // remplacement du produit si existe (fidelite - voir wtssaisieforfaits)\n if ($this->modcustomer->loyaltyActive()){\n\n // carte du forfait (!! mêmes tests que dessous)\n $rpcard2 = substr($card[$lineid], 0, 8);\n if ($rpcard2 == 'NEWCARD_'){\n $rpwtp['cardoid'] = substr($card[$lineid], 8);\n $rpwtp['cardlabel'] = $NEWCARDLabel[$lineid];\n } elseif($card[$lineid] == 'WTPCARD'){\n //$rpnewwtp = strtoupper($CHIPID[$lineid].'-'.$CRC[$lineid].'-'.$ACCNO[$lineid]);\n $rpnewwtp = $this->modresort->formatWTPParts(array($CHIPID[$lineid], $CRC[$lineid], $ACCNO[$lineid]));\n $rpwtp['cardlabel'] = $rpnewwtp;\n $rpwtp['cardoid'] = NULL;\n } elseif(!empty($card[$lineid])){ \n $rpwtp['cardlabel'] = $NEWCARDLabel[$lineid];\n $rpwtp['cardoid'] = NULL;\n $rpcardid = $card[$lineid];\n if (isset($oldcaddie['bycards']) && $oldcaddie['bycards'][$rpcardid]['newcard'] !== false){\n $rplineid = $oldcaddie['bycards'][$rpcardid]['newcard'];\n $rpwtp['cardoid'] = $oldcaddie['lines'][$rplineid]['productoid'];\n }\n }\n\n list($loyaltymess, $loyaltyprice, $loyaltyProductOid) = $this->modcustomer->checkLoyaltyReplacementProduct(array('season'=>$season, 'doffre'=>$dos[$line['offreoid']]['doffre'], 'dp'=>$dps[$line['productoid']], 'dpc'=>$dps[$line['productoid']]['dpc'], 'validfrom'=>$line['validfrom'], 'availablesNewCards'=>$dps[$line['productoid']]['availablesNewCards'],'wtp'=>$rpwtp));\n if ($loyaltyProductOid != NULL){\n XLogs::notice(get_class($this), '::wtsadd2caddie replace product '.$line['productoid'].' -> '.$loyaltyProductOid.' '.$loyaltyprice);\n $ldps = $this->productInfos($loyaltyProductOid , $line['validfrom']);\n // on remplace ... \n \n $line['productoid'] = $loyaltyProductOid;\n $dps[$line['productoid']] = $ldps;\n } else {\n XLogs::notice(get_class($this), '::wtsadd2caddie no replacement product '.$line['productoid']);\n }\n }\n // top des des produtis non dates - date si rechargement\n $line['validfrom_hidden'] = 0;\n if ($dps[$line['productoid']]['dpc']['ocalendar']->link['otype']->raw == 'NO-DATE'){\n list($drech, $dnew, $dliv) = $this->getFirstDayNoDate(date('Y-m-d h:i:s'));\n $line['validfrom_hidden'] = 1;\n if ($card[$lineid] == 'WTPCARD'){\n $line['validfrom'] = $drech;\n $line['calendar-NO-DATE'] = 0;\n } else {\n $line['calendar-NO-DATE'] = 1;\n }\n }\n // ajout d'un top flash et de l'id de la vente\n if ($dos[$line['offreoid']]['doffre']['oflash']->raw == 1){\n $line['isflash'] = true;\n foreach($dos[$line['offreoid']]['doffre']['_flash']['ventes'] as $i=>$vente){\n if (in_array($line['validfrom'], $vente['dates'])){\n $line['flashoid'] = $vente['oid'];\n break;\n }\n }\n } else {\n $line['isflash'] = false;\n }\n // ajout de l'id packpersonne et du type de personne (pour la suppression)\n if (isset($personpackid[$lineid])){\n $line['ispersonpack'] = true;\n $line['personpackid'] = $personpackid[$lineid];\n // replacement type de personne suivant composition pack\n $personType = $dps[$line['productoid']]['owtsperson']->raw;\n $persByType[$personType]++;\n if ($dos[$line['offreoid']]['persons'][$personType]->switchTo && $dos[$line['offreoid']]['persons'][$personType]->switchLimit && $persByType[$personType] == $dos[$line['offreoid']]['persons'][$personType]->switchLimit) {\n $personType = $dos[$line['offreoid']]['persons'][$personType]->switchTo;\n if (!isset($switchTo[$personType])) {\n $switchTo[$personType] = selectQuery(\"select WTSCATALOG.koid from WTSCATALOG join WTSCATALOG c2 using (wtsticket) where WTSCATALOG.wtsperson='$personType' and c2.koid='{$line['productoid']}'\")->fetch(PDO::FETCH_COLUMN);\n // lecture du produit et des produits associés\n if (!isset($dps[$switchTo[$personType]])){\n $dps[$switchTo[$personType]] = $this->productInfos($switchTo[$personType], $line['validfrom']);\n // cause est utilisé directement ...\n $dpc = $dps[$switchTo[$personType]]['dpc'];\n }\n }\n $line['productoid'] = $switchTo[$personType];\n }\n $line['wtsperson'] = $personType;\n } else {\n $line['ispersonpack'] = false;\n $line['personpackid'] = NULL;\n $line['wtsperson'] = NULL;\n }\n // ajout des champs issus du produit etc ...\n $line['validtill'] = $this->getValidtill($line['validfrom'], $dps[$line['productoid']], $dps[$line['productoid']]['dpc']);\n $line['price'] = $dps[$line['productoid']]['price']['tariff'];\n $line['label'] = $dps[$line['productoid']]['label'];\n\n // ajout carte du forfait\n $line['cardid'] = $card[$lineid];\n $line['lineid'] = $lineid;\n\n // traitement des justifs (cartes ce/ coupons ..)\n if (isset($dpc['ojustgrps']) && $dpc['ojustgrps']->raw == 1){\n $line['justifgrps'] = $justgrpname[$lineid].' '.$justgrp[$lineid];\n }\n // traitement des pièces justficaves\n if ($dpc['ojustphotoident']->raw == 1 \n && $dps[$line['productoid']]['owtsticket']->link['oduree']->raw >= $dpc['ojustphotonbjour']->raw){\n $needphotoident = true;\n } else {\n $needphotoident = false;\n }\n if (($justphotoidentnom[$lineid] && $justphotoidentprenom[$lineid])\n\t || $justphotoidentdob[$lineid]\n\t || $dpc['ojustetatciv']->raw == 1\n\t || $dpc['ojustdomicile']->raw == 1\n\t || $needphotoident){\n\t$nom = $justphotoidentnom[$lineid];\n\t$prenom = $justphotoidentprenom[$lineid];\n\t$dob = $justphotoidentdob[$lineid];\n\tif ($this->dsjustifs == NULL)\n\t $this->dsjustifs = XDataSource::objectFactoryHelper8('BCLASS=XDSTable&SPECS='.self::$tableJUSTIFS);\n\t$jar = array('lineid'=>$lineid, 'nom'=>$nom, 'prenom'=>$prenom, 'dob'=>$dob, 'photoident'=>0, 'etatciv'=>0, 'domicile'=>0, 'customercard'=>0);\n\t// utilisation d'une carte client\n\tif (isset($customercard[$lineid])){\n\t $jar['customercard'] = $customercard[$line_id];\n\t if ($needphotoident){\n\t if (!isset($dscustomercards)){\n\t $dscustomercards = XDataSource::objectFactoryHelper8('BCLASS=XDSTable&SPECS='.self::$tableCUSTOMERCARDS);\n\t }\n\t $dcard = $dscustomercards->rdisplay($customercard[$lineid]);\n\t $tmpfile = TZR_TMP_DIR.uniqid('customercard');\n\t copy($dcard['ophoto']->filename, $tmpfile);\n\t $_FILES['justphotoident']['tmp_name'][$lineid] = $tmpfile;\n\t $_FILES['justphotoident']['type'][$lineid] = $dcard['ophoto']->mime;\n\t $_FILES['justphotoident']['name'][$lineid] = $dcard['ophoto']->originalname;\n\t $_FILES['justphotoident']['type'][$lineid] = filesize($tmpfile);\n\t }\n\t}\n\tif ($dpc['ojustetatciv']->raw == 1)\n\t $jar['etatciv'] = 1;\n\tif ($dpc['ojustdomicile']->raw == 1)\n\t $jar['domicile'] = 1;\n\tif ($dpc['ojustphotoident']->raw == 1){\n\t $jar['photoident'] = 1;\n\t}\n\t$justifoid = $this->saveJustif($jar);\n\t$line['justifoid'] = $justifoid;\n }\n // ajout des lignes cartes : NEWCARD = commander; WTPCARD = saisie du WTP; autres : id de cartes deja dans le panier\n // !!! NEWCARD_WTSCATLOG:xxx = ajouter nouvelle carte, NEWCARDuniqid = nouvelle carte du panier - sera rattachée\n // !!! on a la meme chose (ou presque pour le remplacement de produit)\n $card2 = substr($line['cardid'], 0, 8);\n if ($card2 == 'NEWCARD_'){\n $cardid = uniqid('NEWCARD');\n $line['cardid'] = $cardid;\n $cardoid = substr($card[$lineid], 8);\n // trouver le bon prix et intitulé des cartes en commande\n $cardok = 0;\n foreach($dps[$line['productoid']]['availablesNewCards'] as $acarddesc){\n if($cardoid == $acarddesc['oid']){\n $cardok=1;\n break;\n }\n }\n if ($cardok !== 1){ // on doit trouver !!! sauf si on enlève\n XLogs::notice(get_class($this), '::wtsadd2caddie erreur recherche produit carte');\n //die('An error occured'.$cardoid);\n // on cherche le prix directement (DSR : rp + produit public ...)\n $ct = $this->modcatalog->getProductTariff(NULL, $line['validfrom'], $cardoid);\n if ($ct['tariff'] == 'NOT FOUND'){\n XLogs::critical(get_class($this), '::wtsadd2caddie erreur recherche produit carte');\n die('An error occured'.$cardoid);\n } else {\n $acarddesc['price'] = $ct['tariff'];\n }\n }\n $lines[$id1.'_0000'] = array('linesid'=>$lineid, 'type'=>'carte',\n\t\t\t\t 'label'=>$NEWCARDLabel[$lineid], 'cardid'=>$cardid,\n\t\t\t\t 'productoid'=>$cardoid,\n\t\t\t\t 'price'=>$acarddesc['price']);\n //les cartes ne sont pas dans le pack car elle peuvent avoir d'autres forfaits dessus\n $line['cardlabel'] = $NEWCARDLabel[$lineid];\n\t/*saisie WTP */\n } elseif($line['cardid'] == 'WTPCARD'){\n $newwtp = $this->modresort->formatWTPParts(array($CHIPID[$lineid], $CRC[$lineid], $ACCNO[$lineid]));\n // regarder si cette carte n'est pas déjà dans le panier si oui recup de sont cardid\n $cardid = array_search($newwtp, $oldcaddie['cards']);\n if ($cardid === false)\n $cardid = uniqid('WTPCARD');\n $line['cardlabel'] = $newwtp;\n $line['cardid'] = $cardid;\n\t/* autres cas : cartes du panier (WTPCARDuniq ou cartes en commandes NEWCARuniqid)*/\n } elseif(!empty($line['cardid'])){ \n $line['cardlabel'] = $NEWCARDLabel[$lineid];\n $line['cardid'] = $card[$lineid];\n }\n // ajout des lignes assurances\n if (isset($assurance[$lineid])){\n $lines[$id1.'_0020'] = array('lineid'=>$lineid, 'type'=>'assurance',\n\t\t\t\t 'label'=>$dps[$line['productoid']]['assur']['label'],\n\t\t\t\t 'productoid'=>$dps[$line['productoid']]['assur']['oid'],\n\t\t\t\t 'price'=>$dps[$line['productoid']]['assur']['price'], \n\t\t\t\t 'options'=>array());\n if (isset($dps[$line['productoid']]['assur']['options'])){\n $lines[$id1.'_0020']['options'] = $dps[$line['productoid']]['assur']['options'];\n }\n $lines[$id1.'_0020']['ispersonpack'] = $line['ispersonpack'];\n $lines[$id1.'_0020']['personpackid'] = $line['personpackid'];\n }\n // ajout des lignes bonus et calcul du bonus\n if (isset($joursbonus[$lineid]) && $joursbonus[$lineid]>0){\n // calcul du forfait bonus\n list($rline, $bline) = $this->modloyalty->getForfaitBonus($line, $joursbonus[$lineid], $dps[$line['productoid']]);\n if ($bline != NULL && $rline != NULL){\n $bline['jours'] = $joursbonus[$lineid];\n // ev garder ... $line[$id1.'_0009'] = $line\n $bline['ispersonpack'] = $line['ispersonpack'];\n $bline['personpackid'] = $line['personpackid'];\n $line = $rline;\n $lines[$id1.'_0015'] = $bline;\n }\n if ($bline != NULL && $rline == NULL){\n $bline['ispersonpack'] = $line['ispersonpack'];\n $bline['personpackid'] = $line['personpackid'];\n $lines[$id1.'_0010'] = $bline;\n $line = NULL;\n }\n }\n if ($line != NULL){\n $lines[$id1.'_0010'] = $line;\n }\n }\n // ajout des lignes au caddie\n $this->addLines2Caddie($lines);\n }",
"public function getPR() {}",
"function HitungIPS($mhswid, $khsid, $ipk, $tahun) {\r\n //$ips = GetaField('krs', \"StatusKRSID='A' and KHSID\", $khsid,\r\n // \"sum(SKS * BobotNilai)/sum(SKS)\");\r\n $_ips = GetFields('krs left join jadwal j on krs.JadwalID = j.JadwalID', \"(j.JenisJadwalID is null or j.JenisJadwalID <> 'R') and StatusKRSID='A' and (GradeNilai<>'-' or GradeNilai <> '' and not GradeNilai is NULL) and krs.Final = 'Y' and krs.MhswID='$mhswid' and krs.TahunID\", $tahun,\r\n \"sum(krs.SKS * BobotNilai)/sum(krs.SKS) as IPS, sum(krs.SKS) as SKS\");\r\n $ips = $_ips['IPS']+0;\r\n $sks = $_ips['SKS']+0;\r\n $s = \"update khs set IPS=$ips, IP=$ipk, TotalSKS=$sks where KHSID='$khsid' \";\r\n $r = _query($s);\r\n return $ips;\r\n}",
"function konversi_data($spout, $status = 0)\n{\n\n $spout_log = array();\n $spout_log[ kode ] = ($spout[ kode ]);\n $spout_log[ kode2 ] = ($spout[ kode2 ]);\n $spout_log[ kode3 ] = ($spout[ kode3 ]);\n $spout_log[ kode4 ] = ($spout[ kode4 ]);\n $spout_log[ kode5 ] = ($spout[ kode5 ]);\n $spout_log[ Uraian ] = ($spout[ Uraian ]);\n if($status == 0) {\n $spout_log[ no_aset ] = ($spout[ no_aset ]);\n $spout_log[ riwayat ] = ($spout[ riwayat ]);\n } else {\n $spout_log[ no_aset ] = ($spout[ Aset_ID ]);\n $spout_log[ riwayat ] = ($spout[ log_id ]);\n }\n $spout_log[ saldo_awal_jml ] = abs ($spout[ saldo_awal_jml ]);\n $spout_log[ saldo_awal_nilai ] = abs ($spout[ saldo_awal_nilai ]);\n $spout_log[ saldo_awal_akm ] = abs ($spout[ saldo_awal_akm ]);\n $spout_log[ saldo_awal_nilaibuku ] = abs ($spout[ saldo_awal_nilaibuku ]);\n\n $spout_log[ koreksi_tambah_jml ] = abs ($spout[ koreksi_tambah_jml ]);\n $spout_log[ koreksi_tambah_nilai ] = abs ($spout[ koreksi_tambah_nilai ]);\n \n $spout_log[ bj_aset_baru ] = abs ($spout[ bj_aset_baru ]);\n $spout_log[ bj_aset_kapitalisasi ] = abs ($spout[ bj_aset_kapitalisasi ]);\n\n $spout_log[ bj_total_brg ] = abs ($spout[ bj_total_brg ]);\n $spout_log[ bj_total_nilai ] = abs ($spout[ bj_total_nilai ]);\n\n $spout_log[ bm_aset_baru ] = abs ($spout[ bm_aset_baru ]);\n $spout_log[ bm_aset_kapitalisasi ] = abs ($spout[ bm_aset_kapitalisasi ]);\n $spout_log[ bm_total_nilai ] = abs ($spout[ bm_total_nilai ]);\n $spout_log[ bm_total_brg ] = abs ($spout[ bm_total_brg ]);\n \n $spout_log[ hibah_jml ] = abs ($spout[ hibah_jml ]);\n $spout_log[ hibah_nilai ] = abs ($spout[ hibah_nilai ]);\n $spout_log[ transfer_skpd_tambah_jml ] = abs ($spout[ transfer_skpd_tambah_jml ]);\n $spout_log[ transfer_skpd_tambah_nilai ] = abs ($spout[ transfer_skpd_tambah_nilai ]);\n\n $spout_log[ reklas_aset_tambah_jml ] = abs ($spout[ reklas_aset_tambah_jml ]);\n $spout_log[ reklas_aset_tambah_nilai ] = abs ($spout[ reklas_aset_tambah_nilai ]);\n\n\n $spout_log[ inventarisasi_jml ] = abs ($spout[ inventarisasi_jml ]);\n $spout_log[ inventarisasi_nilai ] = abs ($spout[ inventarisasi_nilai ]);\n \n $spout_log[ jumlah_mutasi_tambah_jml ] = abs ($spout[ jumlah_mutasi_tambah_jml ]);\n $spout_log[ jumlah_mutasi_tambah_nilai ] = abs ($spout[ jumlah_mutasi_tambah_nilai ]);\n $spout_log[ koreksi_penyusutan_tambah ] = abs ($spout[ koreksi_penyusutan_tambah ]);\n $spout_log[ bp_penyusutan_tambah ] = abs ($spout[ bp_penyusutan_tambah ]);\n $spout_log[ bp_berjalan ] = abs ($spout[ bp_berjalan ]);\n\n $spout_log[ koreksi_kurang_jml ] = abs ($spout[ koreksi_kurang_jml ]);\n $spout_log[ koreksi_kurang_nilai ] = abs ($spout[ koreksi_kurang_nilai ]);\n \n $spout_log[ hapus_hibah_nilai ] = abs ($spout[ hapus_hibah_nilai ]);\n $spout_log[ hapus_lelang_nilai ] = abs ($spout[ hapus_lelang_nilai ]);\n $spout_log[ hapus_hilang_musnah_nilai ] = abs ($spout[ hapus_hilang_musnah_nilai ]);\n $spout_log[ hapus_total_jml ] = abs ($spout[ hapus_total_jml ]);\n $spout_log[ hapus_total_nilai ] = abs ($spout[ hapus_total_nilai ]);\n \n $spout_log[ transfer_skpd_kurang_jml ] = abs ($spout[ transfer_skpd_kurang_jml ]);\n $spout_log[ transfer_skpd_kurang_nilai ] = abs ($spout[ transfer_skpd_kurang_nilai ]);\n\n $spout_log[ reklas_krg_aset_tetap ] = abs ($spout[ reklas_krg_aset_tetap ]);\n $spout_log[ reklas_krg_ekstra ] = abs ($spout[ reklas_krg_ekstra ]);\n $spout_log[ reklas_krg_aset_lain ] = abs ($spout[ reklas_krg_aset_lain ]);\n $spout_log[ reklas_krg_aset_bm_tdk_dikapitalisasi ] = abs ($spout[ reklas_krg_aset_bm_tdk_dikapitalisasi ]);\n\n $spout_log[ reklas_krg_jml ] = abs ($spout[ reklas_krg_jml ]);\n $spout_log[ reklas_krg_nilai ] = abs ($spout[ reklas_krg_nilai ]);\n \n $spout_log[ jumlah_mutasi_kurang_jml ] = abs ($spout[ jumlah_mutasi_kurang_jml ]);\n $spout_log[ jumlah_mutasi_kurang_nilai ] = abs ($spout[ jumlah_mutasi_kurang_nilai ]);\n $spout_log[ koreksi_penyusutan_kurang ] = abs ($spout[ koreksi_penyusutan_kurang ]);\n $spout_log[ bp_penyusutan_kurang ] = abs ($spout[ bp_penyusutan_kurang ]);\n \n $spout_log[ NilaiPerolehan ] = abs ($spout[ NilaiPerolehan ]);\n $spout_log[ Saldo_akhir_jml ] = abs ($spout[ Saldo_akhir_jml ]);\n $spout_log[ AkumulasiPenyusutan ] = abs ($spout[ AkumulasiPenyusutan ]);\n $spout_log[ NilaiBuku ] = abs ($spout[ NilaiBuku ]);\n\n\n $spout_log[ Kd_Riwayat ] = ($spout[ Kd_Riwayat ]);\n $spout_log[ log_data ] = ($spout[ log_data ]);\n return $spout_log;\n}",
"public function obtenerViajesplusAbonados();",
"public function hapus_toko(){\n\t}",
"public function actionHotelski_restoran()\n\t{\n\t $this->getLang();\n\t\t$this->base('hotelski_restoran');\n $this->naslovStranice = 'Hotelski Restoran';\n\t\t$this->render('clanak');\n \n\t}",
"public function luas()\n {\n return $this->panjang * $this->lebar;\n }",
"function wtsCheckLine($ar=NULL){\n $p = new XParam($ar, array());\n $lineid = $p->get('lineid');\n $cards = $p->get('card');\n $chips = $p->get('CHIPID');\n $accs = $p->get('ACCNO');\n $crcs = $p->get('CRC');\n $cardlabels = $p->get('NEWCARDLabel');\n // lecture de l'offre\n $offresoid = $p->get('offreoid');\n $productsoid = $p->get('productoid');\n $otherproductsoid = $p->get('otherproducts');\n $validfroms = $p->get('validfrom');\n $validtills = $p->get('validtills');\n\n $linesid = array_keys($offresoid);\n \n $r = array('ok'=>false, 'mess'=>'', 'lineid'=>$lineid, 'unchanged'=>false, 'values'=>array());\n try{\n //if ($otherproductsoid[$lineid] == $productsoid[$lineid]){\n //throw new Exception('unchanged');\n //}\n $dp = $this->modcatalog->displayProduct(NULL, NULL, NULL, NULL, $otherproductsoid[$lineid]);\n if ($dp == NULL){\n\tthrow new Exception('wts_product_nonvendu');\n }\n $dpc = $this->modcatalog->getPrdConf($dp);\n $t = $this->modcatalog->getProductTariff($dp, $validfroms[$lineid]);\n $validtill = $this->getValidtill($validfroms[$lineid], $dp, $dpc);\n\n if ($t['tariff'] == 'NOT FOUND'){\n\tthrow new Exception('wts_product_nonvendu');\n }\n\n // assurance (son prix, son oid)\n $assur = $this->modcatalog->getProductAssurance($dp, $dpc);\n \n // les data pour affichage de la nouvelle ligne\n $r['values']['assur'] = $assur;\n $r['values']['price'] = $t['tariff'];\n $r['values']['validtill'] = $validtill;\n $r['values']['validfrom'] = $validfroms[$lineid];\n $r['values']['productoid'] = $otherproductsoid[$lineid];\n $r['ok'] = true;\n } catch(Exception $e){\n $mess = $e->getMessage();\n if ($mess == 'unchanged'){\n\t$r['ok'] = true;\n\t$r['unchanged'] = true;\n } else {\n\t$labels = new XLabels();\n\t$r['ok'] = false;\n\t$r['mess'] = $labels->get_label(array('variable'=>$mess, 'textonly'=>true));\n }\n }\n\n if ($ar['tplentry'] == TZR_RETURN_DATA){\n return $r;\n }\n\n die(json_encode($r));\n }",
"public function tidaklulus_SEMPROP(){\n\t\t$query=\"SELECT COUNT(id_seminar) AS jml_tdk_lulus FROM seminar_proposal WHERE status='tidak_lulus' GROUP BY status\"; //query untuk menghitung jumlah mahasiswa yang tidak lulus semprop\n\t\t$this->eksekusi($query); //mengeksekusi query diatas\n\t\treturn $this->result; //mengembalikan hasil query diatas\n\t}",
"public function ex_points(){\r\n $maps['is_on_sale'] = 1;\r\n $maps['type'] = 0;\r\n $info = D('goods')->where($maps)->select();\r\n // var_dump($info);die;\r\n $mapps['is_forbid'] = 0;\r\n $r = D('store')->where($mapps)->select();\r\n $this->assign('r',$r);\r\n $this->assign('info',$info);\r\n $this->display();\r\n }",
"function _publiRound()\r\n\t{\n\t\t$roundIds = kform::getInput(\"rowsDraws\", array());\n\t\t$status = kform::getInput(\"status\");\n\t\t$publiSchedu = kform::getInput(\"publiSchedu\", false);\r\n\r\n\t\t// Modifie la visibilite d'un round\n\t\trequire_once \"utils/utpubli.php\";\n\t\t$utp = new utpubli();\n\t\tforeach($roundIds as $roundId) $utp->publiRound($roundId, $status, $publiSchedu);\n\t\t$page = new utPage('none');\r\n\t\t$page->close();\r\n\t\texit();\r\n\t}",
"function llamarRegistrosMySQLPlaneServicios() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_mysql(\"Salud\");\n\t\t\t$cons = \"SELECT * FROM Salud.EPS ORDER BY AutoId ASC\";\n\t\t\t$res = mysql_query($cons);\n\t\t\treturn $res; \n\t\t\n\t\t}",
"function crea_ruta_punto($itm,$r){\n\t \n\n global $db,$dbf,$fecha_con_formato,$cp,$cpno, $existe_punto_detalle;\n $cuenta_puntos=0;\n\t$cuenta_puntos_no = 0;\n\t$otra_ban = 0;\n\t$bandera =0;\n \n\t\t\t\t$usuario = \"SELECT COD_OBJECT_MAP FROM SAVL_G_PRIN WHERE ITEM_NUMBER = '\".$itm.\"'\";\n\t\t\t $query_user = $db->sqlQuery($usuario);\n\t\t\t\t$row_user = $db->sqlFetchArray($query_user);\n\t\t\t\t$count_user = $db->sqlEnumRows($query_user);\t \t \n\t\t\t\t\t\t\t \n\t\t\t\t\tif($count_user > 0)\t{\t\t\n\t\t\t\t \n \t\t\t\t\t$punto = \"SELECT COD_OBJECT_MAP FROM SAVL_ROUTES_DETAIL WHERE COD_OBJECT_MAP =\".$row_user['COD_OBJECT_MAP'];\n \t\t\t $query_punto = $db->sqlQuery($punto);\n \t\t\t\t $count_punto = $db->sqlEnumRows($query_punto);\n\t\t\t\t \n \t\t\t\t if($count_punto>0){\n \t\t\t\t\t\t // $existe_punto = $existe_punto +1;\n \t\t\t\t echo \"ya existe el geopunto en routes_detail, se guardara este mismo geopunto con otra ruta...\";\n\t\t\t\t\t\t\t\t\t\t\t$otra_ban = 1;\n \t\t\t\t\t\t }\n\t\t\t\t \n \t\t\t\t //if($count_punto==0){\n \t\t\t\t\t\t\t $data_2 = Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t'ID_ROUTE' => $r,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'COD_OBJECT_MAP' => $row_user['COD_OBJECT_MAP'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t'CREATE_DATE' => $fecha_con_formato\n\t\t\t\t\t\t\t\t\t\t\t\t );\n \t\t\t\tif($dbf-> insertDB($data_2,'SAVL_ROUTES_DETAIL',false) == true){\n \t\t\t\t\t\t\t\t\t $bandera = 1;\n \t\t\t\t\t\t\t\t\t echo 1;\t\t\n }\telse{\n echo 0;\t\n }\t\n \t\t\t // }else{\n \t\t\t\t\t //\t\t$bandera = 0;\n \t\t\t\t\t //}\n\t\t\t\t \n\t\t\t\t }\n\n\t\t\tif($bandera ==1){\n\t\t\t $cp = $cp +1;\n\t\t\t}else{\n\t\t\t $cpno = $cpno +1;\n\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\tif($otra_ban ==1){\n\t\t\t $existe_punto_detalle = $existe_punto_detalle +1;\n\t\t\t} \n \n }",
"public function keliling()\n {\n return 2*($this->panjang + $this->lebar);\n }",
"public function getLowestRecPPEM() {}",
"function get_loop_RSRZ($loop_id)\n {\n $this->db->select('unit_ids')\n ->from('loop_info')\n ->where_in('loop_id',$loop_id);\n $query = $this->db->get();\n if ($query->num_rows() == 0) { return 'Loop id not found'; }\n\n foreach ($query->result() as $row) {\n $total_unit_ids = explode(',', $row->unit_ids);\n }\n\n $this->db->select('unit_id, real_space_r_z_score')\n ->from('unit_quality')\n ->where_in('unit_id',$total_unit_ids);\n $query = $this->db->get();\n \n if ($query->num_rows() == 0) {\n return 'No RSRZ correspondence is found';\n } else {\n $RSRZ = $query->result();\n }\n\n return json_encode($RSRZ);\n\n }",
"function scheckAusdruck()\r\n {\r\n $summeLohn = $this->summeStunden * $this->stundenlohn;\r\n echo \"<p>Scheck:<br>\"\r\n . \"Name: $this->nachname, $this->vorname<br>\"\r\n . \"IBAN: $this->iban, BIC: $this->bic<br>\"\r\n . \"Bank: $this->bank, Betrag: $summeLohn €</p>\";\r\n }",
"function _generate_smt_lalu(){\n\t\t$CI =& get_instance();\n\t\t$r_smt \t= $CI->session->userdata('r_smt');\n\t\t$r_ta \t= $CI->session->userdata('r_ta');\n\t\t$r_tahun = substr($r_ta,0,4);\n\t\t\n\t\tif($r_smt == 'GANJIL'){\n\t\t\t$kd_smt = 2;\n\t\t\t$kd_ta = $r_tahun-1;\n\t\t}\n\t\telse{\n\t\t\t$kd_smt = 1;\n\t\t\t$kd_ta = $r_tahun;\n\t\t}\n\t\treturn array('kd_r_ta'=>$kd_ta, 'kd_r_smt' => $kd_smt);\n\n\t}",
"static function getTPV($PREU , $NOM , $matricula, $idS , $WEB = true)\r\n {\r\n $TPV = array();\r\n \r\n $TPV['Ds_Merchant_Amount'] = $PREU*100;\r\n $TPV['Ds_Merchant_Currency'] = '978';\r\n $TPV['Ds_Merchant_Order'] = date('ymdHis'); \r\n $TPV['Ds_Merchant_MerchantCode'] = OptionsPeer::getString('TPV_Ds_Merchant_MerchantCode',$idS);\r\n $TPV['Ds_Merchant_Terminal'] = '1';\r\n $TPV['Ds_Merchant_TransactionType'] = '0';\r\n if($WEB):\r\n $TPV['Ds_Merchant_MerchantURL'] = OptionsPeer::getString('TPV_WEB_Merchant_MerchantURL',$idS);\r\n $TPV['Ds_Merchant_UrlOK'] = OptionsPeer::getString('TPV_WEB_Ds_Merchant_UrlOK',$idS);\r\n $TPV['Ds_Merchant_UrlKO'] = OptionsPeer::getString('TPV_WEB_Ds_Merchant_UrlKO',$idS);\r\n else:\r\n $TPV['Ds_Merchant_MerchantURL'] = OptionsPeer::getString('TPV_Merchant_MerchantURL',$idS); \r\n $TPV['Ds_Merchant_UrlOK'] = OptionsPeer::getString('TPV_Ds_Merchant_UrlOK',$idS);\r\n $TPV['Ds_Merchant_UrlKO'] = OptionsPeer::getString('TPV_Ds_Merchant_UrlKO',$idS);\r\n endif;\r\n \r\n $TPV['Ds_Merchant_ProductDescription'] = OptionsPeer::getString('TPV_ProductDescription',$idS);\r\n $TPV['Ds_Merchant_Titular'] = $NOM;\r\n $TPV['Ds_Merchant_MerchantName'] = OptionsPeer::getString('TPV_MerchantName',$idS);\r\n $TPV['Ds_Merchant_MerchantData'] = $matricula;\r\n \r\n $message = $TPV['Ds_Merchant_Amount'].\r\n $TPV['Ds_Merchant_Order'].\r\n $TPV['Ds_Merchant_MerchantCode'].\r\n $TPV['Ds_Merchant_Currency'].\r\n OptionsPeer::getString('TPV_PASSWORD',$idS); \r\n \r\n $TPV['Ds_Merchant_MerchantSignature'] = strtoupper(sha1($message));\r\n \r\n return $TPV;\r\n }",
"public function getPraktikum()\n\t{\n\t\t$sql = \"SELECT * FROM praktikum WHERE\nstatus = 1\";\n\t $query = koneksi()->query($sql);\n\t $hasil = [];\n\t while ($data = $query->fecth_assoc())\n\t\t$hasil[] = $data;\n\t }",
"public function getGrafikSarpras()\n {\n $tgl_skrg = Time::now('Asia/Jakarta')->toDateString();\n $id_jad = $this->db->table('jadwal')->select('id_jadwal')->get()->getResultArray();\n $id_kat = $this->db->table('jadwal')->get()->getRowArray();\n\n if ($id_jad == NULL) {\n \n $grafik_sarpras = $this->db->table('hsl_survei')->select('jadwal.id_jadwal, opsi.opsi')\n ->join('pertanyaan','pertanyaan.id_pert=hsl_survei.id_pert', 'left')\n ->join('jadwal','jadwal.id_jadwal=hsl_survei.id_jadwal', 'left')\n ->join('opsi','opsi.id_ops=hsl_survei.opsi')\n ->where('hsl_survei.id_jadwal')\n ->where('pertanyaan.id_unit', 2)->get()->getResultArray();\n\n }elseif (($id_kat['tgl_mulai'] <= $tgl_skrg) && ($id_kat['tgl_akhir'] >= $tgl_skrg)){\n\n $grafik_sarpras = $this->db->table('hsl_survei')->select('jadwal.id_jadwal, opsi.opsi')\n ->join('pertanyaan','pertanyaan.id_pert=hsl_survei.id_pert', 'left')\n ->join('jadwal','jadwal.id_jadwal=hsl_survei.id_jadwal', 'left')\n ->join('opsi','opsi.id_ops=hsl_survei.opsi')\n ->where('jadwal.tgl_mulai <=', $tgl_skrg)->where('jadwal.tgl_akhir >=', $tgl_skrg)\n ->where('pertanyaan.id_unit', 2)\n ->get()->getResultArray();\n }else {\n $row =$this->db->table('jadwal')->limit(1)->orderBy('id_jadwal',\"DESC\")->get()->getRowArray();\n $roow = $row['id_jadwal'];\n\n $grafik_sarpras = $this->db->table('hsl_survei')->select('jadwal.id_jadwal, opsi.opsi')\n ->join('pertanyaan','pertanyaan.id_pert=hsl_survei.id_pert', 'left')\n ->join('jadwal','jadwal.id_jadwal=hsl_survei.id_jadwal', 'left')\n ->join('opsi','opsi.id_ops=hsl_survei.opsi')\n ->where('hsl_survei.id_jadwal', $roow)\n ->where('pertanyaan.id_unit', 2)->get()->getResultArray();\n } \n\n $sangatBaik = 0;\n $baik = 0;\n $tidakBaik = 0;\n $sangatTidakBaik = 0;\n foreach ($grafik_sarpras as $grafik):\n if ($grafik['opsi'] == \"Sangat Baik\") {\n $sangatBaik = $sangatBaik + 1;\n }\n elseif($grafik['opsi'] == \"Baik\"){\n $baik = $baik + 1;\n }\n elseif($grafik['opsi'] == \"Tidak Baik\"){\n $tidakBaik = $tidakBaik + 1;\n }\n elseif($grafik['opsi'] == \"Sangat Tidak Baik\"){\n $sangatTidakBaik = $sangatTidakBaik + 1;\n }\n endforeach;\n\n $data = [$sangatBaik, $baik, $tidakBaik, $sangatTidakBaik];\n return $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}",
"function UPDCAR()\n{\n $aropen_rows = db::fetchRows($sql, 'DTSDATA.AROPEN'); /* #539 */\n if ($aropen\n ) {\n if ($billpay->BPOIN_ < 0\n ) {\n $aropen->AROPPD += $billpay->BPPAY_; /* #544 */\n $aropen->ARONPD += $billpay->BPPAY_; /* #545 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #546 */\n $aropen->update(); /* #547 update record */\n $receipts->CRCID = $aropen->AROCID; /* #549 */\n $receipts->CRPER = $PERIOD; /* #550 */\n $receipts->CRCUST = $aropen->AROCUS; /* #551 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #552 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #553 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #554 */\n $receipts->CRINV_ = $aropen->AROINV; /* #555 */\n $receipts->CRTYPE = '1'; /* #556 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #557 */\n $receipts->CRGLDP = ''; /* #558 */\n $receipts->CRGLAC = ''; /* #559 */\n $receipts->CRDESC = ''; /* #560 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #561 */\n $receipts->CRDUS = 0; /* #562 */\n $receipts->CRSTCM = ''; /* #563 */\n $receipts->CRSTGL = ''; /* #564 */\n $receipts->CRSTS = ''; /* #565 */\n $receipts->CRDST = ''; /* #566 */\n $receipts->insert(); /* #567 insert record */\n } /* #568 end if */\n if ($billpay->BPOIN_ === 0\n && $billpay->BPPAY_ < 0\n && $billpay->BPPRV_ > 0\n ) {\n $billpay->BPPAY_ *= -1; /* #573 */\n $aropen->AROAMT += $billpay->BPPAY_; /* #574 */\n $aropen->ARONAM += $billpay->BPPAY_; /* #575 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #576 */\n $aropen->update(); /* #577 update record */\n $billpay->BPPAY_ *= -1; /* #579 */\n $receipts->CRCID = $aropen->AROCID; /* #580 */\n $receipts->CRPER = $PERIOD; /* #581 */\n $receipts->CRCUST = $aropen->AROCUS; /* #582 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #583 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #584 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #585 */\n $receipts->CRINV_ = $aropen->AROINV; /* #586 */\n $receipts->CRTYPE = '1'; /* #587 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #588 */\n $receipts->CRGLDP = ''; /* #589 */\n $receipts->CRGLAC = ''; /* #590 */\n $receipts->CRDESC = ''; /* #591 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #592 */\n $receipts->CRDUS = 0; /* #593 */\n $receipts->CRSTCM = ''; /* #594 */\n $receipts->CRSTGL = ''; /* #595 */\n $receipts->CRSTS = ''; /* #596 */\n $receipts->CRDST = ''; /* #597 */\n $receipts->insert(); /* #598 insert record */\n } /* #599 end if */\n if ($billpay->BPOIN_ === 0\n && $billpay->BPPAY_ > 0\n && $billpay->BPPRV_ < 0\n ) {\n $billpay->BPPAY_ *= -1; /* #604 */\n $aropen->AROAMT += $billpay->BPPAY_; /* #605 */\n $aropen->ARONAM += $billpay->BPPAY_; /* #606 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #607 */\n $aropen->update(); /* #608 update record */\n $billpay->BPPAY_ *= -1; /* #610 */\n $receipts->CRCID = $aropen->AROCID; /* #611 */\n $receipts->CRPER = $PERIOD; /* #612 */\n $receipts->CRCUST = $aropen->AROCUS; /* #613 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #614 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #615 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #616 */\n $receipts->CRINV_ = $aropen->AROINV; /* #617 */\n $receipts->CRTYPE = '1'; /* #618 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #619 */\n $receipts->CRGLDP = ''; /* #620 */\n $receipts->CRGLAC = ''; /* #621 */\n $receipts->CRDESC = ''; /* #622 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #623 */\n $receipts->CRDUS = 0; /* #624 */\n $receipts->CRSTCM = ''; /* #625 */\n $receipts->CRSTGL = ''; /* #626 */\n $receipts->CRSTS = ''; /* #627 */\n $receipts->CRDST = ''; /* #628 */\n $receipts->insert(); /* #629 insert record */\n } /* #630 end if */\n if ($billpay->BPOIN_ > 0\n ) {\n $aropen->AROPPD += $billpay->BPPAY_; /* #633 */\n $aropen->ARONPD += $billpay->BPPAY_; /* #634 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #635 */\n $aropen->update(); /* #636 update record */\n $receipts->CRCID = $aropen->AROCID; /* #638 */\n $receipts->CRPER = $PERIOD; /* #639 */\n $receipts->CRCUST = $aropen->AROCUS; /* #640 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #641 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #642 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #643 */\n $receipts->CRINV_ = $aropen->AROINV; /* #644 */\n $receipts->CRTYPE = '1'; /* #645 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #646 */\n $receipts->CRGLDP = ''; /* #647 */\n $receipts->CRGLAC = ''; /* #648 */\n $receipts->CRDESC = ''; /* #649 */\n $receipts->CRPPD = $billpay->BPPAY_; /* #650 */\n $receipts->CRDUS = 0; /* #651 */\n $receipts->CRSTCM = ''; /* #652 */\n $receipts->CRSTGL = ''; /* #653 */\n $receipts->CRSTS = ''; /* #654 */\n $receipts->CRDST = ''; /* #655 */\n $receipts->insert(); /* #656 insert record */\n } /* #657 end if */\n } /* #659 end if */\n}",
"function recalculaSLD()\n {\n if ($this->layer->classitem != \"\" && $this->layer->connectiontype == 7 && $this->layer->numclasses > 0) {\n $tipotemp = $this->layer->type;\n $tiporep = $this->layer->getmetadata(\"tipooriginal\");\n $this->layer->set(\"type\", MS_LAYER_POLYGON);\n if ($tiporep == \"linear\") {\n $this->layer->set(\"type\", MS_LAYER_LINE);\n }\n if ($tiporep == \"pontual\") {\n $this->layer->set(\"type\", MS_LAYER_POINT);\n }\n $this->layer->set(\"status\", MS_DEFAULT);\n $this->layer->setmetadata(\"wms_sld_body\", \"\");\n $sld = $this->layer->generateSLD();\n if ($sld != \"\") {\n $this->layer->setmetadata(\"wms_sld_body\", str_replace('\"', \"'\", $sld));\n }\n $this->layer->set(\"type\", $tipotemp);\n }\n }",
"public function getStatusSPP()\n {\n return $this->db->select('tbl_siswa.nis_lokal, tbl_siswa.nama_siswa, tbl_siswa.kelas, tbl_statusbayarspp.*, tbl_kelas.nama_kelas')\n ->order_by('tbl_siswa.nis_lokal','ASC')\n ->from('tbl_siswa')\n ->join('tbl_statusbayarspp','tbl_statusbayarspp.nis_spp = tbl_siswa.nis_lokal','left')\n ->join('tbl_kelas','tbl_kelas.id = tbl_siswa.kelas','left')\n ->get()->result();\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 upsRouteInfo($country_code,$postal_code){\n\t\t\t$select = $this->masterdb->select()\n\t\t\t\t\t ->from(array('UR'=>UPS_ROUTECODES),array('urc_code'))\n\t\t\t\t\t ->where('postal_high >=?', $postal_code)\n\t\t\t\t\t ->where('postal_low <=?', $postal_code)\n\t\t\t\t\t ->where('country_code =?' ,$country_code);\n\t\t\t$result = $this->masterdb->fetchRow($select);\n\t\t\t$urc_code = isset($result['urc_code'])?$result['urc_code']:'';\n\t\t\treturn $urc_code;\n\t}",
"function getKontaktStamm($id,$pfad=\"\") {\n $sql=\"select C.*,E.login from contacts C left join employee E on C.cp_employee=E.id where C.cp_id=$id\";\n $rs=$GLOBALS['dbh']->getAll($sql);\n if(!$rs) {\n $daten=false;\n } else {\n $firma=\"Einzelperson\";\n $tab=\"\";\n $cnr=\"\";\n if (!empty($rs[0][\"cp_cv_id\"])) { // gehört zu einem Kunden oder Lieferanten\n $sql=\"select id,name,department_1,customernumber,language_id from customer where id=\".$rs[0][\"cp_cv_id\"];\n $rs1=$GLOBALS['dbh']->getAll($sql);\n if (empty($rs1[0][\"name\"])) { // nicht zu Kunde sondern zu Lieferant\n $sql=\"select id,name,department_1,vendornumber,language_id from vendor where id=\".$rs[0][\"cp_cv_id\"];\n $rs1=$GLOBALS['dbh']->getAll($sql);\n $tab=\"V\";\n $cnr=$rs1[0][\"vendornumber\"];\n $firma=$rs1[0][\"name\"];\n $language_id=$rs1[0][\"language_id\"];\n } else {\n $tab=\"C\";\n $cnr=$rs1[0][\"customernumber\"];\n $firma=$rs1[0][\"name\"];\n $language_id=$rs1[0][\"language_id\"];\n }\n }\n $daten=$rs[0];\n if ($daten[\"cp_grafik\"]) {\n $image=\"$pfad./dokumente/\".$_SESSION[\"dbname\"].\"/$tab$cnr/$id/kopf$id.\".$daten[\"cp_grafik\"];\n clearstatcache();\n if (file_exists($image)) {\n $size=@getimagesize($image);\n $daten[\"size\"]=$size[3];\n if ($size[1]>$size[0]) {\n $faktor=ceil($size[1]/70);\n } else {\n $faktor=ceil($size[0]/120);\n }\n $breite=floor($size[0]/$faktor);\n $hoehe=floor($size[1]/$faktor);\n $daten[\"icon\"]=\"width=\\\"$breite\\\" height=\\\"$hoehe\\\"\";\n } else {\n $daten[\"icon\"]=\"width=\\\"75\\\" height=\\\"100\\\"\";\n }\n }\n $daten[\"Firma\"] = $firma;\n $daten[\"Department_1\"]=$rs1[0][\"department_1\"];\n $daten[\"tabelle\"] = $tab;\n $daten[\"nummer\"]=$cnr;\n $daten[\"language_id\"]=$language_id;\n }\n return $daten;\n}",
"public function getLdc($s = null){\n\t\t$url = env('SOAP_URL');\n\t\t$user = env('SOAP_USER');\n\t\t$pw = env('SOAP_PW');\n\t\t$output_params = array(\"output_xml;8000\");\n\t\t$lang = env('SOAP_LANG');\n\t\t$entno = env('SOAP_ENTNO');\n\t\t$client = new SoapClient($url, array(\"trace\" => 1, \"exceptions\" => 0, \"cache_wsdl\" => 0));\n\n\t\tif(Input::get('type') === null){\n\t\t\t$type = 'web';\n\t\t}\n\t\telse{\n\t\t\t$type = Input::get('type');\n\t\t}\n\n\t\t$zip = Input::get('zip');\n\t\t$promo = Input::get('promo');\n\t\tSession::put('zip', $zip);\n\n\t\t// if zip code is entered on welcome page the residential or commercial button was used\n\t\tif(Input::get('Residential')){\n\t\t\t$service = \"R\";\n\t\t}\n\t\telse if(Input::get(\"Commercial\")){\n\t\t\t$service = \"C\";\n\t\t}\n\t\t// else the zip is entered from enroll page and service is found with radio button\n\t\telse{\n\t\t\t$service = Input::get('service');\n\t\t\tif($service == 'Commercial'){\n\t\t\t\t$service = 'C';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$service = 'R';\n\t\t\t}\n\t\t} \n\n\t \t$xml_string = \"<string><![CDATA[@input_xml;<ReadiSystem><proc_type>RS_sp_DR_Offers_by_Zip</proc_type><entno>4270</entno><zip>\" . $zip . \"</zip><rev_type>\" . $service . \"</rev_type><utility_type>E</utility_type></ReadiSystem>]]></string>\";\n\n\t \t$xml_obj = simplexml_load_string($xml_string);\n\n\t\t$client->ExecuteSP(array(\"user\" => $user, \"password\" => $pw, \"spName\" => \"RS_sp_EAI_Output\", \"paramList\" => array($xml_obj), \"outputParamList\" => $output_params,\"langCode\" => $lang, \"entity\" => $entno)); \n\n\t\t$response = $client->__getLastResponse(); \n\n\t\t$xml = explode('<RS_sp_DR_Offers_By_Zip>', $response);\n\t\t\n\t\tfor($i = 1; $i < count($xml); $i++){\n\t\t\t$entno = get_string_between($xml[$i], '<entno>', '</entno>');\n\t\t\t$s = get_string_between($xml[$i], '<rev_type>', '</rev_type>');\n\t\t\t$ldc = get_string_between($xml[$i], '<supno>', '</supno>');\n\n\t\t\tif($ldc == 'DELMD'){\n\t\t\t\t$ldc = 'Delmarva';\n\t\t\t}\n\t\t\tif($ldc == 'DUKE_OH'){\n\t\t\t\t$ldc = 'Duke';\n\t\t\t}\n\t\t\tif($ldc == 'PEPCO_MD'){\n\t\t\t\t$ldc = 'PEPCO';\n\t\t\t}\n\t\t\tif($ldc == 'DQE'){\n\t\t\t\t$ldc = 'Duquesne';\n\t\t\t}\n\t\n\t\t\t$ls[] = [$ldc];\n\t\t}\n\n\t\t// change Opsolve R/C naming convention to Residential/Commercial\n\t\tif($service == 'C'){\n\t\t\t$service = 'Commercial';\n\t\t}\n\t\telse{\n\t\t\t$service = 'Residential';\n\t\t}\n\n\t\tif(empty($ls)){\n\t\t\treturn view('no-service')->with('z', $zip)->with('s', $service)->with('p', $promo);\n\t\t}\n\t\n\t\t/*if(is_null($ldcs[0])){\n\t\t\treturn view('no-service')->with('z', $zip)->with('s', $service)->with('p', $promo);\n\t\t}*/\n\n\t\tforeach($ls as $l){\n\t\t\t$ldcs[] = \\App\\Models\\Ldc::where('ldc', $l)->first(); \n\t\t}\n\n\t\t// if there is only 1 LDC for the zip code, then send them straight to the plans\n\t\t$count = count($ldcs);\n\t\tif($count === 1){\n\t\t\treturn redirect()->route('searchPlans', array('type' => $type, 's' => $service, 'l' => $ldcs[0]->ldc, 'promo' => $promo));\n\t\t}\n\n\t\treturn view('ldcs.findex')->with('type', $type)->with('service', $service)->with('ldcs', $ldcs)->with('promo', $promo);\n\t}",
"function mobile_recharge_api($operator_id, $mobile, $amount) {\n\t\t$operator_id = $operator_id;\n\t\t$mobile1 = '0' . $mobile;\n\t\t$amount = $amount;\n\t\t$biller_records = $this -> conn -> get_table_row_byidvalue('operator_list', 'operator_id', $operator_id);\n\n\t\t$operator_name = $biller_records['0']['operator_name'];\n\t\t$operator_code = $biller_records['0']['operator_code'];\n\t\tif ($operator_code == 'MTN' || $operator_code == 'VISAF') \n\t{\n\t\t\t$userid = '08092230991';\n\t\t\t$pass = '01fa320f4048f4fa51a34';\n\t\t\t$url = \"http://mobileairtimeng.com/httpapi/?userid=$userid&pass=$pass&network=5&phone=$mobile1&amt=$amount\";\n\t\t\t$str = file_get_contents($url);\n\n\t\t\t$sdk = explode(\"|\", $str);\n\t\t\t$pos = $sdk[0];\n\t\t\treturn $pos;\n\t\t} \n\t\t/*\n\t\telse if ($operator_code == 'ETST' || $operator_code == 'AIRT' || $operator_code == 'Glo' || $operator_code == 'VISAF') {\n\t\t\n\t\t\t\t\t\n\t\t\n\t\t\t\t\tini_set(\"soap.wsdl_cache_enabled\", \"0\");\n\t\t\t\t\t$a = array(\"trace\" => 1, \"exceptions\" => 1);\n\t\t\t\t\t$wsdl = \"http://202.140.50.116/EstelServices/services/EstelServices?wsdl\";\n\t\t\t\t\t$client = new SoapClient($wsdl, $a);\n\t\t\t\t\t$simpleresult = $client -> getTopup(array(\"agentCode\" => 'TPR_EFF', \"mpin\" => 'ECE473FF47C2E97FF3F1D496271A9EB1', \"destination\" => $mobile1, \"amount\" => $amount, \"productCode\" => $operator_code, \"comments\" => \"topup\", \"agenttransid\" => '1234', \"type\" => 'PC'));\n\t\t\n\t\t\t\t\t$soaoresponce = $client -> __getLastResponse();\n\t\t\n\t\t\t\t\t$xml = simplexml_load_string($soaoresponce, NULL, NULL, \"http://schemas.xmlsoap.org/soap/envelope/\");\n\t\t\t\t\t$ns = $xml -> getNamespaces(true);\n\t\t\t\t\t$soap = $xml -> children($ns['soapenv']);\n\t\t\t\t\t$agentCode = $soap -> Body -> children($ns['topupRequestReturn']) -> children($ns['ns1']) -> agentCode;\n\t\t\t\t\t$productcode = $soap -> Body -> children($ns['topupRequestReturn']) -> children($ns['ns5']) -> productcode;\n\t\t\t\t\t$destination = $soap -> Body -> children($ns['topupRequestReturn']) -> children($ns['ns6']) -> destination;\n\t\t\t\t\t$agenttransid = $soap -> Body -> children($ns['topupRequestReturn']) -> children($ns['ns8']) -> agenttransid;\n\t\t\t\t\t$amount = $soap -> Body -> children($ns['topupRequestReturn']) -> children($ns['ns9']) -> amount;\n\t\t\t\t\t$transid = $soap -> Body -> children($ns['topupRequestReturn']) -> children($ns['ns12']) -> transid;\n\t\t\t\t\t$resultdescription = $soap -> Body -> children($ns['topupRequestReturn']) -> children($ns['ns26']) -> resultdescription;\n\t\t\n\t\t\t\t\tif ($resultdescription[0] == 'Transaction Successful') {\n\t\t\t\t\t\t//echo \"transid=\".$transid[0].'<br>';\n\t\t\t\t\t\t$recharge_status = '1';\n\t\t\t\t\t\t$transaction_id = $transid[0];\n\t\t\t\t\t\t$result = $recharge_status . \",\" . $transid[0];\n\t\t\t\t\t\t//$result=array(\"recharge_status\"=>$recharge_status,'transaction_id'=>$transid[0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$result = \"2\" . \"0\";\n\t\t\t\t\t}\n\t\t\t\t\treturn $result;\n\t\t\t\t}*/\n\t\t\n // corncone api for recharge==================//////////////////==========\n\t\telse if($operator_code == 'AQA' || $operator_code == 'AWA' || $operator_code == 'AQC' || $operator_code == 'ANA'|| $operator_code == 'APA' || $operator_code == 'AEA' || $operator_code == 'ACA' || $operator_code == 'Glo')\n\t\t{\n\t\t\t$phone=$mobile;\n\t\t\t$id=rand('1000','9999');\n\t\t\t$service_id=$operator_code;\n\t\t\t$amt=$amount;\n\t\t\tif($operator_code == 'Glo'|| $operator_code == 'ACA'|| $operator_code == 'AEA')\n\t\t\t{\n\t\t\t\t$arr = array('details' => array('phoneNumber' => $phone, 'amount' => $amt),\n\t\t\t\t\t 'id' => $id,\n\t\t\t\t\t 'paymentCollectorId' => 'CDL',\n\t\t\t\t\t 'paymentMethod' => 'PREPAID',\n\t\t\t\t\t 'serviceId' => $service_id\n\t\t\t\t\t\t);\n\t\t\t\t\n\t\t\t}else\n\t\t\tif($operator_code == 'APA')\n\t\t\t{\n\t\t\t\n\t\t\t\t$arr = array(\n\t\t\t\t\t 'details' => array('accountNumber' => $phone, 'amount' => $amt),\n\t\t\t\t\t 'id' => $id,\n\t\t\t\t\t 'paymentCollectorId' => 'CDL',\n\t\t\t\t\t 'paymentMethod' => 'PREPAID',\n\t\t\t\t\t 'serviceId' => $service_id\n\t\t\t\t\t\t);\n\t\t\t}else \n\t\t\tif($operator_code == 'ANB'|| $operator_code == 'ANA')\n\t\t\t{\n\t\t\t\n\t\t\t\t$arr = array(\n\t\t\t\t\t 'details' => array('customerAccountId' => $phone, 'amount' => $amt),\n\t\t\t\t\t 'id' => $id,\n\t\t\t\t\t 'paymentCollectorId' => 'CDL',\n\t\t\t\t\t 'paymentMethod' => 'PREPAID',\n\t\t\t\t\t 'serviceId' => $service_id\n\t\t\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t\telse \n\t\t\tif($operator_code == 'AQC')\n\t\t\t{\n\t\n\t\n\t\t\t$arr = array(\n\t\t\t\t\t 'details' => array('productsCodes' => [\"GOTVPLS\"],'customerNumber'=>$phone, 'amount' => $amt,'customerName'=>\"John\nSmith\",'invoicePeriod'=>1),\n\t\t\t\t\t 'id' => $id,\n\t\t\t\t\t 'paymentCollectorId' => 'CDL',\n\t\t\t\t\t 'paymentMethod' => 'PREPAID',\n\t\t\t\t\t 'serviceId' => $service_id\n\t\t\t\t\t\t);\n\t\t\t\n\t\t\t}\n\t\t\telse \n\t\t\tif($operator_code == 'AWA')\n\t\t\t{\n\t\t\t$arr = array(\n\t\t\t\t\t 'details' => array('smartCardNumber' => $phone, 'amount' => $amt),\n\t\t\t\t\t 'id' => $id,\n\t\t\t\t\t 'paymentCollectorId' => 'CDL',\n\t\t\t\t\t 'paymentMethod' => 'PREPAID',\n\t\t\t\t\t 'serviceId' => $service_id\n\t\t\t\t\t\t);\n\t\t\t\t\n\t\t\t}else \n\t\t\tif($operator_code == 'AQA')\n\t\t\t{\n\t\t\t\t$arr = array(\n\t\t\t\t\t 'details' => array('productsCodes' => [\"ACSSW4\",\"ASIADDW\",\"HDPVRW\"\n],'customerNumber'=>$phone, 'amount' => $amt,'customerName'=>\"John\nSmith\",'invoicePeriod'=>1),\n\t\t\t\t\t 'id' => $id,\n\t\t\t\t\t 'paymentCollectorId' => 'CDL',\n\t\t\t\t\t 'paymentMethod' => 'PREPAID',\n\t\t\t\t\t 'serviceId' => $service_id\n\t\t\t\t\t\t);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$requestBody = json_encode($arr);\n\t\t\t$hashedRequestBody = base64_encode(hash('sha256', utf8_encode($requestBody), true));\n\t\t\t$date = gmdate('D, d M Y H:i:s T');\n\t\t\t$signedData = \"POST\" . \"\\n\" . $hashedRequestBody . \"\\n\" . $date . \"\\n\" . \"/rest/consumer/v2/exchange\";\n\t\t\t$token = base64_decode('+uwXEA2F3Shkeqnqmt9LcmALGgkEbf2L6MbKdUJcFwow6X8jOU/D36CyYjp5csR5gPTLedvPQDg1jJGmOnTJ2A==');\n\t\t\t$signature = hash_hmac('sha1', $signedData, $token, true);\n\t\t\t$encodedsignature = base64_encode($signature);\n\n\t\t\t$arr = \n\t\t\tarray(\n\t\t\t\t\"accept: application/json, application/*+json\", \n\t\t\t\t\"accept-encoding: gzip,deflate\", \n\t\t\t\t\"authorization: MSP efficiencie:\" . $encodedsignature, \n\t\t\t\t\"cache-control: no-cache\", \n\t\t\t\t\"connection: Keep-Alive\", \n\t\t\t\t\"content-type: application/json\", \n\t\t\t\t\"host: 136.243.252.209\", \n\t\t\t\t\"x-msp-date:\" . $date\n\t\t\t\t);\n\n\t\t\t\t\t$curl = curl_init();\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);\n\t\t\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t\t\tcurl_setopt_array($curl, array(CURLOPT_URL => \"https://136.243.252.209/app/rest/consumer/v2/exchange\", \n\t\t\t\t\tCURLOPT_RETURNTRANSFER => true, \n\t\t\t\t\tCURLOPT_ENCODING => \"\", \n\t\t\t\t\tCURLOPT_MAXREDIRS => 10, \n\t\t\t\t\tCURLOPT_TIMEOUT => 30, \n\t\t\t\t\tCURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, \n\t\t\t\t\tCURLOPT_CUSTOMREQUEST => \"POST\", \n\t\t\t\t\tCURLOPT_POSTFIELDS => $requestBody, \n\t\t\t\t\tCURLOPT_HTTPHEADER => $arr));\n\t\t\t\t\t$response = curl_exec($curl);\n\t\t\t\t\t$err = curl_error($curl);\n\t\t\t\t\tcurl_close($curl);\n\n\t\t\t\t\tif ($err) {\n\t\t\t\t\t\techo \"cURL Error #:\" . $err;\n\t\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t\t$arr=json_decode($response);\n\t\t\t\t\t\t$transaction_id=$arr->details->exchangeReference;\n\t\t\t\t\t\t $responseMessage=$arr->details->responseMessage;\n\t\t\t\t\t\t $status=$arr->details->status;\n\t\t\t\t\t\t $statusCode=$arr->details->statusCode;\n\t\t\t\t\t\t if($status=='ACCEPTED')\n\t\t\t\t\t\t {\n\t\t\t\t\t\t \t$recharge_status='1';\n\t\t\t\t\t\t \t$result = $recharge_status . \",\" . $transaction_id;\n\t\t\t\t\t\t }else{\n\t\t\t\t\t\t \t$result = \"2\" . \"0\";\n\t\t\t\t\t\t }\n\t\t\t\t\t\t return $result;\n\t\t\t\t\t}\n\t\t\t\n\t\t}\n\n\t}",
"function getNaikPangkat($conn,$r_kodeunit,$r_tglmulai,$r_tglselesai){\n\t\t\tglobal $conf;\n\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t$col = mUnit::getData($conn,$r_kodeunit);\n\t\t\t\n\t\t\t$sql = \"select p.nik,\".static::schema.\".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as namalengkap,\n\t\t\t\t\tr.*,substring(right(replicate('0', 4) + cast(r.mkglama as varchar), 4),1,2)+' tahun '+substring(right(replicate('0', 4) + cast(r.mkglama as varchar), 4),3,2)+' bulan' as mklama,\n\t\t\t\t\tsubstring(right(replicate('0', 4) + cast(r.mkg as varchar), 4),1,2)+' tahun '+substring(right(replicate('0', 4) + cast(r.mkg as varchar), 4),3,2)+' bulan' as mkbaru,\n\t\t\t\t\tpl.golongan as pangkatlama, pb.golongan as pangkatbaru,u.namaunit\n\t\t\t\t\tfrom \".self::table('pe_kpb').\" r \n\t\t\t\t\tleft join \".self::table('ms_pegawai').\" p on p.idpegawai=r.idpegawai\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=r.idpangkatlama\n\t\t\t\t\tleft join \".self::table('ms_pangkat').\" pb on pb.idpangkat=r.idpangkat\n\t\t\t\t\twhere u.infoleft >= \".(int)$col['infoleft'].\" and u.inforight <= \".(int)$col['inforight'].\" and r.tglkpb between '$r_tglmulai' and '$r_tglselesai'\";\n\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\n\t\t\t$a_data = array('list' => $rs, 'namaunit' => $col['namaunit']);\n\t\t\t\n\t\t\treturn $a_data;\t\n\t\t}",
"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}",
"public function getUry() {}",
"public function index()\n {\n //\n $sunatruc = new \\Tecactus\\Sunat\\RUC('eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjgyZjlmOTczMjM1ZDUzZDZlZDJhZGE4ZDEyZmNhN2Q2ZDRjZGI5YzlmOWQwZjA2ZjU3YjBkY2JjYzcyYmQ0ZjkwMDM3Y2MzMzdjYjFmOGMw'\n . 'In0.eyJhdWQiOiIxIiwianRpIjoiODJmOWY5NzMyMzVkNTNkNmVkMmFkYThkMTJmY2E3ZDZkNGNkYjljOWY5ZD'\n . 'BmMDZmNTdiMGRjYmNjNzJiZDRmOTAwMzdjYzMzN2NiMWY4YzAiLCJpYXQiOjE0OTQxNjI1MzUsIm5iZiI6MTQ5'\n . 'NDE2MjUzNSwiZXhwIjoxODA5Njk1MzM1LCJzdWIiOiIyNDciLCJzY29wZXMiOlsidXNlLXN1bmF0IiwidXNlLX'\n . 'JlbmllYyJdfQ.N2eRSiJWKj8NfuKpvi6AjLBl5cpxaNyeB2W5qF1AQkYg40ve9v9USZpvfUUoEw1TQ9YEWkl0N'\n . 'DK2Mhg5uoZkW6_D0DR5sPO_Vm1Ai3ffhX51VhDMi41VSyfWgGnBm36qAySj7DaIx_AYv0XDmZkz08406L31G_lb'\n . 'zCpVVLU-0a-63N0R44uJEdhile1cGbsrELdeKF4vlL6NLdqAYiWP0_ieZNbw6MBxVTlhgB-HtlRdVJjk7BoSKi4'\n . 'OEWZuca5iDjbP4cZR6F4IGkFRVFZLRmzwAYigmsX7FfH0ikkgw4cdD8QmDlTP8BQLvcr1cl-v2YrFCDlaOIBr-cd'\n . 'xEotYQXjlzjrjSZdzXYsE3OcVzMaBQBWImQZQBLoH0BBl5zwjHxgV7w6QmEoq2Xk0B5wAVxVO1s812zcXs9EXKJX'\n . 'BhcjVUagio05Jx368ZJgw8VhsBlnIYAInwLAJmwySU9see0pc8_9QK25qqvuftEdrIal9XcQ2HwBmTl2PxBUu5-Uj'\n . 'kXmTHk9A9DUSd3ShTmMzDHrBTny3ttRZWbx189RBHYHUC7trgitvGs-wFeIHaXPKgqUowB97DPmQ6t-VVAOM9XVjgG'\n . '1kdDiW0DjY8s8EyKOeVl-yywgjY8e2U4CryKKw92h-u37fJrY3M2vc1WVzMFrZpo_mwydtM1zmiBcqy9Y');\n// $resul = $sunatruc->getByRuc('10456510626');\n// $resul=$sunatruc->getByRuc('10456510626', true);\n// dd($sunatruc);\n return view('Acopio.taras',['sunat'=>$sunatruc]);\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 getSkus() {\n\techo \"Getting Skus </br>\";\n\t$response = getRequest('/api/sku');\n\tprintInfo($response);\n}",
"public function getPVZWidgetAction()\n {\n $Pvz = new shopSdekintPluginPvzModel();\n $conditions = array();\n $country = $this->getRequest()->request('country', '', waRequest::TYPE_STRING_TRIM);\n if (!empty($country)) {\n $conditions['country_name_sdek'] = $country;\n }\n\n $points = $Pvz->findQuery($conditions);\n\n $arList = array('PVZ' => array(), 'CITY' => array(), 'REGIONS' => array(), 'CITYFULL' => array(), 'COUNTRIES' => array());\n\n foreach ($points as $point) {\n $cityCode = $point['city_code'];\n $type = $point['point_type'];\n $city = $point[\"city\"];\n if (strpos($city, '(') !== false)\n $city = trim(substr($city, 0, strpos($city, '(')));\n if (strpos($city, ',') !== false)\n $city = trim(substr($city, 0, strpos($city, ',')));\n $code = $point[\"code\"];\n\n $arList[$type][$cityCode][$code] = array(\n 'Name' => $point['name'],\n 'WorkTime' => $point['work_time'],\n 'Address' => $point['address'],\n 'Phone' => $point['phone'],\n 'Note' => $point['note'],\n 'cX' => $point['coord_x'],\n 'cY' => $point['coord_y'],\n 'Dressing' => $point['dressing_room'] ? 'есть' : 'нет',\n 'Cash' => $point['have_cashless'] ? 'есть' : 'нет',\n 'Station' => $point['nearest_station'],\n 'Site' => $point['site'],\n 'Metro' => $point['metro'],\n 'AddressComment' => $point['address_comment'],\n );\n\n if (!is_null($point['max_weight']) || !is_null($point['min_weight'])) {\n $arList[$type][$cityCode][$code]['WeightLim'] = array(\n 'MIN' => shopSdekintPluginHelper::toFloat($point['min_weight']),\n 'MAX' => shopSdekintPluginHelper::toFloat($point['max_weight'])\n );\n }\n\n $raw_data = array();\n if (!empty($point['raw_data'])) {\n $raw_data = shopHelper::jsonDecode($point['raw_data'], true);\n }\n\n $arImgs = array();\n foreach ((array)ifset($raw_data, 'office_image', array()) as $img) {\n if (strstr($_tmpUrl = (string)$img[0], 'http') === false) {\n continue;\n }\n $arImgs[] = (string)$img[0];\n }\n\n if (count($arImgs = array_filter($arImgs))) {\n $arList[$type][$cityCode][$code]['Picture'] = $arImgs;\n }\n $ohg = (array)ifempty($raw_data, 'office_how_go', array());\n if (count($ohg)) {\n $arList[$type][$cityCode][$code]['Path'] = $ohg[0];\n }\n\n if (!array_key_exists($cityCode, $arList['CITY'])) {\n $arList['CITY'][$cityCode] = $city;\n $arList['CITYFULL'][$cityCode] = $point['country_name_sdek'] . ' ' . $point['region_name_sdek'] . ' ' . $city;\n $arList['REGIONS'][$cityCode] = implode(', ', array_filter(array($point['region_name_sdek'], $point['country_name_sdek'])));\n }\n }\n\n krsort($arList['PVZ']);\n\n $this->response['pvz'] = $arList;\n\n }",
"function createPWSSOAPClient()\n{\n //Set the parameters for the Non-WSDL mode SOAP communication with your Development/Production credentials\n $client = new SoapClient( \"./wsdl/serviceavailabilityservice.wsdl\", \n array\t(\n 'trace'\t\t\t=>\ttrue,\n 'location'\t=>\t\"https://webservices.purolator.com/PWS/V1/ServiceAvailability/ServiceAvailabilityService.asmx\",\n 'uri'\t\t\t\t=>\t\"http://purolator.com/pws/datatypes/v1\",\n 'login'\t\t\t=>\tPRODUCTION_KEY,\n 'password'\t=>\tPRODUCTION_PASS\n )\n );\n //Define the SOAP Envelope Headers\n $headers[] = new SoapHeader ( 'http://purolator.com/pws/datatypes/v1', \n 'RequestContext', \n array (\n 'Version' => '1.3',\n 'Language' => 'en',\n 'GroupID' => 'xxx',\n 'RequestReference' => 'Rating Example',\n 'UserToken' => USER_TOKEN\n )\n ); \n //Apply the SOAP Header to your client \n $client->__setSoapHeaders($headers);\n\n return $client;\n}",
"public function AggiornaPrezzi(){\n\t}",
"function getDetailRekapPotKehadiran($conn, $r_unit, $r_periode, $sqljenis, $i_pegawai) {\n $last = self::getLastDataPeriodeGaji($conn);\n\n //data gaji\n $sql = \"select pr.idpegawai,sum(potkehadiran) as potkehadiran,sum(pottransport) as pottransport, sum(potkehadiran) + sum(pottransport) as totalpotkehadiran, \n\t\t\t\t\t\" . static::schema . \".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as namalengkap, \n\t\t\t\t\tcase when p.idjstruktural is not null then s.jabatanstruktural else 'Staff' end as jabatanstruktural,j.jenispegawai\n\t\t\t\t\tfrom \" . static::table('pe_presensidet') . \" pr \n\t\t\t\t\tleft join \" . static::table('ms_pegawai') . \" p on p.idpegawai=pr.idpegawai\n\t\t\t\t\tleft join \" . static::table('ms_unit') . \" u on u.idunit=p.idunit\n\t\t\t\t\tleft join \" . static::table('ms_struktural ') . \" s on s.idjstruktural=p.idjstruktural\n\t\t\t\t\tleft join \" . static::table('ms_jenispeg ') . \" j on j.idjenispegawai=p.idjenispegawai\n\t\t\t\t\twhere pr.tglpresensi between '\" . $last['tglawalhit'] . \"' and '\" . $last['tglakhirhit'] . \"' {$sqljenis} and u.parentunit = $r_unit\";\n if (!empty($i_pegawai))\n $sql .= \" and p.idpegawai not in ($i_pegawai)\";\n\n $sql .=\" group by pr.idpegawai, \" . static::schema . \".f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang), p.idjstruktural, jabatanstruktural,p.idjenispegawai,j.jenispegawai\n\t\t\t\t\torder by p.idjenispegawai\";\n\n $rs = $conn->Execute($sql);\n\n $a_data = array();\n while ($row = $rs->FetchRow())\n $a_data[] = $row;\n\n return $a_data;\n }",
"function givePoints() {\n if ($this->is()) {\n // ponizsza funkcja jest dostarczona przez PayBack\n // pb_give_points($this->getPaybackLogin(),$this->calcPoints(),$_SESSION['global_order_id']);\n } else return false;\n }",
"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 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}",
"private function proses_npde_pasca2($a, $unit) {\n\t\textract($a);\n\t\t\n\t\t// cari di rbm, dapatkan idnya lalu masukkan ke rincian\n\t\t$rbm = substr($koduk, 0, 7);\n\t\t$urut = substr($koduk, 7, 5);\n\t\t$urut = intval($urut);\n\t\t\n\t\t$run = $this->db->query(\"SELECT `ID_RBM` FROM `rbm` WHERE `NAMA_RBM` = '$rbm'\", TRUE);\n\t\t\n\t\tif (empty($run->ID_RBM)) {\n\t\t\t$ins = $this->db->query(\"INSERT INTO `rbm` VALUES(0, '0', '$unit', '$rbm','1')\");\n\t\t\t$idrbm = $this->db->get_insert_id();\n\t\t} else $idrbm = $run->ID_RBM;\n\t\t\n\t\t$run = $this->db->query(\"SELECT `ID_RINCIAN_RBM` FROM `rincian_rbm` WHERE `ID_PELANGGAN` = '$idpel' AND `ID_RBM` = '$idrbm'\", TRUE);\n\t\tif (empty($run->ID_RINCIAN_RBM))\n\t\t\t$ins = $this->db->query(\"INSERT INTO `rincian_rbm` VALUES(0, '$idpel', '$idrbm', '$urut')\");\n\t\t\n\t\t$run = $this->db->query(\"SELECT `ID_KODEPROSES`, `DAYA_PELANGGAN`, `FAKTORKWH_PELANGGAN`, `KODUK_PELANGGAN`, `FAKTORKVAR_PELANGGAN` FROM `pelanggan` WHERE `ID_PELANGGAN` = '$idpel'\", TRUE);\n\t\t\t\n\t\t$id_blth = $this->get_id_blth($blth);\n\t\t$id_blth = $id_blth - 1;\n\t\t$klp = trim($klp);\n\t\t$kodeproses = $this->get_id_kodeproses($klp);\n\t\t$tarif = trim($tarif);\n\t\t$daya = floatval($daya);\n\t\t$fm = floatval($fm);\n\t\t$fk = floatval($fkvar);\n\t\t\n\t\t// db escape\n\t\t$nm = $this->db->escape_str($nm);\n\t\t$alm = $this->db->escape_str($alm);\n\t\t$koduk = $this->db->escape_str($koduk);\n\t\t\n\t\tif (empty($run)) {\n\t\t\t$ins = $this->db->query(\"INSERT INTO `pelanggan` VALUES('$idpel', '$kodeproses', '1', '$nm', '$tarif', '$ktarif', '$daya', '$alm', '$koduk', '', '', '$fm', '$fk', '1')\");\n\t\t\t\n\t\t} else {\n\t\t\t$upd = array();\n\t\t\tif ($run->ID_KODEPROSES != $kodeproses) $upd[] = \"`ID_KODEPROSES` = '$kodeproses'\";\n\t\t\tif ($run->DAYA_PELANGGAN != $daya) $upd[] = \"`DAYA_PELANGGAN` = '$daya'\";\n\t\t\tif ($run->KODUK_PELANGGAN != $koduk) $upd[] = \"`KODUK_PELANGGAN` = '$koduk'\";\n\t\t\tif ($run->FAKTORKWH_PELANGGAN != $fm) $upd[] = \"`FAKTORKWH_PELANGGAN` = '$fm'\";\n\t\t\tif ($run->FAKTORKVAR_PELANGGAN != $fk) $upd[] = \"`FAKTORKVAR_PELANGGAN` = '$fk'\";\n\t\t\t$upd[] = \"`STATUS_PELANGGAN` = '1'\";\n\t\t\t$u = $this->db->query(\"UPDATE `pelanggan` SET \" . implode(\", \", $upd) . \" WHERE `ID_PELANGGAN` = '$idpel'\");\n\t\t}\n\t\t\t\n\t\t\t\n\t\t// insert ke bacameter jika bacameter masih kosong\n\t\t//$run = $this->db->query(\"SELECT COUNT(`ID_BACAMETER`) AS `HASIL` FROM `bacameter` WHERE `ID_PELANGGAN` = '$idpel' AND `KIRIM_BACAMETER` = 'N'\", TRUE);\t\n\t\t//$run = $this->db->query(\"SELECT COUNT(`ID_BACAMETER`) AS `HASIL` FROM `bacameter` WHERE `ID_PELANGGAN` = '$idpel' AND `ID_BLTH` = '$id_blth'\", TRUE);\n\n\t\t//if ($run->HASIL == 0) {\t\t\n \t\t\t$lwbp0 = floatval($lwbp0) . '.00';\n\t\t\t$wbp0 = floatval($wbp0) . '.00';\n\t\t\t$kvarh0 = floatval($kvarh0) . $dgtkvarh0;\n \t\t\t$ins = $this->db->query(\"INSERT INTO `bacameter` VALUES(0, '0', '0', '$idpel', '$id_blth', NOW(), '$lwbp0', '$wbp0', '$kvarh0', '', NOW(), '0', 'N',0)\");\n\t\t//}\n\t\t/*else {\n\t\t//backup bacameter ke history\n\t\t\t$ceka = $this->db->query(\"SELECT COUNT(`ID_BACAMETER`) AS `HASIL` FROM `history` WHERE `ID_PELANGGAN` = '$idpel' AND `ID_BLTH` = '$id_blth'\", TRUE);\n\t\t\tif ($ceka->HASIL == 0) {\n\t\t\t$ins = $this->db->query(\"INSERT INTO `history` select * from `bacameter` where `ID_PELANGGAN` = '$idpel' AND `ID_BLTH` = '$id_blth' AND `KIRIM_BACAMETER`!='N'\");\n\t\t\t}\n \t\t\t$ins = $this->db->query(\"update `bacameter` set lwbp_bacameter='$lwbp0', wbp_bacameter='$wbp0' , kvarh_bacameter='$kvarh0', terkirim_bacameter=NOW(), kirim_bacameter='N' where id_pelanggan='$idpel' and id_blth='$id_blth'\");\n\t\t}*/\n\t}",
"function putus_v_ct_phs(){\n $query = $this->db->query(\"SELECT a.perkara_id, a.`nomor_perkara`,\n c.tanggal_sidang,c.dihadiri_oleh ,\n DATE_FORMAT(b.tanggal_putusan,'%d %M %Y') AS tanggal_putusan,\n DATE_FORMAT(DATE_ADD(d.tanggal_pemberitahuan_putusan, INTERVAL 15 DAY),'%d %M %Y') AS expire_phs_ikrar\n FROM perkara AS a \n LEFT JOIN perkara_putusan AS b ON a.`perkara_id`=b.`perkara_id`\n LEFT JOIN perkara_jadwal_sidang AS c ON a.`perkara_id`=c.`perkara_id`\n LEFT JOIN perkara_putusan_pemberitahuan_putusan AS d ON a.`perkara_id`=d.`perkara_id`\n LEFT JOIN perkara_ikrar_talak AS e ON a.`perkara_id`= e.`perkara_id`\n\t\t\t\t\t\t\t\t\tLEFT JOIN perkara_akta_cerai AS f ON a.perkara_id=f.perkara_id\n\t\t\t\t\t\t\t\t\tLEFT JOIN perkara_banding AS g ON a.`perkara_id`=g.`perkara_id`\n WHERE b.`tanggal_putusan` =c.`tanggal_sidang`\n AND DATE_FORMAT(a.tanggal_pendaftaran, '%Y') >2017\n AND g.`tanggal_pendaftaran_banding`IS NULL\n AND e.`tgl_ikrar_talak` IS NULL\n\t\t\t\t\t\t\t\t\tAND f.tgl_akta_cerai IS NULL\n AND c.`dihadiri_oleh`='2'\n AND b.`putusan_verstek`='Y'\n AND a.`jenis_perkara_id`=346\n GROUP BY nomor_perkara DESC\");\n return $query; \n }",
"function getRestAP($dbonly = true) {\n\t\t//automatic resting is triggered once per real life hour\n\t\t//Starts from 250 AP/rl hour\n\t\t$ap_rec = 250;\n\t\t$pos = $this->getPosition();\n\t\t$curTime = new Time($this->mysqli); \n\t\t$local = new LocalMap($this->mysqli, $pos->x, $pos->y);\n\t\t$weather = $curTime->getWeather($pos->x, $pos->y, $dbonly);\n\t\t$bodyObj = new Obj($this->mysqli, $this->bodyId);\n\t\t$blood_per = $bodyObj->getBloodPercentage();\n\t\t\n\t\t//-10 if you don't have a bed\n\t\t$beds = $local->checkBed($pos->lx, $pos->ly);\n\t\tif ($beds == -1) $ap_rec -= 10;\n\t\t//-10 if you don't have shelter\n\t\t$ap_rec -= 10;//No shelter has been implemented yet\n\t\t//-10 if it's raining and you don't have shelter\n\t\tif ($weather[\"rain\"]>0) {\n\t\t\t$ap_rec -= 10;\n\t\t}\n\t\t//-10 if you are cold\n\t\tif ($weather[\"temp\"]<16) {\n\t\t\t$minus = max($weather[\"temp\"]-16,-10);\n\t\t\t$ap_rec += $minus;\n\t\t}\n\t\t//-10 if you are too hot\n\t\tif ($weather[\"temp\"]>36) {\n\t\t\t$plus = min(($weather[\"temp\"]-36)*2,10);\n\t\t\t$ap_rec -= $plus;\n\t\t}\n\t\t//-10 if you're hungry\n\t\t//Hunger isn't implemented yet\n\t\t//-10 if you are wounded\n\t\tif ($blood_per<95) {\n\t\t\t$minus = round(($blood_per-96)/2);\n\t\t\t$ap_rec += $minus;\n\t\t}\n\t\t\n\t\treturn $ap_rec;\n\t}",
"function UPDFAR()\n{\n $PAY_ = $billpay->BPPAY_; /* #293 */\n while ($aropen !== $false\n ) {\n $aropen_rows = db::fetchRows($sql, 'DTSDATA.AROPEN'); /* #296 */\n if ($aropen\n && $PAY_ > 0\n ) {\n $PBAL = 0; /* #299 */\n if ($aropen->AROCIC === 'I'\n || $aropen->AROCIC === 'F'\n ) {\n if ($PAY_ > 0\n && $aropen->AROAMT > 0\n ) {\n $PBAL = $aropen->AROAMT - $aropen->AROPPD; /* #305 */\n if ($PBAL <= $PAY_\n && $PBAL !== 0\n ) {\n $PAY_ -= $PBAL; /* #308 */\n $aropen->AROPPD += $PBAL; /* #309 */\n $aropen->ARONPD += $PBAL; /* #310 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #311 */\n $aropen->update(); /* #312 update record */\n $receipts->CRCID = $aropen->AROCID; /* #314 */\n $receipts->CRPER = $PERIOD; /* #315 */\n $receipts->CRCUST = $aropen->AROCUS; /* #316 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #317 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #318 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #319 */\n $receipts->CRINV_ = $aropen->AROINV; /* #320 */\n $receipts->CRTYPE = '1'; /* #321 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #322 */\n $receipts->CRGLDP = ''; /* #323 */\n $receipts->CRGLAC = ''; /* #324 */\n $receipts->CRDESC = ''; /* #325 */\n $receipts->CRPPD = $PBAL; /* #326 */\n $receipts->CRDUS = 0; /* #327 */\n $receipts->CRSTCM = ''; /* #328 */\n $receipts->CRSTGL = ''; /* #329 */\n $receipts->CRSTS = ''; /* #330 */\n $receipts->CRDST = ''; /* #331 */\n $receipts->insert(); /* #332 insert record */\n } /* #333 end if */\n } /* #334 end if */\n } /* #335 end if */\n if ($aropen->AROCIC === 'I'\n || $aropen->AROCIC === 'F'\n ) {\n $PBAL = 0; /* #339 */\n $PBAL = $aropen->AROAMT - $aropen->AROPPD; /* #340 */\n if ($PBAL > $PAY_\n && $PAY_ > 0\n && $aropen->AROAMT > 0\n ) {\n $aropen->AROPPD += $PAY_; /* #344 */\n $aropen->ARONPD += $PAY_; /* #345 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #346 */\n $aropen->update(); /* #347 update record */\n $receipts->CRCID = $aropen->AROCID; /* #349 */\n $receipts->CRPER = $PERIOD; /* #350 */\n $receipts->CRCUST = $aropen->AROCUS; /* #351 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #352 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #353 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #354 */\n $receipts->CRINV_ = $aropen->AROINV; /* #355 */\n $receipts->CRTYPE = '1'; /* #356 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #357 */\n $receipts->CRGLDP = ''; /* #358 */\n $receipts->CRGLAC = ''; /* #359 */\n $receipts->CRDESC = ''; /* #360 */\n $receipts->CRPPD = $PAY_; /* #361 */\n $receipts->CRDUS = 0; /* #362 */\n $receipts->CRSTCM = ''; /* #363 */\n $receipts->CRSTGL = ''; /* #364 */\n $receipts->CRSTS = ''; /* #365 */\n $receipts->CRDST = ''; /* #366 */\n $PAY_ -= $PBAL; /* #367 */\n $receipts->insert(); /* #368 insert record */\n } /* #369 end if */\n } /* #370 end if */\n if ($aropen->AROCIC === 'C'\n ) {\n $WRKBAL = 0; /* #373 */\n $PBAL = 0; /* #374 */\n $PBAL = $aropen->AROAMT - $aropen->AROPPD; /* #375 */\n if ($PBAL < 0\n ) {\n $WRKBAL = $PBAL * -1; /* #378 */\n $PAY_ += $WRKBAL; /* #379 */\n } /* #380 end if */\n if ($PBAL <= $PAY_\n && $PBAL !== 0\n ) {\n $aropen->AROPPD += $PBAL; /* #384 */\n $aropen->ARONPD += $PBAL; /* #385 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #386 */\n $aropen->update(); /* #387 update record */\n $receipts->CRCID = $aropen->AROCID; /* #389 */\n $receipts->CRPER = $PERIOD; /* #390 */\n $receipts->CRCUST = $aropen->AROCUS; /* #391 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #392 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #393 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #394 */\n $receipts->CRINV_ = $aropen->AROINV; /* #395 */\n $receipts->CRTYPE = '1'; /* #396 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #397 */\n $receipts->CRGLDP = ''; /* #398 */\n $receipts->CRGLAC = ''; /* #399 */\n $receipts->CRDESC = ''; /* #400 */\n $receipts->CRPPD = $PBAL; /* #401 */\n $receipts->CRDUS = 0; /* #402 */\n $receipts->CRSTCM = ''; /* #403 */\n $receipts->CRSTGL = ''; /* #404 */\n $receipts->CRSTS = ''; /* #405 */\n $receipts->CRDST = ''; /* #406 */\n $receipts->insert(); /* #407 insert record */\n } /* #408 end if */\n } /* #409 end if */\n $WRKBAL = 0; /* #412 */\n if ($aropen->AROCIC === 'I'\n || $aropen->AROCIC === 'O'\n ) {\n if ($PAY_ > 0\n && $aropen->AROAMT === 0\n ) {\n $PBAL = 0; /* #417 */\n $PBAL += $aropen->AROPPD; /* #418 */\n $WRKBAL = $PBAL * -1; /* #419 */\n if ($WRKBAL <= $PAY_\n && $PBAL !== 0\n ) {\n $PAY_ -= $PBAL; /* #422 */\n $aropen->AROAMT += $PBAL; /* #423 */\n $aropen->ARONAM += $PBAL; /* #424 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #425 */\n $aropen->update(); /* #426 update record */\n $receipts->CRCID = $aropen->AROCID; /* #428 */\n $receipts->CRPER = $PERIOD; /* #429 */\n $receipts->CRCUST = $aropen->AROCUS; /* #430 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #431 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #432 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #433 */\n $receipts->CRINV_ = $aropen->AROINV; /* #434 */\n $receipts->CRTYPE = '1'; /* #435 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #436 */\n $receipts->CRGLDP = ''; /* #437 */\n $receipts->CRGLAC = ''; /* #438 */\n $receipts->CRDESC = ''; /* #439 */\n $receipts->CRPPD = $PBAL; /* #440 */\n $receipts->CRDUS = 0; /* #441 */\n $receipts->CRSTCM = ''; /* #442 */\n $receipts->CRSTGL = ''; /* #443 */\n $receipts->CRSTS = ''; /* #444 */\n $receipts->CRDST = ''; /* #445 */\n $receipts->insert(); /* #446 insert record */\n } /* #447 end if */\n } /* #448 end if */\n } /* #449 end if */\n if ($aropen->AROCIC === 'I'\n || $aropen->AROCIC === 'O'\n ) {\n $PBAL = 0; /* #454 */\n $PBAL = $aropen->AROAMT - $aropen->AROPPD; /* #455 */\n $PBAL *= -1; /* #456 */\n if ($PBAL > $PAY_\n && $PAY_ > 0\n && $aropen->AROAMT === 0\n ) {\n $aropen->AROAMT -= $PAY_; /* #460 */\n $aropen->ARONAM -= $PAY_; /* #461 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #462 */\n $PAY_ -= $PBAL; /* #463 */\n $aropen->update(); /* #464 update record */\n $receipts->CRCID = $aropen->AROCID; /* #466 */\n $receipts->CRPER = $PERIOD; /* #467 */\n $receipts->CRCUST = $aropen->AROCUS; /* #468 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #469 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #470 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #471 */\n $receipts->CRINV_ = $aropen->AROINV; /* #472 */\n $receipts->CRTYPE = '1'; /* #473 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #474 */\n $receipts->CRGLDP = ''; /* #475 */\n $receipts->CRGLAC = ''; /* #476 */\n $receipts->CRDESC = ''; /* #477 */\n $receipts->CRPPD = -($PAY_); /* #478 */\n $receipts->CRDUS = 0; /* #479 */\n $receipts->CRSTCM = ''; /* #480 */\n $receipts->CRSTGL = ''; /* #481 */\n $receipts->CRSTS = ''; /* #482 */\n $receipts->CRDST = ''; /* #483 */\n $receipts->insert(); /* #484 insert record */\n } /* #485 end if */\n } /* #486 end if */\n if ($aropen->AROCIC === 'C'\n ) {\n $WRKBAL = 0; /* #489 */\n $PBAL = 0; /* #490 */\n $PBAL = $aropen->AROAMT - $aropen->AROPPD; /* #491 */\n if ($PBAL < 0\n ) {\n $WRKBAL = $PBAL * -1; /* #494 */\n $PAY_ += $WRKBAL; /* #495 */\n } /* #496 end if */\n if ($PBAL <= $PAY_\n && $PBAL !== 0\n ) {\n $aropen->AROPPD += $PBAL; /* #500 */\n $aropen->ARONPD += $PBAL; /* #501 */\n $aropen->AROPDT = $billpay->BPPDAT; /* #502 */\n $aropen->update(); /* #503 update record */\n $receipts->CRCID = $aropen->AROCID; /* #505 */\n $receipts->CRPER = $PERIOD; /* #506 */\n $receipts->CRCUST = $aropen->AROCUS; /* #507 */\n $receipts->CRSLMN = $aropen->AROSLM; /* #508 */\n $receipts->CRDTPD = $billpay->BPPDAT; /* #509 */\n $receipts->CRDTIN = $aropen->AROIDT; /* #510 */\n $receipts->CRINV_ = $aropen->AROINV; /* #511 */\n $receipts->CRTYPE = '1'; /* #512 */\n $receipts->CRCHCK = $billpay->BPCONF; /* #513 */\n $receipts->CRGLDP = ''; /* #514 */\n $receipts->CRGLAC = ''; /* #515 */\n $receipts->CRDESC = ''; /* #516 */\n $receipts->CRPPD = $PBAL; /* #517 */\n $receipts->CRDUS = 0; /* #518 */\n $receipts->CRSTCM = ''; /* #519 */\n $receipts->CRSTGL = ''; /* #520 */\n $receipts->CRSTS = ''; /* #521 */\n $receipts->CRDST = ''; /* #522 */\n $receipts->insert(); /* #523 insert record */\n } /* #524 end if */\n } /* #525 end if */\n $customer_rows = db::fetchRows($sql, 'DTSDATA.MFCUST'); /* #527 */\n $customer->CULRDT = $billpay->BPPDAT; /* #528 */\n $customer->CUREC->update(); /* #529 update record */\n EXCPT('', 'DET', '_IN', '');\n } /* #532 end if */\n } /* #533 end while */\n}",
"public function get_proizvod_Test(){\r\n $this->unit->run($this->get_proizvod(0), TRUE, 'Testiranje ucitavanja jednog dela proizvoda');\r\n echo $this->unit->report();\r\n }",
"function cek_dpl(){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('ta');\n\t\t$smt = $this->session->userdata('smt');\n\t\t# cek data beban kerja\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_data_bkd';\n\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $ta, $smt));\n\t\t$data['jml'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t#echo $data['jml']; print_r($parameter); die();\n\t\tif ($data['jml'] == 0){\n\t\t\t$url\t\t= 'http://service.uin-suka.ac.id/servsiasuper/index.php/';\n\t\t\t$parameter\t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen));\n\t\t\t$data\t\t= $this->mdl_bkd->get_api_kkn('kkn_admin/data_dpl_kkn', 'json', 'POST', $parameter);\n\t\t\tif(count($data) > 0){\n\t\t\t\t$tema = $data[0]['TEMA_KKN'];\n\t\t\t\t$angkatan = $data[0]['ANGKATAN'];\n\t\t\t\t$periode = $data[0]['PERIODE'];\n\t\t\t\t$ta = $data[0]['TA'];\n\t\t\t\t$tgl_mulai = $data[0]['TANGGAL_MULAI'];\n\t\t\t\t$tgl_selesai = $data[0]['TANGGAL_SELESAI'];\n\t\t\t\t$kelompok = $data[0]['JUM_KELOMPOK'];\n\t\t\t\t# BEBAN KERJA\n\t\t\t\t$jenis_kegiatan = \"Menjadi Dosen Pembimbing Lapangan (DPL) KKN, Angkatan \".$angkatan.\", Periode \".$periode.\", dengan Tema \\\"\".$tema.\"\\\", Kelompok \".$kelompok;\n\t\t\t\t$masa_penugasan = \"1 Semester\";\n\t\t\t\t$bukti_penugasan = '-'; $bkt_dokumen = '-';\n\t\t\t\t$sks_rule = 1;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia';\n\t\t\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $jenis_kegiatan, $bukti_penugasan, $sks_rule, $masa_penugasan, $sks_rule, $bkt_dokumen, $ta, $smt, 'LANJUTKAN','100'));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif($simpan){\n\t\t\t\t\t# get last id beban kerja \n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t$parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t$getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter); \n\t\t\t\t\t#simpan data pengabdian\n\t\t\t\t\t$sumber_dana = '-'; $jumlah_dana = 0;\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian';\n\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $tgl_mulai, $tgl_selesai, $tema, $sumber_dana, $jumlah_dana, '50'));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}else{\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('bkd/dosen/bebankerja/data/C');\t\t\n\t\t}\n\t}",
"function get_nilai_awal($tanggal_awal, $bulan_sebelum, $tahun, $produk_id){\r\n\t\t$sql_saldo_awal=\r\n\t\t \"SELECT\r\n\t\t\t\t(produk_nilai_saldo_awal + produk_nilai_saldo_awal2 + produk_nilai_saldo_awal3 + produk_nilai_saldo_awal4) as produk_nilai_saldo_awal,\r\n\t\t\t\tproduk_tgl_nilai_saldo_awal\r\n\t\t\tFROM produk, satuan_konversi\r\n\t\t\tWHERE \r\n\t\t\t\tkonversi_produk = produk_id\r\n\t\t\t\tAND\tkonversi_default = true\r\n\t\t\t\tAND\tproduk_id = '\".$produk_id.\"'\r\n\t\t\t\tAND produk_tgl_nilai_saldo_awal = \".$tanggal_awal;\r\n\t\t\t\t\r\n\t\t$rs_saldo_awal\t= $this->db->query($sql_saldo_awal) or die(\"Error - 1.1 : \".$sql_saldo_awal);\r\n\t\t\r\n\t\t//dari hasil query di atas, akan diketahui apakah tanggal_awal >= produk_tgl_nilai_saldo_awal? jika tidak maka return 0\r\n\t\tif($rs_saldo_awal->num_rows()>0){\r\n\t\t\t\t\t\r\n\t\t\t$row_saldo_awal\t= $rs_saldo_awal->row();\t\t\t\r\n\t\t\treturn $row_saldo_awal->produk_nilai_saldo_awal;\r\n\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$sql = \"SELECT\r\n\t\t\t\t\t\t(hpp_nilai_awal + hpp_nilai_masuk - hpp_nilai_keluar) as nilai_awal\r\n\t\t\t\t\tFROM hpp_bulan\r\n\t\t\t\t\tWHERE\r\n\t\t\t\t\t\thpp_bulan = '$bulan_sebelum' AND hpp_tahun = '$tahun'\";\r\n\t\t\t\r\n\t\t\t$rs_sql \t= $this->db->query($sql);\r\n\t\t\t$row_sql\t= $rs_sql->row();\r\n\t\t\t\r\n\t\t\tif($rs_sql->num_rows()>0){\r\n\t\t\t\treturn $row_sql->nilai_awal;\r\n\t\t\t}\r\n\t\t\telse return 0;\r\n\t\t}\r\n\t}",
"public function compute_prorate_cost($rs) {\n // Build up an array of weights to prorate against\n $weights = array();\n $this->prorated_costs = -1;\n $this->prorated_acc_costs = -1;\n $load_cost = $rs[0]['load_cost'];\n $accessorial_cost = $rs[0]['accessorial_cost'];\n if (!empty($load_cost) || !empty($accessorial_cost)) {\n foreach ($rs as $row) {\n $weights[$row['OplPoNum']] = $row['OplTotalWeight'] + $row['OplPalletWeight'];\n }\n\n $prorater = new \\Prorate();\n\n if (!empty($load_cost)) {\n $this->prorated_costs = $prorater->prorateValue($load_cost, $weights, 2);\n }\n\n if (!empty($accessorial_cost)) {\n $this->prorated_acc_costs = $prorater->prorateValue($accessorial_cost, $weights, 2);\n }\n }\n $this->use_costs = ($this->prorated_costs != -1);\n $this->use_acc_costs = ($this->prorated_acc_costs != -1);\n }",
"function ros_get_typergradesuser($sid, $uid, $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 .$atttblname.\".ros_suspicion, \"\n .$gradestblname.\".mistakes, \"\n .$gradestblname.\".timeinseconds, \"\n .$gradestblname.\".hitsperminute, \"\n .$gradestblname.\".fullhits, \"\n .$gradestblname.\".precisionfield, \"\n .$gradestblname.\".pass, \"\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.\" AND \".$gradestblname.\".userid=\".$uid;\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}",
"public function index()\n {\n $user = $this->user->find(auth()->user()->id, ['*'], ['role', 'unitKerja']);\n\n $condition = function ($query) use($user){\n $query->where('tipe', auth()->user()->status);\n \n if ($user->role->role_name == Role::ROLE_PUSKESMAS){\n $query->where('kode_unit_kerja', $user->unitKerja->kode);\n }\n };\n \n /** RBA */\n $rba = $this->rba->get(['*'], $condition, ['rincianSumberDana']);\n\n $totalRba1 = 0;\n $totalRba221 = 0;\n $totalRba31 = 0;\n\n foreach ($rba as $item) {\n if ($item->getOriginal('kode_rba') == Rba::KODE_RBA_1) {\n $totalRba1 = +$item->rincianSumberDana->sum('nominal');\n } else if ($item->getOriginal('kode_rba') == Rba::KODE_RBA_221) {\n $totalRba221 = +$item->rincianSumberDana->sum('nominal');\n } else if ($item->getOriginal('kode_rba') == Rba::KODE_RBA_31) {\n $totalRba31 = +$item->rincianSumberDana->sum('nominal');\n }\n }\n\n $totalRba = ($totalRba1 + $totalRba31) - $totalRba221; \n $data['total_rba'] = $totalRba;\n\n /** RKA */\n $rka = $this->rka->get(['*'], $condition, ['rincianSumberDana']);\n\n $totalRka1 = 0;\n $totalRka21 = 0;\n $totalRka221 = 0;\n\n foreach ($rka as $item) {\n if ($item->getOriginal('kode_rka') == Rka::KODE_RKA_1) {\n $totalRka1 = +$item->rincianSumberDana->sum('nominal');\n } else if ($item->getOriginal('kode_rka') == Rka::KODE_RKA_21) {\n $totalRka21 = +$item->rincianSumberDana->sum('nominal');\n } else if ($item->getOriginal('kode_rka') == Rka::KODE_RKA_221) {\n $totalRka221 = +$item->rincianSumberDana->sum('nominal');\n }\n }\n\n $totalRka = ($totalRka1 + $totalRka21) - $totalRka221;\n $data['total_rka'] = $totalRka;\n\n return view('admin.index', compact('data'));\n }",
"private function papar_keputusan_stress($skor3){\n switch($skor3){\n case in_array($skor3, range(0,7)): $keputusan= 'NORMAL'; break;\n case in_array($skor3, range(8,9)): $keputusan= 'RINGAN'; break;\n case in_array($skor3, range(10,13)): $keputusan= 'SEDERHANA'; break;\n case in_array($skor3, range(14,17)): $keputusan= 'TERUK'; break;\n case ($skor3 >= 18 ): $keputusan= 'SANGAT TERUK'; break;\n }\t\t\n return $keputusan;\t\n }",
"public function payWayPurchase()\n\t{\n\t}",
"public function printPusryciai(){\n return $this->pusryciai;\n echo $pusryciai;\n }",
"function ambil_proyek_dpp()\n\t{\n\t\t$sql=\"SELECT * FROM irena_view_sbsn_proyek_dpp\";\n\t\treturn $this->db->query($sql);\n\t}",
"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}",
"public function riwayat()\n\t{\n\t\t$id_pelanggan = $this->session->userdata('id_pelanggan');\n\t\t$header_transaksi = $this->header_transaksi_model->pelanggan($id_pelanggan);\n\n\t\t$data = array(\t'title'\t\t\t\t=> \t'Riwayat Pemesanan',\n\t\t\t\t\t\t'header_transaksi'\t=>\t$header_transaksi,\n\t\t\t\t\t\t'isi'\t\t\t\t=>\t'dasbor/riwayat'\n\t\t\t\t\t);\n\n\t\t$this->load->view('layout/wrapper', $data, FALSE);\n\t}",
"public function getPlazasRestantes() {\r\n return $this->plazas;\r\n }",
"function bestillingAvBrod($type, $antall, $tidspunkt){\r\n //Kunden får oversikt over alle brøene som er tilgjengelig\r\n\r\n //kunden får oversikt over hvor mange brød man kan bestillinger\r\n\r\n //Kunden velger tidspunkt nå brød skal hentes.\r\n\r\n //Informasjon sendes mot database i tabellen som man trenger.\r\n }",
"function add_payssion_gateway( $methods )\r\n\t{\n\t\treturn array_merge($methods, \n\t\t\t\tarray(\n\t\t\t\t\t\t'WC_Gateway_Payssion', \n\t\t\t\t\t\t'WC_Gateway_Payssion_Alipay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Banamex',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bancochile',\r\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bancodobrasil',\r\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bancomer',\n\t\t\t\t\t\t'WC_Gateway_Payssion_BitCashJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Bitcoin',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Boleto',\n\t\t\t\t\t\t'WC_Gateway_Payssion_CashU',\n\t\t\t\t\t\t'WC_Gateway_Payssion_CreditCardJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Dragonpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Enets',\n\t\t\t\t\t\t'WC_Gateway_Payssion_MercadoPago',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Molpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Neosurf',\n\t\t\t\t\t\t'WC_Gateway_Payssion_NetCashJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Nganluong',\n\t\t\t\t\t\t'WC_Gateway_Payssion_OneCard',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Openbucks',\n\t\t\t\t\t\t'WC_Gateway_Payssion_OXXO',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Paysafecard',\n\t\t\t\t\t\t'WC_Gateway_Payssion_POLi',\n\t\t\t\t\t\t'WC_Gateway_Payssion_QIWI',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Redcompra',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Santander',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Santandermx',\n\t\t\t\t\t\t'WC_Gateway_Payssion_SOFORT',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Tenpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Trustpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Unionpay',\n\t\t\t\t\t\t'WC_Gateway_Payssion_WebMoney',\n\t\t\t\t\t\t'WC_Gateway_Payssion_WebMoneyJP',\n\t\t\t\t\t\t'WC_Gateway_Payssion_Yamoney'));\r\n\t}",
"public function getUnCompteRendu($id){\n\t\t$req = \"select * from praticien P,rapport_visite R, visiteur V where R.RAP_NUM='$id' and P.PRA_NUM=R.PRA_NUM and r.vis_matricule = v.vis_matricule\";\n\t\t$rs = PdoGsb::$monPdo->query($req);\n\t\t$ligne = $rs->fetch();\n\t\treturn $ligne;\n\t}",
"function get_statistiekPerWeek($naam) {\n $naam = urldecode($naam);\n $result = $this->db->query(\"SELECT * FROM islp.view_openstaande_dossiersPerWeek WHERE lower(opsteller) = \\\"\" . strtolower($naam) . \"\\\"\");\n if (!$result) {\n $this->error(\"Check query in get_statistiekPerWeek in klasse functioneelBeheer_model\");\n }\n while ($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n }",
"function calculate($shipping) {\n\t\t\t// Packages - make sure they don't exceed maximum\n\t\t\t$packages = $shipping->packages;\n\t\t\tif($this->package_max) $packages = $shipping->packages_max($packages,$this->package_max);\n\t\t\t\n\t\t\t// Missing credentials\n\t\t\tif(!$this->username) {\n\t\t\t\tthrow new \\Exception(\"USPS username is missing.\");\t\n\t\t\t}\n\t\t\t// Missing shipping object\n\t\t\tif(!$shipping) {\n\t\t\t\tthrow new \\Exception(\"No 'shipping' object passed.\");\n\t\t\t}\n\t\t\t// No methods\n\t\t\tif(!$this->methods) {\n\t\t\t\tthrow new \\Exception(\"No shipping methods defined.\");\n\t\t\t}\n\t\t\t\n\t\t\t// Rates\n\t\t\t$rates = NULL;\n\t\t\t\t\n\t\t\t// Strip - characters they add in to their 'codes' that we don't want\n\t\t\t$strip = array(\n\t\t\t\t'&lt;sup&gt;&amp;reg;&lt;/sup&gt;',\n\t\t\t\t'&lt;sup&gt;&amp;trade;&lt;/sup&gt;',\n\t\t\t\t'&lt;sup&gt;&#174;&lt;/sup&gt;',\n\t\t\t\t'&lt;sup&gt;&#8482;&lt;/sup&gt;',\n\t\t\t\t' 1-Day',\n\t\t\t\t' 2-Day',\n\t\t\t\t' 3-Day',\n\t\t\t\t' Military',\n\t\t\t\t' DPO',\n\t\t\t\t'*',\n\t\t\t\t' ',\n\t\t\t\t' ',\n\t\t\t\t' ',\n\t\t\t);\n\t\t\t\n\t\t\t// Countries - United States - US territories that have their own country code\n\t\t\t$countries_us = array(\n\t\t\t\t'AS', // Samoa American\n\t\t\t\t'GU', // Guam\n\t\t\t\t'MP', // Northern Mariana Islands\n\t\t\t\t'PW', // Palau\n\t\t\t\t'PR', // Puerto Rico\n\t\t\t\t'VI' // Virgin Islands US\n\t\t\t);\n\t\t\t\n\t\t\t// United States (and US territories)\n\t\t\tif($shipping->to_country == \"US\" or in_array($shipping->to_country,$countries_us)) {\n\t\t\t\t$url = \"http://production.shippingapis.com/ShippingAPI.dll\";\n\t\t\t\t$xml = '\n\t<RateV4Request USERID=\"'.$this->username.'\">';\n\t\t\t\tforeach($packages as $x => $package) {\n\t\t\t\t\t// Weight (in lbs) - already in lbs, but just in case\n\t\t\t\t\t$weight = $shipping->convert_weight($package['weight'],$package['weight_unit'],'lb');\n\t\t\t\t\t// Split into lbs and ozs\n\t\t\t\t\t$lbs = floor($weight);\n\t\t\t\t\t$ozs = ($weight - $lbs) * 16;\n\t\t\t\t\tif($lbs == 0 and $ozs < 1) $ozs = 1;\n\t\t\t\t\t\n\t\t\t\t\t// Dimensions - have to re-convert here because requires a minimum of 1\n\t\t\t\t\t$width = $shipping->convert_dimensions($package['dimensions_width'],$package['dimensions_unit'],\"in\",1);\n\t\t\t\t\t$length = $shipping->convert_dimensions($package['dimensions_length'],$package['dimensions_unit'],\"in\",1);\n\t\t\t\t\t$height = $shipping->convert_dimensions($package['dimensions_height'],$package['dimensions_unit'],\"in\",1);\n\t\t\t\t\t// Package size\n\t\t\t\t\t$size = 'REGULAR';\n\t\t\t\t\tif($width > 12 or $length > 12 or $height > 12) $size = \"LARGE\";\n\t\t\t\t\t// Package container\n\t\t\t\t\tif($size == \"LARGE\") $container = 'RECTANGULAR';\n\t\t\t\t\t\n\t\t\t\t\t// XML\n\t\t\t\t\t$xml .= '\n\t\t<Package ID=\"'.($x + 1).'\">\n\t\t\t<Service>'.(/*count($this->methods) == 1 ? reset($this->methods) : */\"ALL\").'</Service>\n\t\t\t<ZipOrigination>'.$shipping->from_zip.'</ZipOrigination>\n\t\t\t<ZipDestination>'.$shipping->to_zip.'</ZipDestination>\n\t\t\t<Pounds>'.$lbs.'</Pounds>\n\t\t\t<Ounces>'.$ozs.'</Ounces>\n\t\t\t<Container>'.(isset($container) ? $container : '').'</Container>\n\t\t\t<Size>'.$size.'</Size>\n\t\t\t<Width>'.$width.'</Width> \n\t\t\t<Length>'.$length.'</Length> \n\t\t\t<Height>'.$height.'</Height> \n\t\t\t<Machinable>TRUE</Machinable>\n\t\t</Package>';\n\t\t\t\t}\n\t\t\t\t$xml .= '\n\t</RateV4Request>';\n\t\t\t\t$data = \"API=RateV4&XML=\".$xml;\n\t\t\t\n\t\t\t\t// Curl\n\t\t\t\t$results = $shipping->curl($url,$data);\n\t\t\t\t\n\t\t\t\t// Debug\n\t\t\t\tif($shipping->debug) {\n\t\t\t\t\tprint \"xml: <xmp>\".$xml.\"</xmp><br />\";\n\t\t\t\t\tprint \"results: <xmp>\".$results.\"</xmp><br />\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Match rate(s)\n\t\t\t\tpreg_match_all('/<Package ID=\"([0-9]{1,3})\">(.+?)<\\/Package>/s',$results,$results_packages);\n\t\t\t\tforeach($results_packages[2] as $x => $results_package) {\n\t\t\t\t\tpreg_match_all('/<Postage CLASSID=\"([0-9]{1,3})\">(.+?)<\\/Postage>/s',$results_package,$results_methods);\n\t\t\t\t\tforeach($results_methods[2] as $y => $results_method) {\n\t\t\t\t\t\t// Name\n\t\t\t\t\t\tpreg_match('/<MailService>(.+?)<\\/MailService>/',$results_method,$name);\n\t\t\t\t\t\t$name = str_replace($strip,'',$name[1]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Use name, get rate\n\t\t\t\t\t\tif($name and in_array($name,$this->methods)) {\n\t\t\t\t\t\t\tpreg_match('/<Rate>(.+?)<\\/Rate>/',$results_method,$rate);\n\t\t\t\t\t\t\tif($rate[1]) {\n\t\t\t\t\t\t\t\tif($this->package_fits($shipping,$packages,$name)) {\n\t\t\t\t\t\t\t\t\tif(!isset($rates['rates'][$name])) $rates['rates'][$name] = 0;\n\t\t\t\t\t\t\t\t\t$rates['rates'][$name] += $rate[1];\n\t\t\t\t\t\t\t\t\t$rates['packages'][$x]['package'] = $packages[$x];\n\t\t\t\t\t\t\t\t\tif(!isset($rates['packages'][$x]['rates'][$name])) $rates['packages'][$x]['rates'][$name] = 0;\n\t\t\t\t\t\t\t\t\t$rates['packages'][$x]['rates'][$name] += $rate[1];\n\t\t\t\t\t\t\t\t\tif(!isset($rates['names'][$name])) $rates['names'][$name] = $this->name($name);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// International\n\t\t\telse {\n\t\t\t\t// Counties - need to pass country name, not code\n\t\t\t\t $countries = array(\n\t\t\t\t\t'AF' => 'Afghanistan',\n\t\t\t\t\t'AL' => 'Albania',\n\t\t\t\t\t'AX' => 'Aland Island (Finland)',\n\t\t\t\t\t'DZ' => 'Algeria',\n\t\t\t\t\t'AD' => 'Andorra',\n\t\t\t\t\t'AO' => 'Angola',\n\t\t\t\t\t'AI' => 'Anguilla',\n\t\t\t\t\t'AG' => 'Antigua and Barbuda',\n\t\t\t\t\t'AR' => 'Argentina',\n\t\t\t\t\t'AM' => 'Armenia',\n\t\t\t\t\t'AW' => 'Aruba',\n\t\t\t\t\t'AU' => 'Australia',\n\t\t\t\t\t'AT' => 'Austria',\n\t\t\t\t\t'AZ' => 'Azerbaijan',\n\t\t\t\t\t'BS' => 'Bahamas',\n\t\t\t\t\t'BH' => 'Bahrain',\n\t\t\t\t\t'BD' => 'Bangladesh',\n\t\t\t\t\t'BB' => 'Barbados',\n\t\t\t\t\t'BY' => 'Belarus',\n\t\t\t\t\t'BE' => 'Belgium',\n\t\t\t\t\t'BZ' => 'Belize',\n\t\t\t\t\t'BJ' => 'Benin',\n\t\t\t\t\t'BM' => 'Bermuda',\n\t\t\t\t\t'BT' => 'Bhutan',\n\t\t\t\t\t'BO' => 'Bolivia',\n\t\t\t\t\t'BA' => 'Bosnia-Herzegovina',\n\t\t\t\t\t'BW' => 'Botswana',\n\t\t\t\t\t'BR' => 'Brazil',\n\t\t\t\t\t'VG' => 'British Virgin Islands',\n\t\t\t\t\t'BN' => 'Brunei Darussalam',\n\t\t\t\t\t'BG' => 'Bulgaria',\n\t\t\t\t\t'BF' => 'Burkina Faso',\n\t\t\t\t\t'MM' => 'Burma',\n\t\t\t\t\t'BI' => 'Burundi',\n\t\t\t\t\t'KH' => 'Cambodia',\n\t\t\t\t\t'CM' => 'Cameroon',\n\t\t\t\t\t'CA' => 'Canada',\n\t\t\t\t\t'CV' => 'Cape Verde',\n\t\t\t\t\t'KY' => 'Cayman Islands',\n\t\t\t\t\t'CF' => 'Central African Republic',\n\t\t\t\t\t'TD' => 'Chad',\n\t\t\t\t\t'CL' => 'Chile',\n\t\t\t\t\t'CN' => 'China',\n\t\t\t\t\t'CX' => 'Christmas Island (Australia)',\n\t\t\t\t\t'CC' => 'Cocos Island (Australia)',\n\t\t\t\t\t'CO' => 'Colombia',\n\t\t\t\t\t'KM' => 'Comoros',\n\t\t\t\t\t'CG' => 'Congo, Republic of the',\n\t\t\t\t\t'CD' => 'Congo, Democratic Republic of the',\n\t\t\t\t\t'CK' => 'Cook Islands (New Zealand)',\n\t\t\t\t\t'CR' => 'Costa Rica',\n\t\t\t\t\t'CI' => 'Cote d Ivoire (Ivory Coast)',\n\t\t\t\t\t'HR' => 'Croatia',\n\t\t\t\t\t'CU' => 'Cuba',\n\t\t\t\t\t'CY' => 'Cyprus',\n\t\t\t\t\t'CZ' => 'Czech Republic',\n\t\t\t\t\t'DK' => 'Denmark',\n\t\t\t\t\t'DJ' => 'Djibouti',\n\t\t\t\t\t'DM' => 'Dominica',\n\t\t\t\t\t'DO' => 'Dominican Republic',\n\t\t\t\t\t'EC' => 'Ecuador',\n\t\t\t\t\t'EG' => 'Egypt',\n\t\t\t\t\t'SV' => 'El Salvador',\n\t\t\t\t\t'GQ' => 'Equatorial Guinea',\n\t\t\t\t\t'ER' => 'Eritrea',\n\t\t\t\t\t'EE' => 'Estonia',\n\t\t\t\t\t'ET' => 'Ethiopia',\n\t\t\t\t\t'FK' => 'Falkland Islands',\n\t\t\t\t\t'FO' => 'Faroe Islands',\n\t\t\t\t\t'FJ' => 'Fiji',\n\t\t\t\t\t'FI' => 'Finland',\n\t\t\t\t\t'FR' => 'France',\n\t\t\t\t\t'GF' => 'French Guiana',\n\t\t\t\t\t'PF' => 'French Polynesia',\n\t\t\t\t\t'GA' => 'Gabon',\n\t\t\t\t\t'GM' => 'Gambia',\n\t\t\t\t\t'GE' => 'Georgia, Republic of',\n\t\t\t\t\t'DE' => 'Germany',\n\t\t\t\t\t'GH' => 'Ghana',\n\t\t\t\t\t'GI' => 'Gibraltar',\n\t\t\t\t\t'GB' => 'Great Britain and Northern Ireland',\n\t\t\t\t\t'GR' => 'Greece',\n\t\t\t\t\t'GL' => 'Greenland',\n\t\t\t\t\t'GD' => 'Grenada',\n\t\t\t\t\t'GP' => 'Guadeloupe',\n\t\t\t\t\t'GT' => 'Guatemala',\n\t\t\t\t\t'GN' => 'Guinea',\n\t\t\t\t\t'GW' => 'Guinea-Bissau',\n\t\t\t\t\t'GY' => 'Guyana',\n\t\t\t\t\t'HT' => 'Haiti',\n\t\t\t\t\t'HN' => 'Honduras',\n\t\t\t\t\t'HK' => 'Hong Kong',\n\t\t\t\t\t'HU' => 'Hungary',\n\t\t\t\t\t'IS' => 'Iceland',\n\t\t\t\t\t'IN' => 'India',\n\t\t\t\t\t'ID' => 'Indonesia',\n\t\t\t\t\t'IR' => 'Iran',\n\t\t\t\t\t'IQ' => 'Iraq',\n\t\t\t\t\t'IE' => 'Ireland',\n\t\t\t\t\t'IL' => 'Israel',\n\t\t\t\t\t'IT' => 'Italy',\n\t\t\t\t\t'JM' => 'Jamaica',\n\t\t\t\t\t'JP' => 'Japan',\n\t\t\t\t\t'JO' => 'Jordan',\n\t\t\t\t\t'KZ' => 'Kazakhstan',\n\t\t\t\t\t'KE' => 'Kenya',\n\t\t\t\t\t'KI' => 'Kiribati',\n\t\t\t\t\t'KW' => 'Kuwait',\n\t\t\t\t\t'KG' => 'Kyrgyzstan',\n\t\t\t\t\t'LA' => 'Laos',\n\t\t\t\t\t'LV' => 'Latvia',\n\t\t\t\t\t'LB' => 'Lebanon',\n\t\t\t\t\t'LS' => 'Lesotho',\n\t\t\t\t\t'LR' => 'Liberia',\n\t\t\t\t\t'LY' => 'Libya',\n\t\t\t\t\t'LI' => 'Liechtenstein',\n\t\t\t\t\t'LT' => 'Lithuania',\n\t\t\t\t\t'LU' => 'Luxembourg',\n\t\t\t\t\t'MO' => 'Macao',\n\t\t\t\t\t'MK' => 'Macedonia, Republic of',\n\t\t\t\t\t'MG' => 'Madagascar',\n\t\t\t\t\t'MW' => 'Malawi',\n\t\t\t\t\t'MY' => 'Malaysia',\n\t\t\t\t\t'MV' => 'Maldives',\n\t\t\t\t\t'ML' => 'Mali',\n\t\t\t\t\t'MT' => 'Malta',\n\t\t\t\t\t'MQ' => 'Martinique',\n\t\t\t\t\t'MR' => 'Mauritania',\n\t\t\t\t\t'MU' => 'Mauritius',\n\t\t\t\t\t'YT' => 'Mayotte (France)',\n\t\t\t\t\t'MX' => 'Mexico',\n\t\t\t\t\t'FM' => 'Micronesia, Federated States of',\n\t\t\t\t\t'MD' => 'Moldova',\n\t\t\t\t\t'MC' => 'Monaco (France)',\n\t\t\t\t\t'MN' => 'Mongolia',\n\t\t\t\t\t'MS' => 'Montserrat',\n\t\t\t\t\t'MA' => 'Morocco',\n\t\t\t\t\t'MZ' => 'Mozambique',\n\t\t\t\t\t'NA' => 'Namibia',\n\t\t\t\t\t'NR' => 'Nauru',\n\t\t\t\t\t'NP' => 'Nepal',\n\t\t\t\t\t'NL' => 'Netherlands',\n\t\t\t\t\t'AN' => 'Netherlands Antilles',\n\t\t\t\t\t'NC' => 'New Caledonia',\n\t\t\t\t\t'NZ' => 'New Zealand',\n\t\t\t\t\t'NI' => 'Nicaragua',\n\t\t\t\t\t'NE' => 'Niger',\n\t\t\t\t\t'NG' => 'Nigeria',\n\t\t\t\t\t'KP' => 'North Korea (Korea, Democratic People\\'s Republic of)',\n\t\t\t\t\t'NO' => 'Norway',\n\t\t\t\t\t'OM' => 'Oman',\n\t\t\t\t\t'PK' => 'Pakistan',\n\t\t\t\t\t'PA' => 'Panama',\n\t\t\t\t\t'PG' => 'Papua New Guinea',\n\t\t\t\t\t'PY' => 'Paraguay',\n\t\t\t\t\t'PE' => 'Peru',\n\t\t\t\t\t'PH' => 'Philippines',\n\t\t\t\t\t'PN' => 'Pitcairn Island',\n\t\t\t\t\t'PL' => 'Poland',\n\t\t\t\t\t'PT' => 'Portugal',\n\t\t\t\t\t'QA' => 'Qatar',\n\t\t\t\t\t'RE' => 'Reunion',\n\t\t\t\t\t'RO' => 'Romania',\n\t\t\t\t\t'RU' => 'Russia',\n\t\t\t\t\t'RW' => 'Rwanda',\n\t\t\t\t\t'SH' => 'Saint Helena',\n\t\t\t\t\t'KN' => 'Saint Kitts (St. Christopher and Nevis)',\n\t\t\t\t\t'LC' => 'Saint Lucia',\n\t\t\t\t\t'PM' => 'Saint Pierre and Miquelon',\n\t\t\t\t\t'VC' => 'Saint Vincent and the Grenadines',\n\t\t\t\t\t'SM' => 'San Marino',\n\t\t\t\t\t'ST' => 'Sao Tome and Principe',\n\t\t\t\t\t'SA' => 'Saudi Arabia',\n\t\t\t\t\t'SN' => 'Senegal',\n\t\t\t\t\t'RS' => 'Serbia',\n\t\t\t\t\t'SC' => 'Seychelles',\n\t\t\t\t\t'SL' => 'Sierra Leone',\n\t\t\t\t\t'SG' => 'Singapore',\n\t\t\t\t\t'SK' => 'Slovak Republic',\n\t\t\t\t\t'SI' => 'Slovenia',\n\t\t\t\t\t'SB' => 'Solomon Islands',\n\t\t\t\t\t'SO' => 'Somalia',\n\t\t\t\t\t'ZA' => 'South Africa',\n\t\t\t\t\t'GS' => 'South Georgia (Falkland Islands)',\n\t\t\t\t\t'KR' => 'South Korea (Korea, Republic of)',\n\t\t\t\t\t'ES' => 'Spain',\n\t\t\t\t\t'LK' => 'Sri Lanka',\n\t\t\t\t\t'SD' => 'Sudan',\n\t\t\t\t\t'SR' => 'Suriname',\n\t\t\t\t\t'SZ' => 'Swaziland',\n\t\t\t\t\t'SE' => 'Sweden',\n\t\t\t\t\t'CH' => 'Switzerland',\n\t\t\t\t\t'SY' => 'Syrian Arab Republic',\n\t\t\t\t\t'TW' => 'Taiwan',\n\t\t\t\t\t'TJ' => 'Tajikistan',\n\t\t\t\t\t'TZ' => 'Tanzania',\n\t\t\t\t\t'TH' => 'Thailand',\n\t\t\t\t\t'TL' => 'East Timor (Indonesia)',\n\t\t\t\t\t'TG' => 'Togo',\n\t\t\t\t\t'TK' => 'Tokelau (Union) Group (Western Samoa)',\n\t\t\t\t\t'TO' => 'Tonga',\n\t\t\t\t\t'TT' => 'Trinidad and Tobago',\n\t\t\t\t\t'TN' => 'Tunisia',\n\t\t\t\t\t'TR' => 'Turkey',\n\t\t\t\t\t'TM' => 'Turkmenistan',\n\t\t\t\t\t'TC' => 'Turks and Caicos Islands',\n\t\t\t\t\t'TV' => 'Tuvalu',\n\t\t\t\t\t'UG' => 'Uganda',\n\t\t\t\t\t'UA' => 'Ukraine',\n\t\t\t\t\t'AE' => 'United Arab Emirates',\n\t\t\t\t\t'UY' => 'Uruguay',\n\t\t\t\t\t'UZ' => 'Uzbekistan',\n\t\t\t\t\t'VU' => 'Vanuatu',\n\t\t\t\t\t'VA' => 'Vatican City',\n\t\t\t\t\t'VE' => 'Venezuela',\n\t\t\t\t\t'VN' => 'Vietnam',\n\t\t\t\t\t'WF' => 'Wallis and Futuna Islands',\n\t\t\t\t\t'WS' => 'Western Samoa',\n\t\t\t\t\t'YE' => 'Yemen',\n\t\t\t\t\t'ZM' => 'Zambia',\n\t\t\t\t\t'ZW' => 'Zimbabwe'\n\t\t\t\t);\n\t\t\t\t \n\t\t\t\t$url = \"http://production.shippingapis.com/ShippingAPI.dll\";\n\t\t\t\t$xml = '\n\t<IntlRateV2Request USERID=\"'.$this->username.'\">';\n\t\t\t\tforeach($packages as $x => $package) {\n\t\t\t\t\t// Weight (in lbs) - already in lbs, but just in case\n\t\t\t\t\t$weight = $shipping->convert_weight($package['weight'],$package['weight_unit'],'lb');\n\t\t\t\t\t// Split into lbs and ozs\n\t\t\t\t\t$lbs = floor($weight);\n\t\t\t\t\t$ozs = ($weight - $lbs) * 16;\n\t\t\t\t\tif($lbs == 0 and $ozs < 1) $ozs = 1;\n\t\t\t\t\t\n\t\t\t\t\t// XML\n\t\t\t\t\t$xml .= '\n\t\t<Package ID=\"'.($x + 1).'\">\n\t\t\t<Pounds>'.$lbs.'</Pounds>\n\t\t\t<Ounces>'.$ozs.'</Ounces>\n\t\t\t<Machinable>TRUE</Machinable>\n\t\t\t<MailType>Package</MailType>\n\t\t\t<GXG>\n\t\t\t\t<POBoxFlag>N</POBoxFlag>\n\t\t\t\t<GiftFlag>N</GiftFlag>\n\t\t\t</GXG>\n\t\t\t<ValueOfContents>0.00</ValueOfContents>\n\t\t\t<Country>'.$countries[$shipping->to_country].'</Country>\n\t\t\t<Container>RECTANGULAR</Container>\n\t\t\t<Size>REGULAR</Size>';\n\t\t\t\t\t// Dimensions - have to re-convert here because requires a minimum of 1\n\t\t\t\t\t$xml .= '\n\t\t\t<Width>'.$shipping->convert_dimensions($package['dimensions_width'],$package['dimensions_unit'],\"in\",1).'</Width> \n\t\t\t<Length>'.$shipping->convert_dimensions($package['dimensions_length'],$package['dimensions_unit'],\"in\",1).'</Length> \n\t\t\t<Height>'.$shipping->convert_dimensions($package['dimensions_height'],$package['dimensions_unit'],\"in\",1).'</Height> \n\t\t\t<Girth>10</Girth> \n\t\t</Package>';\n\t\t\t\t}\n\t\t\t\t$xml .= '\n\t</IntlRateV2Request>';\n\t\t\t\t$data = \"API=IntlRateV2&XML=\".$xml;\n\t\t\t\n\t\t\t\t// Curl\n\t\t\t\t$results = $shipping->curl($url,$data);\n\t\t\t\t\n\t\t\t\t// Debug\n\t\t\t\tif($shipping->debug) {\n\t\t\t\t\tprint \"xml: <xmp>\".$xml.\"</xmp><br />\";\n\t\t\t\t\tprint \"results: <xmp>\".$results.\"</xmp><br />\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Rate(s)\n\t\t\t\tpreg_match_all('/<Package ID=\"([0-9]{1,3})\">(.+?)<\\/Package>/s',$results,$results_packages);\n\t\t\t\tforeach($results_packages[2] as $x => $results_package) {\n\t\t\t\t\tpreg_match_all('/<Service ID=\"([0-9]{1,3})\">(.+?)<\\/Service>/s',$results_package,$results_methods);\n\t\t\t\t\tforeach($results_methods[2] as $y => $results_method) {\n\t\t\t\t\t\t// Name\n\t\t\t\t\t\tpreg_match('/<SvcDescription>(.+?)<\\/SvcDescription>/',$results_method,$name);\n\t\t\t\t\t\t$name = str_replace($strip,'',$name[1]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Use name, get rate\n\t\t\t\t\t\tif($name and in_array($name,$this->methods)) {\n\t\t\t\t\t\t\tpreg_match('/<Postage>(.+?)<\\/Postage>/',$results_method,$rate);\n\t\t\t\t\t\t\tif($rate[1]) {\n\t\t\t\t\t\t\t\tif($this->package_fits($shipping,$packages,$name)) {\n\t\t\t\t\t\t\t\t\t$rates['rates'][$name] += $rate[1];\n\t\t\t\t\t\t\t\t\t$rates['packages'][$x]['package'] = $packages[$x];\n\t\t\t\t\t\t\t\t\t$rates['packages'][$x]['rates'][$name] += $rate[1];\n\t\t\t\t\t\t\t\t\tif(!isset($rates['names'][$name])) $rates['names'][$name] = $name;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Return\n\t\t\treturn $rates;\n\t\t}",
"function rp($angka)\n{\n\n $hasil_rupiah = \"Rp. \" . number_format($angka, 0, '', '.');\n return $hasil_rupiah;\n}"
] | [
"0.620348",
"0.5708824",
"0.569048",
"0.5646081",
"0.55313456",
"0.54103357",
"0.5391546",
"0.53848433",
"0.5365716",
"0.53577346",
"0.5296346",
"0.5295041",
"0.5246403",
"0.5234843",
"0.5215353",
"0.521507",
"0.5192004",
"0.5189179",
"0.51857203",
"0.5182379",
"0.5168363",
"0.5166678",
"0.51615286",
"0.51529896",
"0.5141328",
"0.5131433",
"0.51186293",
"0.51043653",
"0.5103491",
"0.5098945",
"0.5097068",
"0.509387",
"0.5090063",
"0.50837076",
"0.5073856",
"0.5058324",
"0.50522226",
"0.5052053",
"0.5044877",
"0.5042585",
"0.50303775",
"0.5017457",
"0.5016782",
"0.50122267",
"0.5009959",
"0.5009558",
"0.5008884",
"0.5008238",
"0.50044906",
"0.5002782",
"0.50010973",
"0.49980155",
"0.49962485",
"0.49909025",
"0.49872383",
"0.49850732",
"0.497881",
"0.4975804",
"0.4975553",
"0.49686828",
"0.49668226",
"0.49505568",
"0.49492323",
"0.4947493",
"0.49451992",
"0.49439558",
"0.49425173",
"0.493754",
"0.49361104",
"0.4935108",
"0.49293932",
"0.49204513",
"0.49183217",
"0.49083787",
"0.49066654",
"0.49003154",
"0.48945108",
"0.48907155",
"0.48882288",
"0.4887015",
"0.48857895",
"0.48836926",
"0.48806188",
"0.48804706",
"0.4880317",
"0.48791906",
"0.48738724",
"0.4859151",
"0.48570132",
"0.48565164",
"0.48513526",
"0.48461044",
"0.4840345",
"0.48356903",
"0.48342806",
"0.48339885",
"0.48330963",
"0.4830642",
"0.4824244",
"0.48229164"
] | 0.7006712 | 0 |
function pagination Fungsi ini akan menangani pembuatan pagination. | protected function pagination(array $data)
{
$data['pageMin'] = $data['currentPage'] - SURROUND_COUNT;
$data['pageMin'] = $data['pageMin'] > 0 ? $data['pageMin'] : 1;
$data['pageMax'] = $data['currentPage'] + SURROUND_COUNT;
$data['pageMax'] =
$data['pageMax'] < $data['lastPage']
? $data['pageMax']
: $data['lastPage'];
$data['uri'] =
BASE_URL .
Functions::getStringBetween(
rtrim($_SERVER['REQUEST_URI'], '/'),
BASE_PATH,
'/page',
);
$this->smarty->assign('paging', $data);
$this->smarty->assign(
'pager',
$this->smarty->fetch('Templates/pagination.tpl'),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function pagination(){}",
"function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pages>1){\n\t\t\t$this->tpl->add(\"pagination\", \"SHOW\", \"TRUE\");\n\n\t\t\tfor ($i=0; $i<$num_pages; $i++){\n\t\t\t\t$this->tpl->add(\"page\", array(\n\t\t\t\t\t\"CLASS\"\t=> \"\",\n\t\t\t\t\t\"VALUE\"\t=> \"\",\n\t\t\t\t));\n\t\t\t\t$this->tpl->parse(\"page\", true);\n\t\t\t}\n\t\t}\n/*\n\t\t\t<patTemplate:tmpl name=\"pagination\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<ul>\t\n\t\t\t\t\t<patTemplate:tmpl name=\"prev_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li class=\"disablepage\"><a href=\"javascript: return false;\">« Предишна</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t\t<patTemplate:tmpl name=\"page\">\n\t\t\t\t\t<li {CLASS}>{VALUE}</li>\n\t\t\t\t\t</patTemplate:tmpl>\n<!--\n\t\t\t\t\t<li class=\"currentpage\">1</li>\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">2</a></li>\n\t\t\t\t\t<li><a href=\"?page=2&sort=date&type=desc\">3</a></li>\n//-->\n\t\t\t\t\t<patTemplate:tmpl name=\"next_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">Следваща »</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t</patTemplate:tmpl>\n*/\n\t}",
"public function page($p = 0)\n {\n $per_page = 5;\n\n // Load library pagination\n $this->load->library('pagination');\n\n // Konfigurasi pagination\n $config['base_url'] = site_url() . '/siswa/page/';\n $config['total_rows'] = $this->siswa_model->getjumlahdata();\n $config['per_page'] = $per_page;\n\n // Membuat Style pagination untuk BootStrap v4\n $config['first_link'] = 'First';\n $config['last_link'] = 'Last';\n $config['next_link'] = 'Next';\n $config['prev_link'] = 'Prev';\n $config['full_tag_open'] = '<div class=\"paging text-center\"><nav><ul class=\"pagination justify-content-center\">';\n $config['full_tag_close'] = '</ul></nav></div>';\n $config['num_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['num_tag_close'] = '</span></li>';\n $config['cur_tag_open'] = '<li class=\"page-item active\"><span class=\"page-link\">';\n $config['cur_tag_close'] = '<span class=\"sr-only\">(current)</span></span></li>';\n $config['next_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['next_tagl_close'] = '<span aria-hidden=\"true\">»</span></span></li>';\n $config['prev_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['prev_tagl_close'] = '</span>Next</li>';\n $config['first_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['first_tagl_close'] = '</span></li>';\n $config['last_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['last_tagl_close'] = '</span></li>';\n\n $this->pagination->initialize($config);\n\n $data[\"pagination\"] = $this->pagination->create_links();\n $data[\"result\"] = $this->siswa_model->getsiswaperpage($p, $per_page);\n\n //Load view\n $this->load->view(\"siswa_paging_view\", $data);\n }",
"function Pagination() \n { \n $this->current_page = 1; \n $this->mid_range = 7; \n $this->items_per_page = (!empty($_GET['ipp'])) ? $_GET['ipp']:$this->default_ipp; \n }",
"function newPaging($data) {\n $batas = $data['setPage'];\n $halaman = $data['halaman'];\n if (empty($halaman)) {\n $posisi = 0;\n $halaman = 1;\n } else {\n $posisi = ($halaman - 1) * $batas;\n }\n\n //Langkah 2: Sesuaikan perintah SQL\n $tampil = \"SELECT * FROM anggota LIMIT $posisi,$batas\";\n //print_r($tampil);\n $hasil = mysql_query($tampil);\n\n $no = $posisi + 1;\n while ($r = mysql_fetch_array($hasil)) {\n echo \"<tr><td>$no</td><td>$r[nama]</td><td>$r[alamat]</td></tr>\";\n $no++;\n }\n echo \"</table><br>\";\n\n //Langkah 3: Hitung total data dan halaman \n $tampil2 = mysql_query(\"SELECT * FROM anggota\");\n $jmldata = mysql_num_rows($tampil2);\n $jmlhal = ceil($jmldata / $batas);\n\n echo \"<div class=paging>\";\n // Link ke halaman sebelumnya (previous)\n if ($halaman > 1) {\n $prev = $halaman - 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$prev>« Prev</a></span> \";\n } else {\n echo \"<span class=disabled>« Prev</span> \";\n }\n\n // Tampilkan link halaman 1,2,3 ...\n for ($i = 1; $i <= $jmlhal; $i++)\n if ($i != $halaman) {\n if (isset($_GET['setPage'])) {\n $setPage = $_GET['setPage'];\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i&setPage=$setPage>$i</a> \";\n } else {\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i>$i</a> \";\n }\n } else {\n echo \" <span class=current>$i</span> \";\n }\n\n // Link kehalaman berikutnya (Next)\n if ($halaman < $jmlhal) {\n $next = $halaman + 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$next>Next »</a></span>\";\n } else {\n echo \"<span class=disabled>Next »</span>\";\n }\n echo \"</div>\";\n}",
"function voyage_mikado_pagination($pages = '', $range = 4, $paged = 1) {\n\n $showitems = $range + 1;\n\n if($pages == '') {\n global $wp_query;\n $pages = $wp_query->max_num_pages;\n if(!$pages) {\n $pages = 1;\n }\n }\n\n $show_load_more = voyage_mikado_enable_load_more();\n $masonry_template = voyage_mikado_is_masonry_template();\n\n $search_template = 'no';\n if(is_search()) {\n $search_template = 'yes';\n }\n\n\n if($pages != 1) {\n if($show_load_more == 'yes' && $search_template !== 'yes' && !$masonry_template) {\n $params = array(\n 'text' => 'Load More'\n );\n echo '<div class=\"mkdf-load-more-ajax-pagination\">';\n echo voyage_mikado_get_button_html($params);\n echo '</div>';\n } else {\n echo '<div class=\"mkdf-pagination\">';\n echo '<ul>';\n if($paged > 2 && $paged > $range + 1 && $showitems < $pages) {\n echo '<li class=\"mkdf-pagination-first-page\"><a href=\"'.esc_url(get_pagenum_link(1)).'\"><<</a></li>';\n }\n echo \"<li class='mkdf-pagination-prev\";\n if($paged > 2 && $paged > $range + 1 && $showitems < $pages) {\n echo \" mkdf-pagination prev-first\";\n }\n echo \"'><a href='\".esc_url(get_pagenum_link($paged - 1)).\"'><span class='lnr lnr-chevron-left'></span></a></li>\";\n\n for($i = 1; $i <= $pages; $i++) {\n if(1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) {\n echo ($paged == $i) ? \"<li class='active'><span>\".$i.\"</span></li>\" : \"<li><a href='\".get_pagenum_link($i).\"' class='inactive'>\".$i.\"</a></li>\";\n }\n }\n\n echo '<li class=\"mkdf-pagination-next';\n if($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) {\n echo ' mkdf-pagination-next-last';\n }\n echo '\"><a href=\"';\n if($pages > $paged) {\n echo esc_url(get_pagenum_link($paged + 1));\n } else {\n echo esc_url(get_pagenum_link($paged));\n }\n echo '\"><span class=\"lnr lnr-chevron-right\"></span></a></li>';\n if($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) {\n echo '<li class=\"mkdf-pagination-last-page\"><a href=\"'.esc_url(get_pagenum_link($pages)).'\">></a></li>';\n }\n echo '</ul>';\n echo \"</div>\";\n\n echo '<div class=\"mkdf-pagination-helper\">';\n previous_posts_link();\n next_posts_link();\n echo '</div>';\n }\n }\n }",
"public function paginate()\n {\n }",
"abstract public function preparePagination();",
"function medigroup_mikado_pagination($pages = '', $range = 4, $paged = 1) {\n\n $showitems = $range + 1;\n\n if($pages == '') {\n global $wp_query;\n $pages = $wp_query->max_num_pages;\n if(!$pages) {\n $pages = 1;\n }\n }\n\n $show_load_more = medigroup_mikado_enable_load_more();\n $masonry_template = medigroup_mikado_is_masonry_template();\n\n $search_template = 'no';\n if(is_search()) {\n $search_template = 'yes';\n }\n\n\n if($pages != 1) {\n if($show_load_more == 'yes' && $search_template !== 'yes' && !$masonry_template) {\n $params = array(\n 'text' => esc_html__('Load More', 'medigroup')\n );\n echo '<div class=\"mkd-load-more-ajax-pagination\">';\n echo medigroup_mikado_get_button_html($params);\n echo '</div>';\n } else {\n echo '<div class=\"mkd-pagination\">';\n echo '<ul>';\n if($paged > 2 && $paged > $range + 1 && $showitems < $pages) {\n echo '<li class=\"mkd-pagination-first-page\"><a href=\"'.esc_url(get_pagenum_link(1)).'\"><<</a></li>';\n }\n echo \"<li class='mkd-pagination-prev\";\n if($paged > 2 && $paged > $range + 1 && $showitems < $pages) {\n echo \" mkd-pagination prev-first\";\n }\n echo \"'><a href='\".esc_url(get_pagenum_link($paged - 1)).\"'><span aria-hidden='true' class='lnr lnr-chevron-left'></span></a></li>\";\n\n for($i = 1; $i <= $pages; $i++) {\n if(1 != $pages && (!($i >= $paged + $range + 1 || $i <= $paged - $range - 1) || $pages <= $showitems)) {\n echo ($paged == $i) ? \"<li class='active'><span>\".$i.\"</span></li>\" : \"<li><a href='\".get_pagenum_link($i).\"' class='inactive'>\".$i.\"</a></li>\";\n }\n }\n\n echo '<li class=\"mkd-pagination-next';\n if($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) {\n echo ' mkd-pagination-next-last';\n }\n echo '\"><a href=\"';\n if($pages > $paged) {\n echo esc_url(get_pagenum_link($paged + 1));\n } else {\n echo esc_url(get_pagenum_link($paged));\n }\n echo '\"><span aria-hidden=\"true\" class=\"lnr lnr-chevron-right\"></span></a></li>';\n if($paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages) {\n echo '<li class=\"mkd-pagination-last-page\"><a href=\"'.esc_url(get_pagenum_link($pages)).'\">></a></li>';\n }\n echo '</ul>';\n echo \"</div>\";\n\n echo '<div class=\"mkd-pagination-helper\">';\n previous_posts_link();\n next_posts_link();\n echo '</div>';\n }\n }\n }",
"function pagination_siswa($id){\n\t\t$post = $this->input->post();\t\t\t\t\t\t\n\t\t$post['id_to'] =$id;\n\n\t\t$jumlah_data = $this->msiswa->get_siswa_blm_ikutan_to_pagination_number($post);\n\n\t\t$pagination = '<li class=\"hide\" id=\"page-prev\"><a href=\"javascript:void(0)\" onclick=\"prevPage()\" aria-label=\"Previous\">\n\t\t<span aria-hidden=\"true\">«</span>\n\t</a></li>';\n\t$pagePagination=1;\n\n\t$sumPagination=($jumlah_data/$post['records_per_page']);\n\tfor ($i=0; $i < $sumPagination; $i++) { \n\t\tif ($pagePagination<=7) {\n\t\t\t$pagination.='<li ><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" id=\"page-'.$pagePagination.'\">'.$pagePagination.'</a></li>';\n\t\t}else{\n\t\t\t$pagination.='<li class=\"hide\" id=\"page-'.$pagePagination.'\"><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" >'.$pagePagination.'</a></li>';\n\t\t}\n\t\t$pagePagination++;\n\t}\n\tif ($pagePagination>7) {\n\t\t$pagination.='<li class=\"\" id=\"page-next\">\n\t\t<a href=\"javascript:void(0)\" onclick=\"nextPage()\" aria-label=\"Next\">\n\t\t\t<span aria-hidden=\"true\">»</span>\n\t\t</a>\n\t</li>';\n}\n// cek jika halaman pagination hanya satu set pagination menjadi null\nif ($sumPagination<=1) {\n\t$pagination='';\n}\necho json_encode($pagination);\n\n}",
"function pagination($param){\r\n\t\r\n\t\t$config['base_url'] = base_url().$param['base_url'];\r\n\t\t$config['total_rows'] =$param['recordCountQuery'];\r\n\t\tif(array_key_exists('record_per_page',$param)){\r\n\t\t\t$config['per_page'] = $param['record_per_page'];\r\n\t\t}else{\r\n\t\t\t$config['per_page'] = RECORDS_PER_PAGE;\r\n\t\t}\r\n\t\t$config['full_tag_open'] = ' <div class=\"pagination\"> <ul>';\r\n \r\n\t\t$config['full_tag_close'] = ' </ul></div>';\r\n\t\t\r\n\t\t$config['num_links'] =RECORDS_NUM_LINKS;\r\n\t\t\r\n\t\t$config['first_tag_open'] = '<li>';\r\n\t\t$config['first_tag_close'] = '</li>';\r\n\t\t\r\n\t\t$config['first_link'] = 'First';\r\n\t\t$config['last_link'] = 'Last';\r\n\t\t\r\n\t\t\r\n\t\t$config['prev_tag_open'] = '<li class=\"prev disabled\">';\r\n\t\t$config['prev_tag_close'] = '</li>';\r\n\t\t\r\n\t\t$config['prev_link'] = '← Previous ' ;\r\n\t\t\r\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"\">';\r\n\t\t$config['cur_tag_close'] = '</a></li>';\r\n\t\t\r\n\t\t$config['num_tag_open'] = '<li>';\r\n\t\t$config['num_tag_close'] = '</li>';\r\n\t\t\r\n\t\t$config['next_tag_open'] = '<li class=\"next\">';\r\n\t\t$config['next_tag_close'] = '</li>';\r\n\t\t\r\n\t\t$config['next_link'] = 'Next →';\r\n//\t\t$config['page_query_string'] = TRUE;\r\n\r\n\t\t$config['uri_segment'] =$param['pagination_uri_segment'];\r\n\t\t$this->pagination->initialize($config);\r\n\t $start=$this->uri->segment($param['pagination_uri_segment'],0);\r\n\t $offset=$config['per_page'];\r\n \t\t$pagination_param=array('start'=>$start,'offset'=>$offset);\r\n \t\treturn $pagination_param;\r\n\t\t\r\n\t}",
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"function pagination_message_users()\n {\n\n $this->load->library(\"pagination\");\n $config = array();\n $config[\"base_url\"] = \"#\";\n $config[\"total_rows\"] = $this->crud_model->count_all_message_users();\n $config[\"per_page\"] = 4;\n $config[\"uri_segment\"] = 3;\n $config[\"use_page_numbers\"] = TRUE;\n $config[\"full_tag_open\"] = '<ul class=\"pagination pagination2\">';\n $config[\"full_tag_close\"] = '</ul>';\n $config[\"first_tag_open\"] = '<li class=\"page-item\">';\n $config[\"first_tag_close\"] = '</li>';\n $config[\"last_tag_open\"] = '<li class=\"page-item\">';\n $config[\"last_tag_close\"] = '</li>';\n $config['next_link'] = '<li class=\"page-item active\"><i class=\"btn btn-info\">>></i>';\n $config[\"next_tag_open\"] = '<li class=\"page-item\">';\n $config[\"next_tag_close\"] = '</li>';\n $config[\"prev_link\"] = '<li class=\"page-item active\"><i class=\"btn btn-info\"><<</i>';\n $config[\"prev_tag_open\"] = \"<li class='page-item'>\";\n $config[\"prev_tag_close\"] = \"</li>\";\n $config[\"cur_tag_open\"] = \"<li class='page-item active'><a href='#' class='page-link'>\";\n $config[\"cur_tag_close\"] = \"</a></li>\";\n $config[\"num_tag_open\"] = \"<li class='page-item'>\";\n $config[\"num_tag_close\"] = \"</li>\";\n $config[\"num_links\"] = 1;\n $this->pagination->initialize($config);\n $page = $this->uri->segment(3);\n $start = ($page - 1) * $config[\"per_page\"];\n\n $output = array(\n 'pagination_link' => $this->pagination->create_links(),\n 'country_table' => $this->crud_model->fetch_detailsmessage_users($config[\"per_page\"], $start)\n );\n echo json_encode($output);\n }",
"public function pemilihadmin($page = null){\n if($this->session->has_userdata('operator')) redirect('');\n\n $perPage = 25;\n if($page === null) $offset = 0;\n else $offset = ($page * $perPage) - $perPage;\n\n $pemilihs = $this->pemilih->allPemilihAdmin($perPage, $offset);\n $totalPemilihAdmin = $this->pemilih->totalPemilihAdmin();\n $belumMemilihs = $this->pemilih->allPemilihBelumMemilihAdmin($perPage, $offset);\n $totalPemilihBelumMemilihAdmin = $this->pemilih->totalPemilihBelumMemilihAdmin();\n $fakultass = $this->pemilih->allFakultas();\n $input = (object) $this->pemilih->pemilihDefaultValues();\n\n $config['base_url'] = base_url('pemilih-admin');\n $config['total_rows'] = $totalPemilihAdmin;\n $config['per_page'] = $perPage;\n $config['use_page_numbers'] = true;\n $config['next_link'] = 'Selanjutnya';\n $config['prev_link'] = 'Sebelumnya';\n $config['first_link'] = 'Pertama';\n $config['last_link'] = 'Terakhir';\n $config['num_links'] = '2';\n $config['first_tag_open'] = '<li>';\n $config['first_tag_close'] = '</li>';\n $config['last_tag_open'] = \"<li class='page-item'>\";\n $config['last_tag_close'] = '</li>';\n $config['next_tag_open'] = \"<li class='page-item'>\";\n $config['next_tag_close'] = '</li>';\n $config['prev_tag_open'] = \"<li class='page-item'>\";\n $config['prev_tag_close'] = '</li>';\n $config['cur_tag_open'] = \"<li class='page-item'><span class='page-link'>\";\n $config['cur_tag_close'] = \"<span class='sr-only'>(current)</span></span></li>\";\n $config['num_tag_open'] = \"<li class='page-item'>\";\n $config['num_tag_close'] = '</li>';\n $config['attributes'] = array('class' => 'page-item');\n $this->pagination->initialize($config);\n $pagination = $this->pagination->create_links();\n\n $main_view = 'bem/pemilih-admin';\n $this->load->view('template', compact('main_view', 'pemilihs', 'input', 'fakultass', 'belumMemilihs', 'pemilihFakultass', 'totalPemilihAdmin', 'totalPemilihBelumMemilihAdmin', 'pagination'));\n }",
"function pagination_view_sortie()\n\t\t{\n\n\t\t $this->load->library(\"pagination\");\n\t\t $config = array();\n\t\t $config[\"base_url\"] = \"#\";\n\t\t $config[\"total_rows\"] = $this->crud_model->count_all_view_sortie();\n\t\t $config[\"per_page\"] = 10;\n\t\t $config[\"uri_segment\"] = 3;\n\t\t $config[\"use_page_numbers\"] = TRUE;\n\t\t $config[\"full_tag_open\"] = '<ul class=\"nav pagination\">';\n\t\t $config[\"full_tag_close\"] = '</ul>';\n\t\t $config[\"first_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"first_tag_close\"] = '</li>';\n\t\t $config[\"last_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"last_tag_close\"] = '</li>';\n\t\t $config['next_link'] = '<li class=\"page-item active\"><i class=\"btn btn-info\">>></i>';\n\t\t $config[\"next_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"next_tag_close\"] = '</li>';\n\t\t $config[\"prev_link\"] = '<li class=\"page-item active\"><i class=\"btn btn-info\"><<</i>';\n\t\t $config[\"prev_tag_open\"] = \"<li class='page-item'>\";\n\t\t $config[\"prev_tag_close\"] = \"</li>\";\n\t\t $config[\"cur_tag_open\"] = \"<li class='page-item active'><a href='#' class='page-link'>\";\n\t\t $config[\"cur_tag_close\"] = \"</a></li>\";\n\t\t $config[\"num_tag_open\"] = \"<li class='page-item'>\";\n\t\t $config[\"num_tag_close\"] = \"</li>\";\n\t\t $config[\"num_links\"] = 1;\n\t\t $this->pagination->initialize($config);\n\t\t $page = $this->uri->segment(3);\n\t\t $start = ($page - 1) * $config[\"per_page\"];\n\n\t\t $output = array(\n\t\t 'pagination_link' => $this->pagination->create_links(),\n\t\t 'country_table' => $this->crud_model->fetch_details_view_sortie($config[\"per_page\"], $start)\n\t\t );\n\t\t echo json_encode($output);\n\t\t}",
"public function getPaginate(){ }",
"public function getPerPage();",
"public function get_pagenum()\n {\n }",
"public function paginationToken()\n\t{\n\t\t$masaAktif=$this->input->post('masaAktif');\n\t\t$status=$this->input->post('status');\n\t\t$records_per_page=$this->input->post('records_per_page');\n\t\t$keySearch=$this->input->post('keySearch');\n\t\tif ($keySearch != '' && $keySearch !=' ') {\n\t\t\tif ($status==1) {\n\t\t\t\t$jumlah_data =$this->token_model->sum_cari_pengguna_token($masaAktif,$status,$keySearch);\n\t\t\t} else {\n\t\t\t\t$jumlah_data =$this->token_model->sum_cari_data_token($masaAktif,$status,$keySearch);\n\t\t\t}\n\t\t}else{\n\t\t\t$jumlah_data = $this->token_model->jumlah_data_token($masaAktif,$status); \n\t\t}\n\t\t$pagination='<li class=\"hide\" id=\"page-prev\"><a href=\"javascript:void(0)\" onclick=\"prevPage()\" aria-label=\"Previous\">\n\t\t<span aria-hidden=\"true\">«</span>\n\t</a></li>';\n\t$pagePagination=1;\n\n\t$sumPagination=($jumlah_data/$records_per_page);\n\tfor ($i=0; $i < $sumPagination; $i++) { \n\t\tif ($pagePagination<=7) {\n\t\t\t$pagination.='<li ><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" id=\"page-'.$pagePagination.'\">'.$pagePagination.'</a></li>';\n\t\t}else{\n\t\t\t$pagination.='<li class=\"hide\" id=\"page-'.$pagePagination.'\"><a href=\"javascript:void(0)\" onclick=\"selectPage('.$i.')\" >'.$pagePagination.'</a></li>';\n\t\t}\n\n\t\t$pagePagination++;\n\t}\n\tif ($pagePagination>7) {\n\t\t$pagination.='<li class=\"\" id=\"page-next\">\n\t\t<a href=\"javascript:void(0)\" onclick=\"nextPage()\" aria-label=\"Next\">\n\t\t\t<span aria-hidden=\"true\">»</span>\n\t\t</a>\n\t</li>';\n}\n \t // cek jika halaman pagination hanya satu set pagination menjadi null\nif ($sumPagination<=1) {\n\t$pagination='';\n}\n\necho json_encode ($pagination);\n}",
"public function setConfigPagination(&$config){\n\t\n\t\t$config[\"base_url\"] = base_url(\"Form_56-1.html/\");\n\t\t$config[\"uri_segment\"] = 2;\n\t\t$config[\"per_page\"] = 20;\n\t\t$total_row = $this->db->join(\"language\", \"form_56_1.lang_id = language.lang_id\")->where(\"language.language = '\".$this->session->userdata('lang_id').\"'\")->get(\"form_56_1\")->num_rows();\n\t\t$config[\"total_rows\"] = $total_row;\n\t\n\t\t$config['full_tag_open'] = '<ul class=\"pagination\" style=\"margin: 0\">';\n\t\t$config['full_tag_close'] = '</ul>';\n\t\t$config['prev_link'] = '«';\n\t\t$config['prev_tag_open'] = '<li>';\n\t\t$config['prev_tag_close'] = '</li>';\n\t\t$config['next_link'] = '»';\n\t\t$config['next_tag_open'] = '<li>';\n\t\t$config['next_tag_close'] = '</li>';\n\t\t$config['cur_tag_open'] = '<li class=\"active\"><a href=\"#\">';\n\t\t$config['cur_tag_close'] = '</a></li>';\n\t\t$config['num_tag_open'] = '<li>';\n\t\t$config['num_tag_close'] = '</li>';\n\t\t$config['first_link'] = FALSE;\n\t\t$config['last_link'] = FALSE;\n\t\n\t}",
"private function getPaginatorType2($current_page = 0, $total_pages = 1, $conditions = \"\", $condition_encode = false){\n $cuppa = Cuppa::getInstance();\n $language = $cuppa->language->load();\n if($total_pages == 1) return \"\";\n $field = \"<div class='paginator'>\";\n //++ Page info\n if($this->pages_info)\n $field .= \"<div class='page_numbers'>\".$cuppa->language->getValue(\"Page\",$language).\" \".($current_page+1).\" \".$cuppa->language->getValue(\"of\",$language).\" \".$total_pages.\"</div>\";\n //--\n //++ Pages\n $field .= \"<div class='pages'>\";\n //++ Firs page\n if($current_page != 0)\n $field .= \"<a class='first_page' onclick='\".$this->function_name.\"(0,\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")' ><span>\".$cuppa->language->getValue(\"First\",$language).\"</span></a>\";\n //--\n //++ add apges\n $j = 0;\n for($i = $current_page - $this->max_numbers; $i < $total_pages; $i++){\n if($i < 0) $i = 0;\n if($i > $current_page + $this->max_numbers) break;\n if($j > 0) $field .= \"<div class='separator'></div>\"; \n if($i == $current_page)\n $field .= \"<a class='page_item selected'><span>\".($i+1).\"</span></a>\";\n else \n $field .= \"<a class='page_item' onclick='\".$this->function_name.\"(\".$i.\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")' ><span>\".($i+1).\"</span></a>\";\n $j++;\n }\n //--\n //++ Last page\n if($current_page+1 != $total_pages)\n $field .= \"<a class='last_page' onclick='\".$this->function_name.\"(\".($total_pages-1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")' ><span>\".$cuppa->language->getValue(\"Last\",$language).\"</span></a>\";\n //--\n $field .= \"</div>\";\n //-- Pages\n $field .= \"</div>\";\n $field .= \"<input type='hidden' value='\".$current_page.\"' id='page' name='page' />\";\n $field .= \"<input type='hidden' value='' id='page_item_start' name='page_item_start' />\";\n if($condition_encode) $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.base64_encode($conditions).'\"/>';\n else $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.$conditions.'\"/>';\n return $field;\n }",
"function getPagelist($sql = '', $fields = array(), $mod = array())\n{\n $count = count(db(sql));\n $totalNum = ceil($count / PAGE_NUM);\n $path = $request_url['path'];\n\n $page = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'];\n// 组装limit语句\n $limit = 'LIMIT' . ($page - 1) * PAGE_NUM . ',' . PAGE_NUM;\n $datas = db($sql, $limit);\n $html = getTable($datas, $fields, $mod);\n $start = ($page - PAGE_OFFSET) > 0 ? $page - PAGE_OFFSET : 1;//获取左侧位置的偏移\n $end = ($page + PAGE_OFFSET) < $totalNum ? $page + PAGE_OFFSET : $totalNum;\n $html .= '<div class=\"page\">';\n if ($page > 1) {\n $html .= '<a href=\"' . $path . '?page=' . ($page - 1) . '\">上一页</a>';\n $html .= '<a href=\"' . $path . '?page=1\">首页</a>';\n }\n for($i = $start;$i<=$end;$i++)\n {\n $class = ($i==$page)?'class=\"on\"':'';\n $html .='<a href =\"'.$path.'?page='.$i.'\"'.$class.'>'.$i.'</a>';\n\n\n }\n if ($page < $totalNum) {\n ;\n $html .= '<a href=\"' . $path . '?page='.$totalNum.'\">尾页</a>';\n $html .= '<a href=\"' . $path . '?page='.($page+1).'\">下一页</a>';\n }\n $html .='共'.$totalNum.'页';\n $html .='</div>';\n return $html;\n}",
"public function getPaginate ($p_rowsPerPage, $p_currentPage);",
"function paging($condtion='1')\r\n {\r\n /*\r\n $url = '';\r\n \t if(isset($_GET[\"brand\"])){\r\n \t \t$value = trim($_GET['brand']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = sprintf(\"brand='%s'\",$value);\r\n\t \t \t$url = '&brand='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"module\"])){\r\n \t \t$value = trim($_GET['module']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$module = sprintf(\"series='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$module;\r\n\t \t \t$url = $url.'&module='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"part\"])){\r\n \t \t$value = trim($_GET['part']);\r\n \t \tif($value != \"\"){ \t \t\r\n\t \t \t$part = sprintf(\"module='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$part;\r\n\t \t \t$url = $url.'&part='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"key\"])){\r\n \t \t$value = trim($_GET[\"key\"]);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = $this->key_query($value,$url);\r\n\t \t \techo \"++++++++++\".$condtion;\r\n\t \t \t//$url = $url.'&part='.$value; \t \t\r\n \t \t}\r\n \t }\r\n \t */\r\n // get current page index\r\n $page = 1;\r\n \t if(isset($_GET[\"page\"])){\r\n \t \t$page = $_GET['page'];\r\n \t }\r\n \t \r\n \t // set paging parameters\r\n $number = 6; \r\n $total = $this->total;\r\n $url = $this->pget;\r\n $condtion = $this->cond;\r\n //$total = $this->getTotal($condtion);\r\n \r\n $url = '?page={page}'.$url; \r\n $pager = new Paging($total,$number,$page,$url);\r\n \t \r\n \t // get publish records\r\n\t $db = GLOBALDB();\r\n $sql = \"SELECT * FROM publish WHERE \".$condtion.\" order by id desc LIMIT \".$pager->limit.\",\".$pager->size;\r\n $result = $db->query($sql); \r\n $this->display($result);\r\n \r\n // show paging bar\r\n //echo $sql;\r\n\t $pager->show();\r\n }",
"function custom_pagination($max_num_pages = '', $range = 1) {\n $showitems = ($range * 2)+1;\n\n global $paged;\n if(empty($paged)) $paged = 1;\n\n if($max_num_pages == '') {\n global $wp_query;\n // 最後のページ\n $max_num_pages = $wp_query->max_num_pages;\n if(!$max_num_pages) {\n $max_num_pages = 1;\n }\n }\n\n if(1 != $max_num_pages) {\n echo '<div class=\"paging\">'.\"\\n\";\n\n // Prevリンク\n // 現在のページが2ページ目以降の場合\n if ($paged > 1) echo '<a class=\"prev_link\" href=\"'.get_pagenum_link($paged - 1).'\">«</a>'.\"\\n\";\n\n // 今のページからレンジを引いて2以上ある場合 && 最大表示アイテム数より最第ページ数が大きい場合\n // (レンジ数のすぐ次の場合は表示する)\n // 1...345\n if ( $paged-$range >= 2 && $max_num_pages > $showitems ) echo '<a href=\"'.get_pagenum_link(1).'\">1</a>'.\"\\n\";\n // 今のページからレンジを引いて3以上ある場合 && 最大表示アイテム数より最第ページ数が大きい場合\n if ( $paged-$range >= 3 && $max_num_pages > $showitems ) echo '<span class=\"txt_hellip\">…</span>'.\"\\n\";\n\n // レンジより前に追加する数\n $addPrevCount = $paged+$range-$max_num_pages;\n // レンジより後に追加する数\n $addNextCount = -($paged-1-$range); // 今のページ数を遡ってカウントするために-1\n // アイテムループ\n for ($i=1; $i <= $max_num_pages; $i++) {\n // 表示するアイテム\n if ($paged == $i) {\n $pageItem = '<span class=\"current\">'.$i.'</span>'.\"\\n\";\n } else {\n $pageItem = '<a href=\"'.get_pagenum_link($i).'\" class=\"inactive\">'.$i.'</a>'.\"\\n\";\n }\n\n // 今のページからレンジを引いた数~今のページからレンジを足した数まで || 最大ページ数が最大表示アイテム数以下の場合\n if ( ( $paged-$range <= $i && $i<= $paged+$range ) || $max_num_pages <= $showitems ) {\n echo $pageItem;\n // 今のページからレンジを引くと負数になる場合 && 今のページ+レンジ+負数をレンジに加算した数まで\n } else if ( $paged-1-$range < 0 && $paged+$range+$addNextCount >= $i ) {\n echo $pageItem;\n // 今のページからレンジを足すと 最後のページよりも大きくなる場合 && 今のページ+レンジ+負数をレンジに加算した数まで\n } else if ( $paged+$range > $max_num_pages && $paged-$range-$addPrevCount <= $i ) {\n echo $pageItem;\n }\n }\n\n // 現在のページにレンジを足しても最後のページ数より2以上小さい時 && 最大表示アイテム数より最第ページ数が大きい場合\n if ( $paged+$range <= $max_num_pages-2 && $max_num_pages > $showitems ) echo '<span class=\"txt_hellip\">…</span>'.\"\\n\";\n if ( $paged+$range <= $max_num_pages-1 && $max_num_pages > $showitems ) echo '<a href=\"'.get_pagenum_link($max_num_pages).'\">'.$max_num_pages.'</a>'.\"\\n\";\n // Nextリンク\n if ($paged < $max_num_pages) echo '<a class=\"next_link\" href=\"'.get_pagenum_link($paged + 1).'\">»</a>'.\"\\n\";\n echo \"</div>\\n\";\n }\n }",
"public function do_paging()\n {\n }",
"function pagination_reservation_client_ok()\n {\n\n $this->load->library(\"pagination\");\n $config = array();\n $config[\"base_url\"] = \"#\";\n $config[\"total_rows\"] = $this->crud_model->count_all_reservations_ok();\n $config[\"per_page\"] = 4;\n $config[\"uri_segment\"] = 3;\n $config[\"use_page_numbers\"] = TRUE;\n $config[\"full_tag_open\"] = '<ul class=\"pagination pagination2\">';\n $config[\"full_tag_close\"] = '</ul>';\n $config[\"first_tag_open\"] = '<li class=\"page-item\">';\n $config[\"first_tag_close\"] = '</li>';\n $config[\"last_tag_open\"] = '<li class=\"page-item\">';\n $config[\"last_tag_close\"] = '</li>';\n $config['next_link'] = '<li class=\"page-item active\"><i class=\"btn btn-info\">>></i>';\n $config[\"next_tag_open\"] = '<li class=\"page-item\">';\n $config[\"next_tag_close\"] = '</li>';\n $config[\"prev_link\"] = '<li class=\"page-item active\"><i class=\"btn btn-info\"><<</i>';\n $config[\"prev_tag_open\"] = \"<li class='page-item'>\";\n $config[\"prev_tag_close\"] = \"</li>\";\n $config[\"cur_tag_open\"] = \"<li class='page-item active'><a href='#' class='page-link'>\";\n $config[\"cur_tag_close\"] = \"</a></li>\";\n $config[\"num_tag_open\"] = \"<li class='page-item'>\";\n $config[\"num_tag_close\"] = \"</li>\";\n $config[\"num_links\"] = 1;\n $this->pagination->initialize($config);\n $page = $this->uri->segment(3);\n $start = ($page - 1) * $config[\"per_page\"];\n\n $output = array(\n 'pagination_link' => $this->pagination->create_links(),\n 'country_table' => $this->crud_model->fetch_detail_reservations_ok($config[\"per_page\"], $start)\n );\n echo json_encode($output);\n }",
"private function paginate()\n\t{\n\t\tif ($this->_listModel) {\n\t\t\t$this->_listModel->loadNextPage();\n\t\t}\n\t}",
"function itstar_pagination(){\n global $wp_query;\n\n if($wp_query->max_num_pages > 1){\n $big = 999999999; \n echo /*__('Page : ','itstar').*/paginate_links( array(\n 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n 'format' => '?paged=%#%',\n 'current' => max( 1, get_query_var('paged') ),\n 'total' => $wp_query->max_num_pages,\n 'prev_text' => __('<i class=\"fa fa-angle-double-left\"></i>','itstar'),\n 'next_text' => __('<i class=\"fa fa-angle-double-right\"></i>','itstar')\n ) );\n }\n}",
"function pager($current_page, $records_per_page, $pages_per_pageList, $dataQuery, $countQuery){\n $obj->record = array(); // beinhaltet ein Arrray des objects mit Daten worüber dann zugegriffen wird.\n $obj->current_page = $current_page; // Startet mit 0!\n $obj->total_cur_page = 0; // shows how many records belong to current page\n $obj->records_per_page = 0;\n $obj->total_records = 0;\n $obj->total_pages = 0;\n $obj->preceding = false; // Ist true wenn es eine Seite vor der angezeigten gibt.\n $obj->subsequent = false; // Ist true wenn es eine Seite nach der angezeigten gibt.\n $obj->pages_per_pageList = 10; //$pages_per_pageList;\n $result=mysql_query($countQuery, $this->CONNECTION);\n $obj->total_records = mysql_num_rows($result);\n if($obj->total_records>0){\n $obj->record = $this->select($dataQuery);\n $obj->total_cur_page = sizeof($obj->record);\n $obj->records_per_page = $records_per_page;\n $obj->total_pages = ceil($obj->total_records/$records_per_page);\n $obj->offset_page = $obj->pages_per_pageList*floor($obj->current_page/$obj->pages_per_pageList);\n $obj->total_pages_in_pageList = $obj->total_pages-($obj->offset_page+$obj->pages_per_pageList);\n $obj->last_page_in_pageList = $obj->offset_page+$obj->pages_per_pageList;\n if($obj->last_page_in_pageList>$obj->total_pages) $obj->last_page_in_pageList=$obj->total_pages;\n if($obj->offset_page>0) $obj->pageList_preceding=true;\n else $obj->pageList_preceding=false;\n if($obj->last_page_in_pageList<$obj->total_pages) $obj->pageList_subsequent=true;\n else $obj->pageList_subsequent=false;\n if($obj->current_page>1) $obj->preceding=true;\n if($obj->current_page<$obj->total_pages) $obj->subsequent=true;\n }\n return $obj;\n }",
"public function paginater($js_function_name='change_page'){\n if($this->is_search_enabled){\n //$this->searching_val = \",$('#\".$this->input_field.\"').val()\";\n $this->searching_val = ',$(\"#'.$this->input_field.'\").val()';\n }\n //echo(\"<textarea>\".$this->searching_val.\"</textarea>\");\n\t$page = (int) (isset($_POST['page_id']) ? $_POST['page_id'] : 1);\n\t$page = ($page == 0 ? 1 : $page);\n\t$this->start = ($page-1) * $this->records_per_page;\n\n\t$next = $page + 1; \n\t$prev = $page - 1;\n\t$last_page = ceil($this->totalRecords/$this->records_per_page);\n\t$second_last = $last_page - 1; \n\n\t//$pagination = \"\";\n\tif($last_page > 1){\n\t\t$this->pagination .= \"<div class='pagination'>\";\n\t\tif($page > 1)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(1\".$this->searching_val.\");'>« First</a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>« First</span>\";\n\n\t\tif ($page > 1)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($prev).$this->searching_val.\");'>« Previous </a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>« Previous </span>\"; \n\n\t\tif ($last_page < 7 + ($this->adjacents * 2))\n\t\t{ \n\t\t\tfor ($counter = 1; $counter <= $last_page; $counter++)\n\t\t\t{\n\t\t\t\tif ($counter == $page)\n\t\t\t\t\t$this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\telse\n\t\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).$this->searching_val.\");'>$counter</a>\"; \n\n\t\t\t}\n\t\t}\n\t\telseif($last_page > 5 + ($this->adjacents * 2))\n\t\t{\n\t\t\tif($page < 1 + ($this->adjacents * 2))\n\t\t\t{\n\t\t\t\tfor($counter = 1; $counter < 4 + ($this->adjacents * 2); $counter++)\n\t\t\t\t{\n\t\t\t\t\tif($counter == $page)\n\t\t\t\t\t\t$this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).$this->searching_val.\");'>$counter</a>\"; \n\t\t\t\t}\n\t\t\t\t$this->pagination.= \"...\";\n\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($second_last).$this->searching_val.\");'> $second_last</a>\";\n\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($last_page).$this->searching_val.\");'>$last_page</a>\"; \n\n\t\t }\n\t\t elseif($last_page - ($this->adjacents * 2) > $page && $page > ($this->adjacents * 2))\n\t\t {\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(1\".$this->searching_val.\");'>1</a>\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(2\".$this->searching_val.\");'>2</a>\";\n\t\t\t $this->pagination.= \"...\";\n\t\t\t for($counter = $page - $this->adjacents; $counter <= $page + $this->adjacents; $counter++)\n\t\t\t {\n\t\t\t\t if($counter == $page)\n\t\t\t\t\t $this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\t else\n\t\t\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).\");'>$counter</a>\"; \n\t\t\t }\n\t\t\t $this->pagination.= \"..\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($second_last).$this->searching_val.\");'>$second_last</a>\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($last_page).$this->searching_val.\");'>$last_page</a>\"; \n\t\t }\n\t\t else\n\t\t {\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(1\".$this->searching_val.\");'>1</a>\";\n\t\t\t $this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(2\".$this->searching_val.\");'>2</a>\";\n\t\t\t $this->pagination.= \"..\";\n\t\t\t for($counter = $last_page - (2 + ($this->adjacents * 2)); $counter <= $last_page; $counter++)\n\t\t\t {\n\t\t\t\t if($counter == $page)\n\t\t\t\t\t\t$this->pagination.= \"<span class='current'>$counter</span>\";\n\t\t\t\t else\n\t\t\t\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($counter).$this->searching_val.\");'>$counter</a>\"; \n\t\t\t }\n\t\t }\n\t\t}\n\t\tif($page < $counter - 1)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' onClick='\".$js_function_name.\"(\".($next).$this->searching_val.\");'>Next »</a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>Next »</span>\";\n\n\t\tif($page < $last_page)\n\t\t\t$this->pagination.= \"<a href='javascript:void(0);' title='this is last' onClick='\".$js_function_name.\"(\".($last_page).$this->searching_val.\");'>Last »</a>\";\n\t\telse\n\t\t\t$this->pagination.= \"<span class='disabled'>Last »</span>\";\n\n\t\t$this->pagination.= \"</div>\"; \n\t }\n\t}",
"public function allwebpagingAction(){\r\n\t\t $page = $this -> _request -> getParam('id');\r\n\t\t $csid = $this -> _request -> getParam('csid');\r\n\t\t if(isset($_POST['catid'])){\r\n\t\t $catid =$_POST['catid'];\r\n\t\t if(!empty($catid) && $catid!=\"\"){\r\n\t\t\t \t$catid=$catid;\r\n\t\t\t }else{\r\n\t\t\t\t $catid=0;\r\n\t\t\t\t }\r\n\t\t }else{$catid=0;}\r\n\t\t $next=$page+1;\r\n\t\t $previous=$page-1;\r\n\t\t $content=\"No Record found\";\r\n\t\t$perpage = 8;\r\n\t\t\r\n\t\t\t\r\n\t\t$obj = new Application_Model_DbTable_Websites();\r\n\t\t$cusWebModel = new Application_Model_DbTable_CustomerWebsites();\r\n\t\t$customerWbs=$cusWebModel->getByCustomerId($csid);\r\n\t\t$total =$obj->getExistCount($catid);\r\n\t\t$totalpages= ceil($total[0]['num'] / $perpage);\r\n\t\t$results =$obj->getexistingLecPaginator($page,$perpage,$catid);\r\n\t\tif(!empty($results)){\r\n\t\t\t\t$i = 0;\r\n\t\t\t\t\r\n\t\t\t\t$content='<div style=\"height:270px; vertical-align:top; overflow:auto\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr>\r\n <td class=\"navigatepage\" style=\"text-align:right;\">';\r\n\t\t\t\t\t\tif($previous>0){$content=$content. '<< <a href=\"javascript:void(0)\" onclick=\"javascript:callajax('.$previous.');\"> Previous</a>';}else{ $content=$content. '<< <a href=\"javascript:void(0)\" > Previous</a>';} $content=$content.\" \".$page.\" of \".$totalpages.\" pages\"; if($next>$totalpages){$content=$content.' <a href=\"javascript:void(0)\" >Next </a>>>';}else{$content=$content.' <a href=\"javascript:void(0)\" onclick=\"javascript:callajax('.$next.');\"> Next </a>>>';}$content=$content.'</td>\r\n </tr>\r\n </table><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\r\n \r\n ';\r\n\t\t\t\tforeach($results as $rst){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$content=$content.' <tr class=\"autoWidth\"><td >\r\n\t\t\t\t\t\t\t\t\t<input type=\"checkbox\" name=\"websites[]\" value=\"'.$rst['id'].'\"'; if(!empty($_POST[\"websites\"]) &&$_POST[\"websites\"]!=\"\" ){ $exlecarr=explode(',',$_POST[\"websites\"]); if(in_array($rst['id'],$exlecarr)){$content=$content.\"checked\";} else {\r\n\t\t\t\t\t\t\t\t\tforeach($customerWbs as $rsWb){\r\n\t\t\t\t\t\t\t\t\t if($rsWb['webId']===$rst['id']){$content=$content.\"checked\";}\r\n\t\t\t\t\t\t\t\t\t }\r\n\t\t\t\t\t\t\t\t\t }\r\n} $content=$content.' /> \r\n\t\t\t\t\t\t\t\t\t'.$rst['url'].' \r\n </td></tr>';\r\n $i++;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t$content=$content. '\r\n </table></div><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n <tr>\r\n <td class=\"navigatepage\" style=\"text-align:right;\">';\r\n\t\t\t\t\t\tif($previous>0){$content=$content. '<< <a href=\"#\" onclick=\"javascript:callajax('.$previous.');\"> Previous</a>';}else{ $content=$content. '<< <a href=\"#\" > Previous</a>';} $content=$content.\" \".$page.\" of \".$totalpages.\" pages\"; if($next>$totalpages){$content=$content.' <a href=\"#\" >Next </a>>>';}else{$content=$content.' <a href=\"#\" onclick=\"javascript:callajax('.$next.');\"> Next </a>>>';}$content=$content.'</td>\r\n </tr>\r\n </table> ';\r\n\t\t\t\t\t \r\n\t\t\t}\r\n\t\t\techo $content; die;\r\n\t\t}",
"public function getPaginated();",
"function ti_pagination(){\n\tglobal $wp_query;\n\t$total_pages = $wp_query->max_num_pages; \n\tif ( $total_pages > 1 ){\n\t\t$current_page = max( 1, get_query_var('paged') ); \n\t\techo '<div class=\"pagination\">';\n\t\techo paginate_links(array( \n\t\t\t'base' => get_pagenum_link(1) . '%_%', \n\t\t\t'format' => 'page/%#%',\n\t\t\t'current' => max( 1, get_query_var('paged') ),\n\t\t\t'total' => $wp_query->max_num_pages,\n\t\t\t'show_all' => false,\n\t\t\t'end_size' => 1,\n\t\t\t'mid_size' => 3,\n\t\t\t'prev_next' => true,\n\t\t\t'prev_text' => '<i class=\"icon-chevron-left\"></i>',\n\t\t\t'next_text' => '<i class=\"icon-chevron-right\"></i>',\n\t\t\t'type' => 'list'\n\t\t)); \n\t\techo '</div>';\n\t}\t\n}",
"public function pagina( $pagina = 1 )\n\t{\n\t\tfunction paginator_botao($label = null, $position = 1 ){\n\t\t\t$ini = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' href=$position>\"; \n\t\t\t\t\t\t\n\t\t\t$final = \" </a>\n\t\t\t </li>\";\n\t\t\t$botao = $ini . $label . $final;\n\t\t\t\n\t\t\t//var_dump($botao);\n\t\t\t//exit;\n\n\t\t\treturn $botao;\n\t\t}\n\n\t\t// para limitar\n\t\t$pagina = isset($pagina) ? (int) $pagina : 1;\n\t\tif($pagina <= 1) $pagina = 1;\n\n\t\t$reg_por_pag = 14;\n\t\t$bot_por_pag = 5;\n\n\t\t# define se o primeiro botao está ou nao desativado\n\t\tif( $pagina == 1 ){\n\t\t\t$data['btnA'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnA'] = '';\n\t\t}\n\t\t# Carrega o Model Pessoa\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$qtd_reg = $this->pessoa->get_qtde_teste(); // nao precisa fazer outro select para contar total\n\t\t$qtde_paginas = (int) ceil($qtd_reg / $reg_por_pag);\n\n\t\tif($pagina > $qtde_paginas) $pagina = 1;\n\n\t\t// INICIO DA PAGINA SERVIRA PARA APONTAR PARA O REGISTRO A SER EXIBIDO\n\t\t$inicio_pagina = ($pagina - 1) * $reg_por_pag;\n\n\t\t$this->load->model('pessoa_model', 'pessoa');\n\t\t$data['pessoas'] = $this->pessoa->get_people_pag($inicio_pagina, $reg_por_pag);\n\n\n\t\tif( $pagina == $qtde_paginas ) {\n\t\t\t$data['btnP'] = 'disable';\n\t\t} else {\n\t\t\t$data['btnP'] = '';\n\t\t}\n\t\t\n\t\t// Conteudo = \"<input id='btnOculta_\" + lin + \"' type='button' value='novo' class='btn btn-default' onclick='Ocultar(this, \\\"OcultaNovoMedicamento_1\\\")' style='float:left' />\";\n\t\t$btnA = \"\";\n\t\t$hrefBtnA = \"<?php echo base_url(\" . \"pessoas/pagina/)\" ;\n\t\t$pagina_anterior = '';\n\t\t// paginator já ira pronto para o HTML, não haverá a necessidade de <?php echo > dentro \n\t\n\t\t$botao_primeiro = \"\n\t\t\t\t\t<li class='page-item'>\n\t\t\t\t\t\t<a class='page-link' \n\t\t href= '1' >\t\t\t\t\t\t\n\t\t Primeiro\n\t\t </a>\n\t\t </li>\n\t\t\"; \n\n\t\t$botao_ultimo = paginator_botao( 'Ultimo', $qtde_paginas);\n\n\t\t//$botao = array();\n\t\t// estava dando um erro aqui 22/07/2020 de offset\n\t\t\n\n\t\tfor($i = 1; $i<= $qtde_paginas; $i ++){\n\t\t\t$botao[$i] = paginator_botao( \"$i\" , $i );\n\t\t}\n\n\t\t$botao_prev = paginator_botao( '⟪', ($pagina - 1) );\n\t\t$botao_next = paginator_botao( '⟫', ($pagina + 1) );\n\t\t\n\n\t\t$paginatorInicio = \"\n\t\t <nav aria-label='...'>\n\t\t\t\t<ul class='pagination justify-content-center'>\n\t\t\"; \n\t\t$paginatorFinal = \"\n\t\t </ul>\n\t\t </nav>\t\n\t\t\"; \n\t\t$paginator = $paginatorInicio . $paginatorFinal;\n\n\t\t$ord = $pagina;\n\t\t//echo $ord;\n\t\t//exit;\n\n\t\t\n\t\t$botoes = '';\n\n\t\tif($pagina > 1 ){\n\t\t\t if ($pagina < $qtde_paginas-$bot_por_pag){\n\t\t\t\tfor ( $i=$pagina ; $i <= ($pagina + $bot_por_pag); $i++ ){\n\t\t\t\t\t$botoes .= $botao[$i];\n\t\t\t\t\t//echo $botoes . '<br>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t$botao_primeiro .\n\t\t\t\t$botao_prev .\n\t\t\t\t$botoes . \n\t\t\t\t$botao_next .\n\t\t\t\t$botao_ultimo .\n\t\t\t\t$paginatorFinal;\n\t\t\t }\telse {\n\t\t\t\t$pagina = $qtde_paginas-$bot_por_pag + 1;\n\t\t\t }\n\t\t}\n\n\t\tif($pagina === 1){\n\t\t\tfor ( $i=1 ; $i <= $bot_por_pag; $i++ ){\n\t\t\t\t$botoes .= $botao[$i];\n\t\t\t}\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t $botoes . \n\t\t\t\t\t\t $botao_next .\n\t\t\t\t\t\t $botao_ultimo .\n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\t\tif(($pagina === $qtde_paginas) or ($pagina === $qtde_paginas-$bot_por_pag+1) ){\n\t\t\tfor ( $i=$qtde_paginas-$bot_por_pag ; $i <= $qtde_paginas; $i++ ){\n\t\t\t\tif($pagina < $qtde_paginas){\n\t\t\t\t\t$botoes .= $botao[$i];\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$paginator = $paginatorInicio . \n\t\t\t\t\t\t $botao_primeiro .\n\t\t\t\t\t\t $botao_prev .\n\t\t\t\t\t\t $botoes . \n\t\t\t\t\t\t $paginatorFinal;\n\t\t}\n\n\n\t\t$data['paginator'] = $paginator;\n\t\t$data['qtde_botoes'] = $bot_por_pag;\n\t\t$data['qtde_paginas']= $qtde_paginas;\n\t\t$data['pagina'] = $pagina;\n\t\t$data['qtd_reg'] = $qtd_reg;\n\n\n\n\t\t//Carregamos a view listarpessoa e passamos como parametro a array pessoa que guarda todos os pessoa da db pessoa\n\t\t$this->load->view('/template/cabecalho');\n\t\t#$this->load->view('barra_usuario');\n\t\t$this->load->view('listar_pessoas', $data);\n\t\t$this->load->view('/template/rodape');\n\t}",
"public function page($pagination_link, $values,$other_url){\n $total_values = count($values);\n $pageno = (int)(isset($_GET[$pagination_link])) ? $_GET[$pagination_link] : $pageno = 1;\n $counts = ceil($total_values/$this->limit);\n $param1 = ($pageno - 1) * $this->limit;\n $this->data = array_slice($values, $param1,$this->limit); \n \n \n if ($pageno > $this->total_pages) {\n $pageno = $this->total_pages;\n } elseif ($pageno < 1) {\n $pageno = 1;\n }\n if ($pageno > 1) {\n $prevpage = $pageno -1;\n $this->firstBack = array($this->functions->base_url_without_other_route().\"/$other_url/1\", \n $this->functions->base_url_without_other_route().\"/$other_url/$prevpage\");\n // $this->functions->base_url_without_other_route()./1\n // $this->firstBack = \"<div class='first-back'><a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/1'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> First\n // </a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$prevpage'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> \n // prev\n // </a></div>\";\n }\n\n // $this->where = \"<div class='page-count'>(Page $pageno of $this->total_pages)</div>\";\n $this->where = \"page $pageno of $this->total_pages\";\n if ($pageno < $this->total_pages) {\n $nextpage = $pageno + 1;\n $this->nextLast = array($this->functions->base_url_without_other_route().\"/$other_url/$nextpage\",\n $this->functions->base_url_without_other_route().\"/$other_url/$this->total_pages\");\n // $this->nextLast = \"blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$nextpage'>Next \n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i></a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$this->total_pages'>Last \n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i>\n // </a></div>\";\n }\n\n return $pageno;\n }",
"function paginator($params, $count) {\n $limit = $params->getLimit();\n if ($count > $limit && $count!=0){\n $page = $params->getPage(); \n $controllerName = strtolower(Zend_Controller_Front::getInstance()->getRequest()->getControllerName()); \n $pagination = ($page != 1)?'<span><a href=\"\"onclick=\"Grid.page('.($page-1).'); return false\"><<</a></span>':''; \n if ($page > 10){ \n $pagination .= '<a href=\"\" onclick=\"Grid.page(1); return false;\">1</a>';\n $pagination .= '<span>...</span>';\n }\n $pageSpliter = ($page - 5 >= 1 ? $page - 4 : 1);\n for ($i = $pageSpliter; ($count + $limit) / ($i*$limit) > 1 && $i < $pageSpliter + 10; $i++) {\n $pagination .= '<a href=\"\" onclick=\"Grid.page('.$i.'); return false;\" class=\"'. ($page == $i ? \"active\":\"\") .'\">'.$i.'</a>';\n } \n $lastPage = floor(($count + $limit -1) / $limit);\n if ($page < $lastPage - 10){\n $pagination .= '<span>...</span>'; \n $pagination .= '<a href=\"\" onclick=\"Grid.page('. $lastPage .'); return false;\">'.$lastPage .'</a>';\n }\n $pagination .= ($page < ($count/$limit))?'<span><a href=\"\"onclick=\"Grid.page('.($page+1).'); return false\">>></a></span>':''; \n echo '<div class=\"pagination\">'; \n echo $pagination; \n echo '</div>';\n } \n }",
"function index ($page=1){\n $this->load->model('Article_model');\n $this->load->helper('text');\n // pagination start\n // use offset and limit for pagination\n $perpage=5;\n $param['offset']=$perpage;\n $param['limit']=($page*$perpage)-$perpage; \n\n $this->load->library('pagination');\n $config['base_url']=base_url('collection/index');\n $config['total_rows']=$this->Article_model->getarticlescount(); //gives total no of articles count (param is passed to get count of the record when we search it from search bar)\n $config['per_page']=$perpage;\n $config['use_page_numbers']=true;\n\n // for pagination customizaation like bootstrap \n $config['first_link']='First'; \n $config['Last_link']='Last';\n $config['next_link']='Next'; \n $config['prev_link']='Prev'; \n $config['full_tag_open']= \"<ul class='pagination'>\";\n $config['full_tag_close']= \"</ul>\";\n $config['num_tag_open']= '<li class=\"page-item\">';\n $config['num_tag_close']= '</li>';\n $config['cur_tag_open']= \"<li class='disabled page-item'><li class='active page-item'><a href='#' class='page-link'>\";\n $config['cur_tag_close']= \"<span class='sr-only'></span></a></li>\";\n $config['next_tag_open']= \"<li class='page-item'>\";\n $config['next_tag1_close']= \"</li>\";\n $config['prev_tag_open']= \"<li class='page-item'>\";\n $config['prev_tag1_close']= \"</li>\";\n $config['first_tag_open']= \"<li class='page-item'>\";\n $config['first_tag1_close']= \"</li>\";\n $config['last_tag_open']= \"<li class='page-item'>\";\n $config['last_tag1_close']= \"</li>\";\n $config['attributes']= array('class'=>'page-link');\n\n\n\n\n $this->pagination->initialize($config);\n $links=$this->pagination->create_links();\n $data['links']=$links;\n\n \n $articles= $this->Article_model->getarticlesfront($param); //for displaying all articles \n $data['articles']=$articles;\n \n\n $this->load->view('front/collection',$data);\n\n }",
"private function getPaginatorType1($current_page = 0, $total_pages = 2, $conditions = \"\", $condition_encode = false){\n \t\t\t\t$cuppa = Cuppa::getInstance();\n $language = $cuppa->language->load();\n if($total_pages <= 1) return \"\";\n \t\t\t\t$field = \"<div class='paginator'>\";\n \t\t\t\t\t$field .= \"<ul>\";\n \t\t\t\t\t\tif($current_page > 0) $field .= \"<li><a onclick='\".$this->function_name.\"(0, \\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='First page' class='paging_far_left'></div></a></li>\";\n \t\t\t\t\t\tif($current_page > 0) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($current_page-1).\", \\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Prev page' class='paging_left'></div></a></li>\";\n \t\t\t\t\t\tif($this->pages_info) $field .= \"<li><div title='' class='current_page'>\".$cuppa->language->getValue(\"Page\",$language).\" <b>\".(@$current_page+1).\"</b> / $total_pages</div></li>\";\n \t\t\t\t\t\tif($current_page < $total_pages-1) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($current_page+1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Next page' class='paging_right'></div></a></li>\";\n \t\t\t\t\t\tif($current_page < $total_pages-1) $field .= \"<li><a onclick='\".$this->function_name.\"(\".($total_pages-1).\",\\\"\".$this->submit_form.\"\\\",\\\"\".$this->limit.\"\\\")'><div title='Last page' class='paging_far_right'></div></a></li>\";\n \t\t\t\t\t\t$field .= \"<li><div class='select_page_div'>\".$this->getPagesList($current_page, $total_pages).\"</div></li>\";\n \t\t\t\t\t$field .= \"</ul>\"; \n \t\t\t\t\t$field .= \"<input type='hidden' value='\".$current_page.\"' id='page' name='page' />\";\n $field .= \"<input type='hidden' value='' id='page_item_start' name='page_item_start' />\";\n if($condition_encode) $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.base64_encode($conditions).'\"/>';\n else $field .= '<input type=\"hidden\" id=\"conditions\" name=\"conditions\" value=\"'.$conditions.'\"/>';\n \t\t\t\t$field .= \"</div>\";\n \t\t\t\treturn $field;\n \t\t\t}",
"public function printPagination(){\n\t\tif ($_GET['id'] > 1) { \n\t\t\t$this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/1'> Prva </a>\";\n\t\t\t $this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".($this->pageid-1).\"'> < </a>\";\n\t\t\t if ($_GET['id'] > 4) { \n\t\t\t $this->returnPagination .= \"<a class='page-link'> ... </a>\";}\n\t\t}\n\n\t\tif ($_GET['id']>3) {\n\t\t\tif ($_GET['id']>($this->brredova-3)){\n\t\t\t\t$start = $_GET['id'] - 3;\n\t\t \t\t$end = $this->brredova;\n\t\t\t} else {\n\t\t\t\t$start = $_GET['id'] - 3;\n\t\t \t\t$end = $_GET['id'] + 3;\n\t\t\t}\t\n\t\t } else {\n\t\t \t$start = 1;\n\t\t \t$end = 7;\n\t\t }\n\n\t\tfor ( $this->pageid = $start; $this->pageid<=$end; $this->pageid++) {\n\n\n\t\t\tif ($_GET['id'] == $this->pageid) {\n\t\t\t\t$this->returnPagination .= \"<a class='page-link' style='color: red;' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".$this->pageid.\"'>\" . $this->pageid . \"</a>\";\n\t\t\t}else{\n\t\t\t\t $this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".$this->pageid.\"'>\" . $this->pageid . \"</a>\";\n\t\t\t}\n\t\t \n\t\t}\n\n\t\tif ($_GET['id'] < $this->brredova) { \n\t\t\t if ($_GET['id'] < $this->brredova - 3) { $this->returnPagination .= \"<a class='page-link'> ... </a>\";}\n\t\t\t $this->returnPagination .= \"<a class='page-link' title='Next' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".($_GET['id']+1).\"'> > </a>\";\n\t\t\t $this->returnPagination .= \"<a class='page-link' href='\".ROOT_URL. \"\" .$this->tablePagination.\"/\".$this->brredova.\"'> Poslednja <span class='badge badge-primary'>\". $this->brredova .\"</span></a>\";\n\t\t}\n\n\t\treturn $this->returnPagination;\n\t}",
"function pagination_reservation_client()\n {\n\n $this->load->library(\"pagination\");\n $config = array();\n $config[\"base_url\"] = \"#\";\n $config[\"total_rows\"] = $this->crud_model->count_all_reservations();\n $config[\"per_page\"] = 4;\n $config[\"uri_segment\"] = 3;\n $config[\"use_page_numbers\"] = TRUE;\n $config[\"full_tag_open\"] = '<ul class=\"pagination pagination2\">';\n $config[\"full_tag_close\"] = '</ul>';\n $config[\"first_tag_open\"] = '<li class=\"page-item\">';\n $config[\"first_tag_close\"] = '</li>';\n $config[\"last_tag_open\"] = '<li class=\"page-item\">';\n $config[\"last_tag_close\"] = '</li>';\n $config['next_link'] = '<li class=\"page-item active\"><i class=\"btn btn-info\">>></i>';\n $config[\"next_tag_open\"] = '<li class=\"page-item\">';\n $config[\"next_tag_close\"] = '</li>';\n $config[\"prev_link\"] = '<li class=\"page-item active\"><i class=\"btn btn-info\"><<</i>';\n $config[\"prev_tag_open\"] = \"<li class='page-item'>\";\n $config[\"prev_tag_close\"] = \"</li>\";\n $config[\"cur_tag_open\"] = \"<li class='page-item active'><a href='#' class='page-link'>\";\n $config[\"cur_tag_close\"] = \"</a></li>\";\n $config[\"num_tag_open\"] = \"<li class='page-item'>\";\n $config[\"num_tag_close\"] = \"</li>\";\n $config[\"num_links\"] = 1;\n $this->pagination->initialize($config);\n $page = $this->uri->segment(3);\n $start = ($page - 1) * $config[\"per_page\"];\n\n $output = array(\n 'pagination_link' => $this->pagination->create_links(),\n 'country_table' => $this->crud_model->fetch_detail_reservations($config[\"per_page\"], $start)\n );\n echo json_encode($output);\n }",
"function onlyPagging($page,$per_page,$totallink,$dpaging = 0,$prevnext = 0,$withpagging = 1,$extrapara='',$paggingtype='get',$paggingfunction='',$temp_pagevars='')\n\t{\n\t if($withpagging==1)\n\t {\n\t\t if($paggingtype==\"get\")\n\t\t {\n\t\t\t if($prevnext==1)\n\t\t\t {\n\t\t\t\t if (count($this->InfoArray[\"PAGE_NUMBERS\"])>1)\n\t\t\t\t {\n\t\t\t\t\t /* Print our first link */ \n\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"]!= 1) \n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \"<a href='$PHP_SELF?page=1\".$extrapara.\"'>First</a> \"; \n\t\t\t\t\t }\n\t\t\t\t\t /* Print out our prev link */ \n\t\t\t\t\t if($this->InfoArray[\"PREV_PAGE\"]) \n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \"<a class='link' href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"PREV_PAGE\"].$extrapara.\"'>Previous</a> \"; \n\t\t\t\t\t }\n\t\t\t\t\t /* Print out our next link */ \n\t\t\t\t\t if($this->InfoArray[\"NEXT_PAGE\"]) { \n\t\t\t\t\t\t //echo \" <a class='link' href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"NEXT_PAGE\"].$extrapara.\"'>Next</a> \"; \n\t\t\t\t\t } else { \n\t\t\t\t\t\t //echo \" Next \"; \n\t\t\t\t\t } \n\t\t\t\t }\n\t\t\t\t}\n\t\t\t \n\t\t\t if($dpaging==1 || $dpaging==2)\n\t\t\t {\n\t\t\t\t if (count($this->InfoArray[\"PAGE_NUMBERS\"])>1)\n\t\t\t\t {\n\t\t\t\t\t\tif($dpaging==2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t /* Example of how to print our number links! */ \n\t\t\t\t\t\t echo \"<table border='0' cellpadding='3' cellspacing='1'><tr>\";\n\t\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"]!= 1) \n\t\t\t\t\t \t { \n\t\t\t\t\t\t \techo \"<td><a class='link_top' href='$PHP_SELF?\".$this->Paging->PageVarName.\"=1\".$extrapara.\"'>First</a></td>\"; \n\t\t\t\t\t \t }\n\t\t\t\t\t\t if($this->InfoArray[\"PREV_PAGE\"]) \n\t\t\t\t\t \t { \n\t\t\t\t\t\t \techo \"<td><a class='link_top' href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"PREV_PAGE\"].$extrapara.\"'>Previous</a></td>\"; //<img src='img/prev.png' border='0'/>\n\t\t\t\t\t }\n\t\t\t\t\t\t echo \"<td><div class='b_pager'><table border='0' cellpadding='0' cellspacing='0'><tr>\";\n\t\t\t\t\t\t for($i=0; $i<count($this->InfoArray[\"PAGE_NUMBERS\"]); $i++) \n\t\t\t\t\t\t { \n\t\t\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"] == $this->InfoArray[\"PAGE_NUMBERS\"][$i])\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\techo \"<td align='center' width='20' height=18><b>\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\"</b></td>\"; \n\t\t\t\t\t\t\t\t //echo $this->InfoArray[\"PAGE_NUMBERS\"][$i] . \"\"; \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo \"<td align='center' width='20' height=18><a href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].$extrapara.\"'>\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\"</a></td>\"; \n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t } \n\t\t\t\t\t\t echo \"</tr></table></div></td>\";\n\t\t\t\t\t }\n\t\t\t\t\t /* Print out our next link */ \n\t\t\t\t\t if($this->InfoArray[\"NEXT_PAGE\"]) { \n\t\t\t\t\t\t echo \"<td><a class='link_top' href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\".$this->InfoArray[\"NEXT_PAGE\"].$extrapara.\"'>Next</a></td>\"; \n\t\t\t\t\t } else { \n\t\t\t\t\t\t //echo \" Next \"; \n\t\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t /* Print our last link */ \n\t\t\t\t\t if($InfoArray[\"CURRENT_PAGE\"]!= $this->InfoArray[\"TOTAL_PAGES\"])\n\t\t\t\t\t { \n\t\t\t\t\t\t echo \"<td><a class='link_top' href='$PHP_SELF?\".$this->Paging->PageVarName.\"=\" . $this->InfoArray[\"TOTAL_PAGES\"].$extrapara.\"'>Last</a></td></tr></table>\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \" >>\"; \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}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($prevnext==1)\n\t\t\t {\n\t\t\t\t\t/* Print out our prev link */ \n\t\t\t\t\t if (count($this->InfoArray[\"PAGE_NUMBERS\"])>1)\n\t\t\t\t\t {\n\t\t\t\t\t if($this->InfoArray[\"PREV_PAGE\"]) \n\t\t\t\t\t { \n\t\t\t\t\t\t echo \"<a class='link_top' href=javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"PREV_PAGE\"].\",'\".$temp_pagevars.\"');><img src='images/bt_previous.gif' border='0' /></a> \"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t // echo \"Previous | \"; \n\t\t\t\t\t } \n\t\t\t\t\t /* Print out our next link */ \n\t\t\t\t\t if($this->InfoArray[\"NEXT_PAGE\"]) { \n\t\t\t\t\t\t echo \" <a class='bluelink' href=javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"NEXT_PAGE\"].\",'\".$temp_pagevars.\"');><img src='images/bt_next.gif' border='0' /></a> \"; \n\t\t\t\t\t\t // echo \" <a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"NEXT_PAGE\"].\",'\".$temp_pagevars.\"');' class='link2'>Next >></a> \"; \n\t\t\t\t\t } else { \n\t\t\t\t\t\t //echo \" Next \"; \n\t\t\t\t\t }\n\t\t\t\t\t } \n\t\t\t\t}\t\t\t \n\t\t\t\tif($dpaging==1 || $dpaging==2)\n\t\t\t\t{\n\t\t\t\t if (count($this->InfoArray[\"PAGE_NUMBERS\"])>1)\n\t\t\t\t {\n\t\t\t\t\t\t/* Print our first link */ \n\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"]!= 1) \n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \"<a href='javascript:\".$paggingfunction.\"(1);'>First</a> \"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \"<< \"; \n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t /* Print out our prev link */ \n\t\t\t\t\t if($InfoArray[\"PREV_PAGE\"]) \n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \"<a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"PREV_PAGE\"].\");'>Previous</a> | \"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t // echo \"Previous | \"; \n\t\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t\tif($dpaging==2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t /* Example of how to print our number links! */ \n\t\t\t\t\t\t /* Example of how to print our number links! */ \n\t\t\t\t\t\t echo \"<div class='b_pager'><table border='0' cellpadding='0' cellspacing='0'><tr>\";\n\t\t\t\t\t\t for($i=0; $i<count($this->InfoArray[\"PAGE_NUMBERS\"]); $i++) \n\t\t\t\t\t\t { \n\t\t\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"] == $this->InfoArray[\"PAGE_NUMBERS\"][$i])\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\techo \"<td align='center' width='20' height=18><b>\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\"</b></td>\"; \n\t\t\t\t\t\t\t\t //echo $this->InfoArray[\"PAGE_NUMBERS\"][$i] . \"\"; \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo \"<td align='center' width='20' height=18 ><a href=javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\",'\".$temp_pagevars.\"');>\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\"</a></td>\"; \n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t } \n\t\t\t\t\t\t echo \"</tr></table></div>\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t /* for($i=0; $i<count($this->InfoArray[\"PAGE_NUMBERS\"]); $i++) \n\t\t\t\t\t\t { \n\t\t\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"] == $this->InfoArray[\"PAGE_NUMBERS\"][$i])\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo $this->InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \"; \n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t echo \"<a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\");'>\".$this->InfoArray[\"PAGE_NUMBERS\"][$i].\"</a> | \"; \n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t } */\n\t\t\t\t\t }\n\t\t\t\t\t /* Print out our next link */ \n\t\t\t\t\t if($InfoArray[\"NEXT_PAGE\"]) { \n\t\t\t\t\t\t // echo \" <a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"NEXT_PAGE\"].\");'>Next</a> \"; \n\t\t\t\t\t } else { \n\t\t\t\t\t\t //echo \" Next \"; \n\t\t\t\t\t } \n\t\t\t\t\t\n\t\t\t\t\t /* Print our last link */ \n\t\t\t\t\t if($this->InfoArray[\"CURRENT_PAGE\"]!= $this->InfoArray[\"TOTAL_PAGES\"])\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \" <a href='javascript:\".$paggingfunction.\"(\".$this->InfoArray[\"NEXT_PAGE\"].\");'>Last</a>\"; \n\t\t\t\t\t }\n\t\t\t\t\t else\n\t\t\t\t\t { \n\t\t\t\t\t\t //echo \" >>\"; \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}\n\t\t}\n\t}",
"public function page_list($limit='0')\n\t{\n\t\tif(!$this->session->userdata('logged_in')){\n\t\t\tredirect('login');\n\t\t\t\n\t\t}\n\t\t$logged_in=$this->session->userdata('logged_in');\n\t\tif($logged_in['base_url'] != base_url()){\n\t\t$this->session->unset_userdata('logged_in');\t\t\n\t\tredirect('login');\n\t\t}\n\t\t\n\t \t\t$logged_in=$this->session->userdata('logged_in');\n $acp=explode(',',$logged_in['setting']);\n\t\t\tif(!in_array('All',$acp)){\n\t\t\texit($this->lang->line('permission_denied'));\n\t\t\t}\n\t\t\t\n\t\t\n\t\t \t \n\t\t\t\n\t\t\t\n\t $data['title']=$this->lang->line('page_list');\n\t\t\t\t$data['result']=$this->Cms_model->page_list_all($limit);\n\t\t\t\t \n\t\t$this->load->view('header',$data);\n\t\t $this->load->view('page_list',$data);\n\t\t$this->load->view('footer',$data);\n\t}",
"public function setPagination($limit, $offset = 0);",
"function pagination($pages = '', $range = 4)\n\n{\n\n $showitems = ($range * 2)+1; \n\n global $paged;\n\n if(empty($paged)) $paged = 1;\n\n if($pages == '')\n\n {\n\n global $wp_query;\n\n $pages = $wp_query->max_num_pages;\n\n if(!$pages)\n\n {\n\n $pages = 1;\n\n }\n\n } \n\n if(1 != $pages)\n\n {\n\n echo \"<div class=\\\"pagination\\\">\";\n\n if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo \"<a href='\".get_pagenum_link(1).\"'>« Prva</a>\";\n\n if($paged > 1 && $showitems < $pages) echo \"<a href='\".get_pagenum_link($paged - 1).\"'>‹ Prethodna</a>\";\n\n\n\n for ($i=1; $i <= $pages; $i++)\n\n {\n\n if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))\n\n {\n\n echo ($paged == $i)? \"<span class=\\\"current\\\">\".$i.\"</span>\":\"<a href='\".get_pagenum_link($i).\"' class=\\\"inactive\\\">\".$i.\"</a>\";\n\n }\n\n }\n\n\n\n if ($paged < $pages && $showitems < $pages) echo \"<a href=\\\"\".get_pagenum_link($paged + 1).\"\\\">Sledeca ›</a>\";\n\n if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo \"<a href='\".get_pagenum_link($pages).\"'>Poslednja »</a>\";\n\n echo \"</div>\\n\";\n\n }\n\n}",
"function paginacion($fields,$fielsView,$pagina=0,$totalNumbersView=10)\n{\n\tif($fields>$fielsView)\n\t{\n\t\techo \"<div class='paginacion'>\";\n\t\t\t# Mostramos anterior y inicio\n\t\t\tif($pagina>1)\n\t\t\t{\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=1' class='pageOk'>Inicio</a>\";\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".($pagina-1).\"' class='pageOk'>Anterior</a>\";\n\t\t\t}else{\n\t\t\t\techo \"<span class='pageKo'>Inicio</span><span class='pageKo'>Anterior</span>\";\n\t\t\t}\n\t\t\t\n\t\t\t# Mostramos los valores intermedios\n\t\t\t$totalPage=ceil($fields/$fielsView);\n\t\t\t$pageStart=1;\n\t\t\t$pageEnd=$totalPage;\n\t\t\tif($totalPage>$totalNumbersView)\n\t\t\t{\n\t\t\t\t# Si estamos en una posicion superior a la pagina 10...\n\t\t\t\tif($page>($totalNumbersView/2))\n\t\t\t\t\t$pageStart=$page-($totalNumbersView/2);\n\t\t\t\t# Si la pagina actual + 10 es inferior al total...\n\t\t\t\tif($page+($totalNumbersView/2)<$totalPage)\n\t\t\t\t\t$pageEnd=$page+($totalNumbersView/2);\n\t\t\t}\n\t\t\tif($pageEnd-$pageStart<$totalNumbersView && $totalPage>$totalNumbersView)\n\t\t\t{\n\t\t\t\tif($pageStart==1)\n\t\t\t\t\t$pageEnd=$page+($totalNumbersView/2)+(($totalNumbersView/2)-$page)+1;\n\t\t\t\tif($pageEnd==$totalPage)\n\t\t\t\t\t$pageStart=$page-($totalNumbersView/2)-(($page-$totalPage)+($totalNumbersView/2));\n\t\t\t}\n\n\t\t\t# Mostramos los numeros de de paginas\n\t\t\tfor($i=$pageStart;$i<=$pageEnd;$i++)\n\t\t\t{\n\t\t\t\tif ($i==$pagina)\n\t\t\t\t\techo \"<span class='pageSelect'> \".$i.\" </span>\";\n\t\t\t\telse{\n\t\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".$i.\"' class='pageOk'>\".$i.\"</a>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t# Mostramos siguiente y fin\n\t\t\tif($pagina<$totalPage)\n\t\t\t{\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".($pagina+1).\"' class='pageOk'>Siguiente</a>\";\n\t\t\t\techo \"<a href='\".$_SERVER[\"PHP_SELF\"].\"?pagina=\".$totalPage.\"' class='pageOk'>Final</a>\";\n\t\t\t}else{\n\t\t\t\techo \"<span class='pageKo'>Siguiente</span><span class='pageKo'>Final</span>\";\n\t\t\t}\n\t\techo \"</div>\";\n\t}\n}",
"function pagination_view_product()\n\t\t{\n\n\t\t $this->load->library(\"pagination\");\n\t\t $config = array();\n\t\t $config[\"base_url\"] = \"#\";\n\t\t $config[\"total_rows\"] = $this->crud_model->count_all_view_product();\n\t\t $config[\"per_page\"] = 10;\n\t\t $config[\"uri_segment\"] = 3;\n\t\t $config[\"use_page_numbers\"] = TRUE;\n\t\t $config[\"full_tag_open\"] = '<ul class=\"nav pagination\">';\n\t\t $config[\"full_tag_close\"] = '</ul>';\n\t\t $config[\"first_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"first_tag_close\"] = '</li>';\n\t\t $config[\"last_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"last_tag_close\"] = '</li>';\n\t\t $config['next_link'] = '<li class=\"page-item active\"><i class=\"btn btn-info\">>></i>';\n\t\t $config[\"next_tag_open\"] = '<li class=\"page-item\">';\n\t\t $config[\"next_tag_close\"] = '</li>';\n\t\t $config[\"prev_link\"] = '<li class=\"page-item active\"><i class=\"btn btn-info\"><<</i>';\n\t\t $config[\"prev_tag_open\"] = \"<li class='page-item'>\";\n\t\t $config[\"prev_tag_close\"] = \"</li>\";\n\t\t $config[\"cur_tag_open\"] = \"<li class='page-item active'><a href='#' class='page-link'>\";\n\t\t $config[\"cur_tag_close\"] = \"</a></li>\";\n\t\t $config[\"num_tag_open\"] = \"<li class='page-item'>\";\n\t\t $config[\"num_tag_close\"] = \"</li>\";\n\t\t $config[\"num_links\"] = 1;\n\t\t $this->pagination->initialize($config);\n\t\t $page = $this->uri->segment(3);\n\t\t $start = ($page - 1) * $config[\"per_page\"];\n\n\t\t $output = array(\n\t\t 'pagination_link' => $this->pagination->create_links(),\n\t\t 'country_table' => $this->crud_model->fetch_details_view_product($config[\"per_page\"], $start)\n\t\t );\n\t\t echo json_encode($output);\n\t\t}",
"function horizon_theme_paging_nav() {\n\t\t$mid = 2; // Total of items that will show along with the current page.\n\t\t$end = 1; // Total of items displayed for the last few pages.\n\t\t$show = false; // Show all items.\n\n\t\techo horizon_theme_pagination( $mid, $end, false );\n\t}",
"function pagination($tbl_name,$fields,$where='',$orderby='',$page_url,$pagesize,$page_no,$print='')\n\t{\n\t\t$pagesize=($pagesize)?$pagesize:10;\n\t\tif($where)$where=\" WHERE \".$where;\n\t\tif($orderby)$orderby=\" ORDER BY \".$orderby;\n\t $sql1=\"SELECT 1 FROM \".$tbl_name.$where.$orderby;\n\t\t//$sql1=\"SELECT \".$fields.\" FROM \".$tbl_name.$where.$orderby;\n\n\t\t$rowsperpage = $pagesize;\n\t\t$website = $page_url; \n\t\t/*\n\t\t#valid page no. check \n\t\t$check=$pagesize*$page_no;\n\t\t$qsql1 = @mysql_query($sql1) or die(\"failed\");\n\t\t$RecordCount = mysql_num_rows($qsql1);\n\t\t\n\t\t\n\t\tif($check>$RecordCount)\n\t\t{\n\t\t\tif((($check-$RecordCount)>$pagesize))\n\t\t\t{\n\t\t\t\t$this->divert($page_url);\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t \n\t\t\n\t\t$pagination = new AM_CSSPagination_admin($sql1, $rowsperpage, $website); \n\t\t$pagination->setPage($page_no);\n\t\t\n\t\t//$qsql1 = @mysql_query($sql1) or die(\"failed\");\n\t\t//$RecordCount = mysql_num_rows($qsql1);\n\t\t\n\t\t\n\t\t\n\t\t$sql2 = \"select \".$fields.\" FROM \".$tbl_name.$where.$orderby.\" LIMIT \".$pagination->getLimit() . \", \". $rowsperpage; \n\t\tif($print)\n\t\techo $sql2;\n\t\t$result_query = @mysql_query($sql2);\n\t\t$page = $pagination->showPage();\n\t\t$RecordCount=$pagination->retrunTotalRows();\n\t\t\n\t\t#valid page no. check\n\t\t$check=$pagesize*$page_no; \n\t\tif($check>$RecordCount)\n\t\t{\n\t\t\tif((($check-$RecordCount)>$pagesize))\n\t\t\t{\n\t\t\t\t$this->divert($page_url);\n\t\t\t}\n\t\t}\n\t\t$resultArr = array();\n\t\tif($RecordCount>1)\n\t\t{\n\t\t\twhile($res = mysql_fetch_assoc($result_query))\n\t\t\t{\n\t\t\t\t$resultArr[] = $res;\n\t\t\t}\n\t\t}\n\t\telse if($RecordCount==1)\n\t\t{\n\t\t\t$res = mysql_fetch_assoc($result_query);\n\t\t\t$resultArr[] = $res;\n\t\t}\n\t\t$array_res\t=\tarray('result'=>$resultArr,'page'=>$page,'nr'=>$RecordCount);\n\t\treturn $array_res;\n\t}",
"public function index(){\n //konfigurasi pagination\n $config['base_url'] = site_url('C_SuratBebas/index'); //site url\n $config['total_rows'] = $this->db->count_all('surat_bebas_labkom'); //total row\n $config['per_page'] = 10; //show record per halaman\n $config[\"uri_segment\"] = 3; // uri parameter\n $choice = $config[\"total_rows\"] / $config[\"per_page\"];\n $config[\"num_links\"] = floor($choice);\n \n // Membuat Style pagination untuk BootStrap v4\n $config['first_link'] = 'First';\n $config['last_link'] = 'Last';\n $config['next_link'] = 'Next';\n $config['prev_link'] = 'Prev';\n $config['full_tag_open'] = '<div class=\"pagging text-center\"><nav><ul class=\"pagination justify-content-center\">';\n $config['full_tag_close'] = '</ul></nav></div>';\n $config['num_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['num_tag_close'] = '</span></li>';\n $config['cur_tag_open'] = '<li class=\"page-item active\"><span class=\"page-link\">';\n $config['cur_tag_close'] = '<span class=\"sr-only\">(current)</span></span></li>';\n $config['next_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['next_tagl_close'] = '<span aria-hidden=\"true\">»</span></span></li>';\n $config['prev_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['prev_tagl_close'] = '</span>Next</li>';\n $config['first_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['first_tagl_close'] = '</span></li>';\n $config['last_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['last_tagl_close'] = '</span></li>';\n \n $this->pagination->initialize($config);\n $data['page'] = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n \n //panggil function get_mahasiswa_list yang ada pada mmodel M_SuratBebas. \n $data['data'] = $this->M_SuratBebas->get_data($config[\"per_page\"], $data['page']); \n \n $data['pagination'] = $this->pagination->create_links();\n\n $this->load->view('Layouts/header');\n $this->load->view('Layouts/navbar');\n $this->load->view('Layouts/sidebar');\n $this->load->view('SuratBebas/V_list',$data);\n $this->load->view('Layouts/footer'); \n }",
"function pagination($query, $per_page, $page, $url){\n\t\tglobal $con;\n\t\t$query = \"SELECT COUNT(*) as `num` FROM {$query}\";\n\t\t$row = mysqli_fetch_array(mysqli_query($con, $query));\n\t\t$total = $row['num'];\n\t\t$adjacents = \"2\"; \n\t\t \n\t\t$prevlabel = \"‹ Prev\";\n\t\t$nextlabel = \"Next ›\";\n\t\t$lastlabel = \"Last ››\";\n\t\t \n\t\t$page = ($page == 0 ? 1 : $page); \n\t\t$start = ($page - 1) * $per_page; \n\t\t \n\t\t$prev = $page - 1; \n\t\t$next = $page + 1;\n\t\t \n\t\t$lastpage = ceil($total/$per_page);\n\t\t \n\t\t$lpm1 = $lastpage - 1; // //last page minus 1\n\t\t \n\t\t$pagination = \"\";\n\t\tif($lastpage > 1){ \n\t\t\t$pagination .= \"<ul class='pagination'>\";\n\t\t\t$pagination .= \"<li class='page_info'>Page {$page} of {$lastpage}</li>\";\n\t\t\t\t \n\t\t\t\tif ($page > 1) $pagination.= \"<li><a href='{$url}page={$prev}'>{$prevlabel}</a></li>\";\n\t\t\t\t \n\t\t\tif ($lastpage < 7 + ($adjacents * 2)){ \n\t\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++){\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t}\n\t\t\t \n\t\t\t} elseif($lastpage > 5 + ($adjacents * 2)){\n\t\t\t\t \n\t\t\t\tif($page < 1 + ($adjacents * 2)) {\n\t\t\t\t\t \n\t\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++){\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= \"<li>...</li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lpm1}'>{$lpm1}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lastpage}'>{$lastpage}</a></li>\"; \n\t\t\t\t\t\t \n\t\t\t\t} elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) {\n\t\t\t\t\t \n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=1'>1</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=2'>2</a></li>\";\n\t\t\t\t\t$pagination.= \"<li>...</li>\";\n\t\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) {\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= \"<li>..</li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lpm1}'>{$lpm1}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lastpage}'>{$lastpage}</a></li>\"; \n\t\t\t\t\t \n\t\t\t\t} else {\n\t\t\t\t\t \n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=1'>1</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=2'>2</a></li>\";\n\t\t\t\t\t$pagination.= \"<li>..</li>\";\n\t\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) {\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\t\tif ($page < $counter - 1) {\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$next}'>{$nextlabel}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=$lastpage'>{$lastlabel}</a></li>\";\n\t\t\t\t}\n\t\t\t \n\t\t\t$pagination.= \"</ul>\"; \n\t\t}\n\t\t \n\t\treturn $pagination;\n\t}",
"function itstar_pagination(){\n global $wp_query;\n\n if($wp_query->max_num_pages > 1){\n if('item' !== get_post_type() ){\n $big = 999999999;\n echo /*__('Page : ','itstar').*/paginate_links( array(\n 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n 'format' => '?paged=%#%',\n 'current' => max( 1, get_query_var('paged') ),\n 'total' => $wp_query->max_num_pages,\n 'prev_text' => __('<i class=\"fa fa-angle-double-left\"></i>','itstar'),\n 'next_text' => __('<i class=\"fa fa-angle-double-right\"></i>','itstar')\n ) );\n } else {\n $big = 999999999;\n echo /*__('Page : ','itstar').*/paginate_links( array(\n 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),\n 'format' => '?paged=%#%',\n 'current' => max( 1, get_query_var('paged') ),\n 'total' => $wp_query->max_num_pages,\n 'prev_text' => __('<i class=\"fa fa-angle-double-left\"></i>','itstar'),\n 'next_text' => __('<i class=\"fa fa-angle-double-right\"></i>','itstar')\n ) );\n }\n }\n}",
"public function Carregar_Pagina() : void\n {\n $view = $this->Retornar_Pagina();\n \n $view->set_peca_id($this->obj_contato_anunciante->get_obj_peca()->get_id());\n \n $view->Executar();\n }",
"public function GetRecentNewsPaginate() {\n if(isset($_GET['pagPage'])){\n try {\n $paginationPage = $_GET['pagPage'];\n $model = new News(Database::instance());\n $paginationData = $model->GetRecentPostsPagination($paginationPage);\n\n $this->json($paginationData);\n } catch (\\PDOException $ex) {\n $this->errorLog(\"GetRecentNewsPaginate()25\", $ex->getMessage());\n\n }\n } else {\n //u slucaju da nema parametar kroz url dobija vrdnost 0 i ispisuje prvih 5 recent news na home page\n try {\n $paginationPage = 0;\n $model = new News(Database::instance());\n $paginationData = $model->GetRecentPostsPagination($paginationPage);\n\n $this->json($paginationData);\n } catch (\\PDOException $ex) {\n $this->errorLog(\"GetRecentNewsPaginate()37\", $ex->getMessage());\n }\n\n }\n\n }",
"function pagingSubAll($CategoryID, $SubCatLimitNext, $ProductLimitNext, $SubCatLimitPrevious, $ProductLimitPrevious, $pageID)\n{\n global $db;\n \n $numberofProductsinCategory = $db->query(\"SELECT p1.ProductID, p1.SubCategoryID, s1.SubCategoryID, s1.CategoryID FROM Products as p1 JOIN SubCategories as s1 WHERE p1.SubCategoryID = s1.SubCategoryID AND s1.CategoryID='$CategoryID'\")->num_rows;\n \n \n \n echo 'Nombre d\\'items: <strong>';\n echo $numberofProductsinCategory;\n echo '</strong><br /><br />';\n \n \n \n if ($pageID == 1) {\n \n \n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitNext,$ProductLimitNext,$pageID)'>Suivant >></a>\";\n echo \" \";\n \n \n }\n \n elseif ($pageID == 0) {\n \n \n \n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitPrevious,$ProductLimitPrevious,$pageID)'><< Précédent</a>\";\n \n \n }\n \n else {\n \n \n If ($SubCatLimitPrevious == 0 && $ProductLimitPrevious == 0) {\n echo \"<a href='#' onclick='SelectAllSubFirstPage($CategoryID)'><< Précédent</a>\";\n } else {\n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitPrevious,$ProductLimitPrevious,$pageID)'><< Précédent</a>\";\n }\n echo \" \";\n echo \"<a href='#' onclick='SelectAllSubNextPage($CategoryID,$SubCatLimitNext,$ProductLimitNext,$pageID)'>Suivant >></a>\";\n echo \" \";\n \n }\n \n \n}",
"function pagination($page_count,$page,$browse_range=3,$show_last=true)\n {\n if($page_count>1)\n {\n $xpagination['current'] = $page;\n if($page_count > $page)\n {\n $xpagination['next'] = $page+1;\n }\n else\n {\n $xpagination['next'] = 0;\n }\n if($page > 1)\n {\n $xpagination['previous'] = $page-1;\n }\n else\n {\n $xpagination['previous'] = 0;\n }\n $xpagination['items'][] = 1;\n if ($page > $browse_range+1) $xpagination['items'][] = 0;\n $n_range = $page-($browse_range-1);\n $p_range = $page+$browse_range;\n for($page_browse=$n_range; $page_browse<$p_range; $page_browse++)\n {\n if($page_browse > 1 && $page_browse <= $page_count) $xpagination['items'][] = $page_browse;\n }\n if($show_last)\n {\n if($page < $page_count-($browse_range)) $xpagination['items'][] = 0;\n if(!in_array($page_count,$xpagination['items'])) $xpagination['items'][] = $page_count;\n }\n return $xpagination;\n }\n return false;\n }",
"private function _pagination()\n {\n\n if (Request::has('pq_curpage') && Request::has('pq_rpp')) {\n $columnsTemp = $this->_columnsRaw;\n $pq_curPage = Request::input('pq_curpage');\n $pq_rPP = Request::input('pq_rpp');\n $queryTemp = new \\stdClass();\n $queryTemp = $this->_getQueryStatement();\n $queryTemp->columns = null;\n\n // Verifica si existe algun filtro para aplicarlo al COUNT y determinar cuantos registros hay en la consulta\n if (property_exists($this->_filterTable, 'query')) {\n $queryTemp->whereRaw($this->_filterTable->query, $this->_filterTable->param);\n }\n\n $totalRecordQuery = $queryTemp->count();\n $this->_query->columns = $columnsTemp;\n\n $skip = ($pq_rPP * ($pq_curPage - 1));\n\n if ($skip >= $totalRecordQuery) {\n $pq_curPage = ceil($totalRecordQuery / $pq_rPP);\n $skip = ($pq_rPP * ($pq_curPage - 1));\n }\n\n // Make limit to query\n $this->_query->offset($skip)\n ->limit($pq_rPP);\n\n $this->_paginationLimit = [\n 'totalRecords' => $totalRecordQuery,\n 'curPage' => $pq_curPage,\n ];\n }\n }",
"public function getPageSize();",
"function paginaton_link_custom($total_rows, $pageurl, $limit = 2, $per_page = 1) \n {\n $ci = & get_instance();\n $current_page_total = $limit * $per_page;\n $current_page_start = ($current_page_total - $limit) + 1;\n if ($current_page_total > $total_rows) {\n $current_page_start = ($current_page_total - $limit) + 1;\n $current_page_total = $total_rows;\n }\n $config['total_rows'] = $total_rows;\n $config['base_url'] = base_url() . $pageurl;\n $config['per_page'] = $limit;\n $config['full_tag_open'] = \"<div class='row pagination_display'> <div class='col-lg-6 col-sm-6 col-xs-6'><div id='data-count'><span class='count-text'>Showing $current_page_start to $current_page_total of $total_rows entries </span></div></div><div class='col-lg-6 col-sm-6 col-xs-6'> <div class='paination-wraper pull-right'> <ul id='custom_pagination'>\";\n $config['full_tag_close'] = \"</ul> </div> </div> </div>\";\n $config['page_query_string'] = true;\n $config['num_links'] = 20;\n $config['uri_segment'] = 2;\n $config['use_page_numbers'] = true;\n $config['cur_tag_open'] = '<li><a href=\"javascript:void(0);\" class=\"active\" >';\n $config['cur_tag_close'] = '</a></li>';\n $config['next_link'] = 'Next';\n $config['next_tag_open'] = '<li class=\"page_next_tag\">';\n $config['next_tag_close'] = '</li>';\n $config['prev_link'] = 'Previous';\n $config['prev_tag_open'] = '<li>';\n $config['prev_tag_close'] = '</li>';\n $config['last_tag_open'] = '<li class=\"page_last_tag\">';\n $config['last_tag_close'] = '</li>';\n $config['first_tag_open'] = '<li class=\"page_first_tag\">';\n $config['first_tag_close'] = '</li>';\n $config['num_link'] = '<a href=\"javascript:void(0);\" class=\"\"></a>';\n $config['num_tag_open'] = '<li class=\"pag_num_tag\">';\n $config['num_tag_close'] = '</a></li>';\n\n $ci->pagination->initialize($config);\n $pagination = $ci->pagination->create_links();\n return $pagination;\n }",
"public function getItemsPerPage();",
"public function getItemsPerPage();",
"function register_block_core_query_pagination()\n {\n }",
"public function getPaginationDataSource();",
"public function m_paging($form,$count,$start,$limit,$sql) {\n\n\t//count the rows of the query\n\t\t$sql = \"select count(*) as 'total' $sql limit 1\";\n\n\t\t$result = o_db::m_select($sql);\n\t\t$total = $result[0]['total'];\n\n\t//echo \"$total <br> $count\";\n\n\t\tif ($total == 0 || $count == 0)\n\t\t\treturn 0;\n\t\tif ($start > $total)\n\t\t\treturn 0;\n\n\t//the page requested is the current page plus the number of rows passed for the current page\n\t//this way, if there are less than the limit of results for the requested page\n\t//(eg. a limit range could be 1-50, but only 32 rows were retrieved, so we would show 1-32)\n\t\t$place = $start + $count;\n\n\t//if the whole result set for the sql query is the same amount as the current page passed\n\t//then paging is NOT needed because there is only 1 page of results available for the query\n\t\tif ($total >= $place)\n\t\t{\n\t\t//displayed in the colored box on the left of the paging block\n\t\t\t$range = ($start + 1).\" - \".$place.\" / $total\";\n\t\t\t$this->page_range = $range;\n\t\t} //end if\n\n\t\tif ($total > $count)\n\t\t{\n\n\t\t//get the results per page select menu\n\t\t\t_esrs::m_menu_page_limits($form);\n\t\t//get the page to display select menu\n\t\t\t_esrs::m_menu_display_page($form,$start,$total,$limit);\n\n\t\t} //end if\n\n\t//determin which buttons should appear on the requested page\n\t//the first page has only a next button, no previous\n\t//the last page has only a previous button, no next\n\n\t//if the total number of rows available in the dataset equals where we're at\n\t//then do NOT paint a next button\n\t\t$this->next_butt = (($total > $place) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_next\\\" value=\\\"Next $limit\\\">\" : \" \");\n\n\t//if we're on the first page of the result\n\t//then do NOT paint a previous button\n\t\t$this->prev_butt = (($start > 0) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_prev\\\" value=\\\"Prev $limit\\\">\" : \" \") ;\n\n\t\t$this->do_paging = 1;\n\n\t}",
"public static function paginado_usuario(){\n\t\t $page = 1; //inicializamos la variable $page a 1 por default\n\t\t if(array_key_exists('pg', $_GET)){\n\t\t $page = $_GET['pg']; //si el valor pg existe en nuestra url, significa que estamos en una pagina en especifico.\n\t\t }\n\t\t //ahora que tenemos en que pagina estamos obtengamos los resultados:\n\t\t // a) el numero de registros en la tabla\n\t\t $mysqli = new mysqli(\"localhost\",\"root\",\"slam2018\",\"corgran\");\n\t\t if ($mysqli->connect_errno) {\n\t\t\t\tprintf(\"Connect failed: %s\\n\", $mysqli->connect_error);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t $conteo_query = $mysqli->query(\"SELECT COUNT(*) as conteo FROM usuarios\");\n\t\t $conteo = \"\";\n\t\t if($conteo_query){\n\t\t \twhile($obj = $conteo_query->fetch_object()){ \n\t\t \t \t$conteo =$obj->conteo; \n\t\t \t}\n\t\t }\n\t\t $conteo_query->close(); \n\t\t unset($obj); \n \t\t\n\t\t //ahora dividimos el conteo por el numero de registros que queremos por pagina.\n\t\t $max_num_paginas = intval($conteo/10); //en esto caso 10\n\t\t\t\n\t\t // ahora obtenemos el segmento paginado que corresponde a esta pagina\n\t\t $segmento = $mysqli->query(\"SELECT * FROM usuarios LIMIT \".(($page-1)*10).\", 10 \");\n $resultado=[];\n\t\t //ya tenemos el segmento, ahora le damos output.\n\t\t if($segmento){\n\t\t\t // echo '<table>';\n\t\t\t while($obj2 = $segmento->fetch_object())\n\t\t\t {\n\t\t\t \t$obj_usu = new usuario($obj2->id_usuario,$obj2->tipo_usu,$obj2->nombre,$obj2->clave);\n $resultado[]=$obj_usu;\n\t\t\t /* echo '<tr>\n\t\t\t <td>'.$obj2->id_usuario.'</td>\n\t\t\t <td>'.$obj2->tipo_usu.'</td>\n\t\t\t <td>'.$obj2->nombre.'</td>\n\t\t\t </tr>'; \n\t\t\t */ }\n\t\t\t // echo '</table><br/><br/>';\n\t\t\t}\n\t\n\t\t //ahora viene la parte importante, que es el paginado\n\t\t //recordemos que $max_num_paginas fue previamente calculado.\n\t\t for($i=0; $i<$max_num_paginas;$i++){\n\n\t\t echo '<a href=\"index.php?pg='.($i+1).'\">'.($i+1).'</a> | ';\n\t\t \n\t\t } \n\t\t echo '<div>-------------------------- PAginacion------------------------------------------------</div>'; \n return $resultado; \n \n }",
"public function index()\n\t{\n \t $this->load->library('pagination');\n \t //Buoc 2:Cau hinh cho phan trang\n \t //lay tong so luong liên hệ tu trong csdl\n \t $total_rows = $this->contact_model->get_total();\n \t $config = array();\n \t $config['base_url'] = base_url('admin/cat/index');\n \t $config['total_rows'] = $total_rows;\n \t $config['per_page'] = 10;\n \t $config['uri_segment'] = 4;//phân đoạn 4\n \t $config['next_link'] = \"Trang kế tiếp\";\n \t $config['prev_link'] = \"Trang trước\";\n \t //Khoi tao phan trang\n \t $this->pagination->initialize($config);\n \t \n \t $input = array();\n \t $input['limit'] = array($config['per_page'], $this->uri->rsegment(3));\n\t\t//lay toan bo liên hệ\n\t\t$list = array();\n\t\t$list = $this->contact_model->get_list($input);\n\t\t$this->data['list'] = $list;\n\t\t$this->data['total_rows'] = $total_rows;\n\t\t\n\t\t// Message\n\t\t$message = $this->session->flashdata('flash_message');\n\t\tif ($message)\n\t\t{\n\t\t\t$this->data['message'] = $message;\n\t\t}\n\t\t\n\t \t// Hien thi view\n\t \t// Hien thi view\n\t\t$this->data['temp'] = 'admin/contact/index';\n\t\t$this->load->view('admin/main', $this->data);\n\t}",
"function pagantitionResult($per_page){\n global $con;\n if(!isset($_GET['result'])){\n try{\n $link = \"\";\n if($_GET['cat_id'] != 'all'){\n $cat_id = $_GET['cat_id'];\n $query = $con->prepare(\"SELECT * FROM products where p_cat_id = '$cat_id'\");\n $query->execute();\n $link = \"ads.php?cat_id=$cat_id&page=\";\n }\n else{\n $query = $con->prepare(\"SELECT * FROM products\");\n $query->execute(); \n $link = \"ads.php?cat_id=all&page=\";\n }\n $total_page = 0;\n $records = $query->rowCount();\n $total_page = ceil($records / $per_page);\n if($total_page != 0){\n if($_GET['page'] != 1){\n echo \"\n <a href='$link\" . ($_GET['page'] -1).\"' class='btn btn-default' id='prev' data-text='1'>السابق</a>\n \";\n }\n else{\n echo \"\n <a href='$link\" . '1' . \"' class='btn btn-default' id='prev' data-text='1'>السابق</a>\n \";\n }\n if($_GET['page'] < $total_page){\n echo \"<a href='$link\" . ($_GET['page'] +1).\"' class='btn btn-default' id='next'>التالي</a>\";\n }\n else{\n echo \"<a href='$link\" . $total_page .\"' class='btn btn-default' id='next'>التالي</a>\";\n }\n }\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }\n else if(isset($_GET['result'])){\n try{\n $link = \"\";\n if($_GET['cat_id'] != 'all'){\n $cat_id = $_GET['cat_id'];\n $query = $con->prepare(\"SELECT * FROM products where p_cat_id = '$cat_id'\");\n $query->execute();\n $link = \"ads.php?result&cat_id=$cat_id&page=\";\n }\n else{\n $query = $con->prepare(\"SELECT * FROM products\");\n $query->execute(); \n $link = \"ads.php?cat_id=all&page=\";\n }\n $total_page = 0;\n $records = $query->rowCount();\n $total_page = ceil($records / $per_page);\n if($total_page != 0){\n if($_GET['page'] != 1){\n echo \"\n <a href='$link\" . ($_GET['page'] -1).\"' class='btn btn-default' id='prev' data-text='1'>السابق</a>\n \";\n }\n else{\n echo \"\n <a href='$link\" . '1' . \"' class='btn btn-default' id='prev' data-text='1'>السابق</a>\n \";\n }\n if($_GET['page'] < $total_page){\n echo \"<a href='$link\" . ($_GET['page'] +1).\"' class='btn btn-default' id='next'>التالي</a>\";\n }\n else{\n echo \"<a href='$link\" . $total_page .\"' class='btn btn-default' id='next'>التالي</a>\";\n }\n }\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }\n else{\n try{\n $query = $con->prepare(\"SELECT * FROM users\");\n $query->execute();\n $records = $query->rowCount();\n $total_page = ceil($records / $per_page);\n if($total_page != 0){\n if($_GET['page'] != 1){\n echo \"\n <a href='users.php?page=\" . ($_GET['page'] -1).\"' class='btn btn-default' id='prev' data-text='1'>السابق</a>\n \";\n }\n else{\n echo \"\n <a href='users.php?page=1' class='btn btn-default' id='prev' data-text='1'>السابق</a>\n \";\n }\n if($_GET['page'] < $total_page){\n echo \"<a href='users.php?page=\" . ($_GET['page'] +1).\"' class='btn btn-default' id='next'>التالي</a>\";\n }\n else{\n echo \"<a href='users.php?page=$total_page' class='btn btn-default' id='next'>التالي</a>\";\n }\n }\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }\n}",
"public function getPerPage(): int;",
"function pelamar()\n\t{\n\t\tif ($this->input->post('posisi')==null){\n\t\t$config['base_url'] = base_url(\"Hrd/pelamar\");\n\t\t$config['total_rows'] = $this->db->count_all('event');\n\t\t$config['full_tag_open'] = '<div class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</div>';\n\t\t$config['cur_tag_open'] = '<a class=\"active\">';\n\t\t$config['cur_tag_close'] = '</a>';\n\t\t$config['per_page'] = 10;\n\t\t$config['num_links'] = 2;\n\t\t$config['next_link'] = '>>';\n\t\t$config['prev_link'] = '<<';\n\t\t$offset=$this->uri->segment(3);\n\t\t$data=array('posisi'=> $this->M_hrd->semuaLowongan(),\n\t\t\t\t\t'pelamar' => $this->M_hrd->infoPelamar($config['per_page'],$offset),\n\t\t\t\t\t'cekLamaran' => $this->M_hrd->cekLamaran2()); \n\t\t$this->pagination->initialize($config); \n\t\t$this->load->view('admin/header');\n\t\t$this->load->view('admin/v_menuhrd');\n\t\t$this->load->view('admin/hrd/v_pelamar',$data);\n\t\t$this->load->view('admin/footer');\n\t\t}else{\n\t\t//melampirkan pelamar sesuai posisi\n\t\t$posisi=$this->input->post('posisi');\n\t\t$config['base_url'] = base_url(\"Hrd/pelamar\");\n\t\t$config['total_rows'] = $this->db->count_all('event');\n\t\t$config['full_tag_open'] = '<div class=\"pagination\">';\n\t\t$config['full_tag_close'] = '</div>';\n\t\t$config['cur_tag_open'] = '<a class=\"active\">';\n\t\t$config['cur_tag_close'] = '</a>';\n\t\t$config['per_page'] = 10;\n\t\t$config['num_links'] = 2;\n\t\t$config['next_link'] = '>>';\n\t\t$config['prev_link'] = '<<';\n\t\t$offset=$this->uri->segment(3);\n\t\t$data=array('posisi'=> $this->M_hrd->semuaLowongan(),\n\t\t\t\t\t'pelamar' => $this->M_hrd->pelamarsesuaiposisi($config['per_page'],$offset,$posisi),\n\t\t\t\t\t\t'cekLamaran' => $this->M_hrd->cekLamaran3($posisi)); \n\t\t$this->load->view('admin/header');\n\t\t$this->load->view('admin/v_menuhrd');\n\t\t$this->load->view('admin/hrd/v_pelamar',$data);\n\t\t$this->load->view('admin/footer');\n\t\t\t\n\t\t}\n\t}",
"function pagination($totalRegs, $pagActual, $funcion, $criterio, $numReg = NUM_REGISTROS, $cantPag = 5)\n {\n /*exit();*/\n $strHtml = '';\n $cantPag = ($cantPag == 0 ? 5 : $cantPag);\n $numReg = ($numReg == 0 ? 10 : $numReg);\n if ($totalRegs > 0)\n {\n $params = \"'\" . $criterio . \"'\";\n $strHtml = '\n <div class=\"row\">\n <div class=\"col-md-6\" style=\"text-align: left;\">\n <!-- <div> -->\n <input type=\"hidden\" id=\"pphpagact\" x=\"pag\" value=\"' . $pagActual . '\">';\n $onclick = $funcion . '(' . $params . ',1,this.value);';\n $strHtml .= '<select style=\"width:58px;\" name=\"cboNumReg\" id=\"cboNumReg\" onchange=\"'.$onclick.'\">\n <option value= \"5\" ' . ($numReg == 5 ? 'selected' : '') . '>5</option> \n <option value= \"10\" ' . ($numReg == 10 ? 'selected' : '') . '>10</option>\n <option value= \"15\" ' . ($numReg == 15 ? 'selected' : '') . '>15</option>\n <option value= \"20\" ' . ($numReg == 20 ? 'selected' : '') . '>20</option>\n <option value= \"30\" ' . ($numReg == 30 ? 'selected' : '') . '>30</option>\n <option value= \"50\" ' . ($numReg == 50 ? 'selected' : '') . '>50</option> \n <option value=\"100\" ' . ($numReg == 100 ? 'selected' : '') . '>100</option>\n </select>\n de un total de <span class=\"text-primary\">' . $totalRegs . '</span>\n registros / Pag. <span id=\"pag\" xx=\"'.$pagActual.'\" class=\"txt-color-darken\">' . $pagActual . '</span> de <span class=\"txt-color-darken\">' . ceil($totalRegs / $numReg) . '</span>\n <!-- </div> -->\n </div>\n <div class=\"col-md-6\" style=\"text-align: right;\">\n <nav class=\"float-right\" aria-label=\"Page navigation example\">\n <ul class=\"pagination\">';\n $paginas = ceil($totalRegs / $numReg); #determinando el numero de paginas\n $mediaPag = ceil($cantPag / 2);\n $pagInicio = ($pagActual - $mediaPag);\n $pagInicio = ($pagInicio <= 0 ? 1 : $pagInicio);\n $pagFinal = ($pagInicio + ($cantPag - 1));\n if ($pagActual > 1) {\n $onclick = $funcion . '(' . $params . ',1,' . $numReg . ');';\n $strHtml .= '<li class=\"page-item\"><a class=\"page-link\" href=\"javascript:void(0);\" onclick=\"' . $onclick . '\">\n <i class=\"fa fa-step-backward\"></i></a></li>';\n $onclick = $funcion . '(' . $params . ',' . ($pagActual - 1) . ', ' . $numReg . ');';\n $strHtml .= '<li class=\"page-item\"><a class=\"page-link\" href=\"javascript:void(0);\" onclick=\"' . $onclick . '\">\n <span aria-hidden=\"true\"><i class=\"fa fa-backward\"></i></span></a></li>';\n } else \n {\n $strHtml .= '<li class=\"page-item disabled\"><a class=\"page-link\" href=\"javascript:void(0);\">\n <i class=\"fa fa-step-backward\"></i></a></li>';\n $strHtml .= '<li class=\"page-item disabled\"><a class=\"page-link\" href=\"javascript:void(0);\">\n <span aria-hidden=\"true\"><i class=\"fa fa-backward\"></i></span></a></li>';\n }\n for ($i = $pagInicio; $i <= $pagFinal; $i++) \n {\n if ($i <= $paginas) \n {\n $onclick = $funcion . '(' . $params . ',' . $i . ', ' . $numReg . ');';\n $a = '<a class=\"page-link\" href=\"javascript:void(0);\" onclick=\"' . $onclick . '\">' . $i . '</a>';\n $css = '';\n if ($i == $pagActual) {\n $a = '<a class=\"page-link\" href=\"javascript:void(0);\">' . $i . '</a>';\n $css = ' class =\"page-item active\" ';\n }\n $strHtml .= '<li ' . $css . '>' . $a . '</li>';\n } else { break; }\n }\n if ($paginas > 1 && $pagActual != $paginas) {\n $onclick = $funcion . '(' . $params . ',' . ($pagActual + 1) . ', ' . $numReg . ');';\n $strHtml.= '<li class=\"page-item\"><a class=\"page-link\" href=\"javascript:void(0);\" onclick=\"' . $onclick . '\">\n <span aria-hidden=\"true\"><i class=\"fa fa-forward\"></i></span></a></li>';\n $onclick = $funcion . '(' . $params . ',' . $paginas . ', ' . $numReg . ');';\n $strHtml.= '<li class=\"page-item\"><a class=\"page-link\" href=\"javascript:void(0);\" onclick=\"' . $onclick . '\">\n <i class=\"fa fa-step-forward\"></i></a></li>';\n } else{\n $strHtml .= '<li class=\"page-item disabled\"><a class=\"page-link\" href=\"javascript:void(0);\"\n style=\"text-decoration:none;cursor:auto\">\n <span aria-hidden=\"true\"><i class=\"fa fa-forward\"></i></span></li>';\n $strHtml .= '<li class=\"page-item disabled\"><a class=\"page-link\" href=\"javascript:void(0);\" \n style=\"text-decoration:none;cursor:auto\"><i class=\"fa fa-step-forward\"></i></a></li>';\n }\n $strHtml .= '</ul>\n </nav>\n </div>\n </div>';\n }\n return $strHtml;\n }",
"function Pagination($total, $perpage, $current, $link) {\n $result = '';\n $numpages = ceil($total / $perpage);\n $pages = AdvancedPagination($total, $current, $numpages);\n if ($numpages > 1) {\n $result .= '<div id=\"pagination\">\n <span class=\"pages\">'.__('Pages').': </span>';\n if ($pages['current'] != $pages['previous'])\n $result .= '<a href=\"'.$link.'&page=1\"> <</a>';\n else $result .= '<span class=\"pages\"> < </span>';\n $count = ($numpages > 5) ? 5 : $numpages;\n for ($i = 0; $i < $count; $i++) {\n if ($pages['pages'][$i] != $pages['current']) {\n $result .= '<a href=\"'.$link.'&page='.$pages['pages'][$i].'\">'.$pages['pages'][$i].'</a>';\n } else {\n $result .= '<span class=\"active\"> '.$pages['current'].'</span>';\n }\n }\n if ($pages['current'] != $pages['next']) {\n $result .= '<a href=\"'.$link.'&page='.$pages['last'].'\"> > </a><span class=\"pages\">['.__('Total').': '.$pages['last'].']</span>';\n } else {\n $result .= '<span class=\"pages\"> > ['.__('Total').': '.$pages['last'].']</span>';\n }\n $result .= '</div>\n <div class=\"clear\"></div>';\n }\n return $result;\n}",
"public function detail_kws($id_blok)\n\t{\n\t\t$this->load->library('Cek_login_lib');\n $this->cek_login_lib->logged_in();\n $this->load->library('pagination');\n\n // $jumlah_data = $this->db->count_all('prospektus');\n\n $jumlah_data = $this->M_prospektus->get_data_unit_jml($id_blok)->num_rows();\n\n $config['base_url'] \t\t= base_url(\"prospektus/detail_kws/\".$id_blok);\n $config['total_rows'] \t\t= $jumlah_data;\n $config['per_page'] \t\t= 3;\n $config['uri_segment'] \t\t= 4;\n $config['first_link'] = 'First';\n $config['last_link'] = 'Last';\n $config['next_link'] = 'Next';\n $config['prev_link'] = 'Prev';\n $config['full_tag_open'] = '<div class=\"pagging text-center mt-20\"><nav class=\"pagination-wrap d-inline-block\" aria-label=\"Page navigation example\"><ul class=\"pagination custom-pagination pagination-rounded\">';\n $config['full_tag_close'] = '</ul></nav></div>';\n $config['num_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['num_tag_close'] = '</span></li>';\n $config['cur_tag_open'] = '<li class=\"page-item active\"><span class=\"page-link\">';\n $config['cur_tag_close'] = '<span class=\"sr-only\">(current)</span></span></li>';\n $config['next_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['next_tagl_close'] = '<span aria-hidden=\"true\">»</span></span></li>';\n $config['prev_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['prev_tagl_close'] = '</span>Next</li>';\n $config['first_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['first_tagl_close'] = '</span></li>';\n $config['last_tag_open'] = '<li class=\"page-item\"><span class=\"page-link\">';\n $config['last_tagl_close'] = '</span></li>';\n\n $this->pagination->initialize($config);\n\n $data['aktif']\t\t\t= 'prospektus';\n $data['page'] \t\t\t= ($this->uri->segment(4)) ? $this->uri->segment(4) : 0;\n $data['data_unit_pros']\t= $this->M_prospektus->get_data_unit($id_blok,$config['per_page'],$data['page']);\n $data['id_blok'] = $this->M_prospektus->get_id_blok($id_blok);\n $data['pagination'] \t= $this->pagination->create_links();\n\n $this->template->load('template','prospektus/V_unit', $data);\n\t}",
"function AddPagination($RPP, $num, $pageNum, $onclick){\t\n if($num > 0) {\n //Determine the maxpage and the offset for the query\n $maxPage = ceil($num/$RPP);\n $offset = ($pageNum - 1) * $RPP;\n //Initiate the navigation bar\n $nav = '';\n //get low end\n $page = $pageNum - 3;\n //get upperbound\n $upper =$pageNum + 3;\n if($page <= 0){\n $page = 1;\n }\n if($upper > $maxPage){\n $upper = $maxPage;\n }\n\n //Make sure there are 7 numbers (3 before, 3 after and current\n if($upper-$page < 6){\n\n //We know that one of the page has maxed out\n //check which one it is\n //echo \"$upper >=$maxPage<br>\";\n if($upper >= $maxPage){\n //the upper end has maxed, put more on the front end\n //echo \"to begining<br>\";\n $dif = $maxPage - $page;\n //echo \"$dif<br>\";\n if($dif == 3){\n $page = $page - 3;\n }elseif ($dif == 4){\n $page = $page - 2;\n }elseif ($dif == 5){\n $page = $page - 1;\n }\n \n }elseif ($page <= 1){\n //its the low end, add to upper end\n //echo \"to upper<br>\";\n $dif = $upper-1;\n\n if ($dif == 3){\n $upper = $upper + 3;\n }elseif ($dif == 4){\n $upper = $upper + 2;\n }elseif ($dif == 5){\n $upper = $upper + 1;\n }\n }\n }\n\n if($page <= 0) {\n $page = 1;\n }\n\n if($upper > $maxPage) {\n $upper = $maxPage;\n }\n\n //These are the numbered links\n for($page; $page <= $upper; $page++) {\n\n if($page == $pageNum){\n //If this is the current page then disable the link\n $nav .= \"<li class='active'><a href='#'>$page</a></li>\";\n }else{\n //If this is a different page then link to it\n $nav .= \"<li onclick='return \".$onclick.\"(\".$page.\")'><a href='#'>$page</a></li> \";\n }\n }\n\n\n //These are the button links for first/previous enabled/disabled\n if($pageNum > 1){\n $page = $pageNum - 1;\n $prev = \"<li onclick='return \".$onclick.\"(\".$page.\")'><a href='#'><span class='glyphicon glyphicon-chevron-left'></span></a></li>\";\n $first = \"<li onclick='return \".$onclick.\"(1)'><a href='#'><span class='glyphicon glyphicon-backward'></span></a></li>\";\n }else{\n $prev = \"<li><a href='#'><span class='glyphicon glyphicon-chevron-left'></span></a></li>\";\n $first = \"<li><a href='#'><span class='glyphicon glyphicon-backward'></span></a></li>\";\n }\n\n //These are the button links for next/last enabled/disabled\n if($pageNum < $maxPage AND $upper <= $maxPage) {\n $page = $pageNum + 1;\n $next = \"<li onclick='return \".$onclick.\"(\".$page.\")'><a href='#'><span class='glyphicon glyphicon-chevron-right'></span></a></li>\";\n $last = \"<li onclick='return \".$onclick.\"(\".$maxPage.\")'><a href='#'><span class='glyphicon glyphicon-forward'></span></a></li>\";\n }else{\n $next = \"<li><a href='#'><span class='glyphicon glyphicon-chevron-right'></span></a></li>\";\n $last = \"<li><a href='#'><span class='glyphicon glyphicon-forward'></span></a></li>\";\n }\n\n if($maxPage >= 1){\n // print the navigation link\n return $first . $prev . $nav . $next . $last;\n }\n }\n}",
"function Paging(){\n\tif(isset($_GET['page']))\t$page=$_GET['page'];\n\telse $page=5;\n\n\t$onePage=2;\n\t$allPage=ceil($num_row/$onePage);\n\n\tif($page < 1 && $page > $allPage)\texit;\n\n\t$oneSection=2;\n\t$currentSection=ceil($page/$oneSection);\n\t$allSection=ceil($allPage/$oneSection);\n\n\t$firstPage=($currentSection * $oneSection) - ($oneSection - 1);\n\n\tif($currentSection == $allSection)\t$lastPage=$allPage;\n\telse \t$lastPage=$currentSection * $oneSection;\n\n\t$prevPage=(($currentSection-1) * $oneSection);\n\t$nextPage=(($currentSection+1) * $oneSection)-($oneSection-1);\n\n\t$paging='<ul>';\n\n\tif($page != 1)\t\t\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page=1\">First</a></li>';\n\tif($currentSection != 1)\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page='.$prevPage.'\">Prev</a></li>';\n\n\tfor($i=$firstPage;$i<=$lastPage;$i++){\n\t\tif($i==$page)\t\t\t\t\t$paging.='<li>'.$i.'</li>';\n\t\telse \t\t\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$i.'\">'.$i.'</a></li>';\n\t}\n\n\tif($currentSection != $allSection)\t$paging.='<li><a href=\"./Board_list.php?page='.$nextPage.'\">Next</a></li>';\n\tif($page!=$allPage)\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$allPage.'\">End</a></li>';\n\t\n\t$paging.='</ul>';\n\n\t$currentLimit=($onePage * $page)-$onePage;\n\t$sqlLimit='limit '.$currentLimit.','.$onePage;\n\t\n\t$sql=\"select * from board \".$sqlLimit;\n\t$result=$con->query($sql);\n\techo $sql;\n}",
"public function totalPage();",
"function pagination($currentPage, $itemCount, $itemsPerPage, $adjacentCount, $pageLinkTemplate, $showPrevNext = true) {\n $firstPage = 1;\n $lastPage = ceil($itemCount / $itemsPerPage);\n if ($lastPage <= 1) {\n return;\n }\n if ($currentPage <= $adjacentCount + $adjacentCount) {\n $firstAdjacentPage = $firstPage;\n $lastAdjacentPage = min($firstPage + $adjacentCount + $adjacentCount, $lastPage);\n } elseif ($currentPage > $lastPage - $adjacentCount - $adjacentCount) {\n $lastAdjacentPage = $lastPage;\n $firstAdjacentPage = $lastPage - $adjacentCount - $adjacentCount;\n } else {\n $firstAdjacentPage = $currentPage - $adjacentCount;\n $lastAdjacentPage = $currentPage + $adjacentCount;\n }\n echo '<ul class = \"pagination\">';\n if ($showPrevNext) {\n echo '<li>';\n if ($currentPage == $firstPage) {\n echo '<a class=\"inactive_link\"><span class=\"glyphicon glyphicon-chevron-left\"></span></a>';\n } else {\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($currentPage - 1) : sprintf($pageLinkTemplate, $currentPage - 1)) . '\"><span class=\"glyphicon glyphicon-chevron-left\"></span></a>';\n }\n echo '</li>';\n }\n if ($firstAdjacentPage > $firstPage) {\n echo '<li>';\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($firstPage) : sprintf($pageLinkTemplate, $firstPage)) . '\">' . $firstPage . '</a>';\n if ($firstAdjacentPage > $firstPage + 1) {\n echo '<a class=\"inactive_link\" id=\"ellipsis1\">...</a>';\n }\n echo '</li>';\n }\n for ($i = $firstAdjacentPage; $i <= $lastAdjacentPage; $i++) {\n if ($currentPage == $i) {\n echo '<li class=\"chosen_link\"><a class=\"inactive_link\"><span>' . $i . '</span></a></li>';\n } else {\n echo '<li><a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($i) : sprintf($pageLinkTemplate, $i)) . '\">' . $i . '</a></li>';\n }\n }\n if ($lastAdjacentPage < $lastPage) {\n echo '<li>';\n if ($lastAdjacentPage < $lastPage - 1) {\n echo '<a class=\"inactive_link\" id=\"ellipsis2\">...</a>';\n }\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($lastPage) : sprintf($pageLinkTemplate, $lastPage)) . '\">' . $lastPage . '</a>';\n echo '</li>';\n }\n if ($showPrevNext) {\n echo '<li>';\n if ($currentPage == $lastPage) {\n echo '<a class=\"inactive_link\"><span class=\"glyphicon glyphicon-chevron-right\"></span></a>';\n } else {\n echo '<a href=\"' . (is_callable($pageLinkTemplate) ? $pageLinkTemplate($currentPage + 1) : sprintf($pageLinkTemplate, $currentPage + 1)) . '\"><span class=\"glyphicon glyphicon-chevron-right\"></span></a>';\n }\n echo '</li>';\n }\n echo '</ul>';\n}",
"function pagination($pages = '', $range = 1)\n{ \n\t$showitems = ($range * 2)+1; \n\n\tglobal $paged;\n\tif(empty($paged)) $paged = 1;\n\n\tif($pages == '')\n\t{\n\t\tglobal $wp_query;\n\t\t$pages = $wp_query->max_num_pages;\n\t\tif(!$pages)\n\t\t{\n\t\t\t$pages = 1;\n\t\t}\n\t} \n\n\tif(1 != $pages)\n\t{\n\t\techo '<div class=\"col-md-12 col-sm-12 text-center fund_pagination\">';\n\t\techo '<nav aria-label=\"Page navigation\">';\n\t\techo '<ul class=\"pagination\">';\n\n //if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo \"<a href='\".get_pagenum_link(1).\"'>« First</a>\";\n\t\tif($paged > 1 && $showitems < $pages) \n\n\t\t\techo \"<li><a href='\".get_pagenum_link($paged - 1).\"' aria-label=\\\"Previous\\\"><span aria-hidden=\\\"true\\\">«</span></a>\";\n\n\t\tfor ($i=1; $i <= $pages; $i++)\n\t\t{\n\t\t\tif (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))\n\t\t\t{\n\t\t\t\techo ($paged == $i)? \"<li class=\\\"active-2\\\"><a>\".$i.\"</a></li>\":\"<li><a href='\".get_pagenum_link($i).\"' class=\\\"inactive\\\">\".$i.\"</a></li>\";\n\t\t\t}\n\t\t}\n\n\t\tif ($paged < $pages && $showitems < $pages) echo \"<li><a aria-label=\\\"Next\\\" href=\\\"\".get_pagenum_link($paged + 1).\"\\\"> <span aria-hidden=\\\"true\\\">»</span></a>\"; \n\n\n\t\techo '</ul>';\n\t\techo '</nav>';\n\t\techo \"</div>\\n\";\n\t}\n}",
"function pagination($data, $base_url, $uri_segment, $per_page) {\n $ci = & get_instance();\n $ci->load->library('pagination');\n $config['base_url'] = $base_url;\n $config['uri_segment'] = $uri_segment;\n $config['total_rows'] = count($data);\n $config['per_page'] = $per_page;\n $config['display_pages'] = TRUE;\n $config['use_page_numbers'] = TRUE;\n $config['num_links'] = 4;\n $config['full_tag_open'] = '<ul class=\"pagination pagination-sm pull-right push-down-20\">';\n $config['full_tag_close'] = '</ul>';\n $config['prev_link'] = '«';\n $config['prev_tag_open'] = '<li>';\n $config['prev_tag_close'] = '</li>';\n $config['first_link'] = 'First';\n $config['first_tag_open'] = '<li>';\n $config['first_tag_close'] = '</li>';\n $config['next_link'] = '»';\n $config['next_tag_open'] = '<li>';\n $config['next_tag_close'] = '</li>';\n $config['last_link'] = 'Last';\n $config['last_tag_open'] = '<li>';\n $config['last_tag_close'] = '</li>';\n $config['num_tag_open'] = '<li>';\n $config['num_tag_close'] = '</li>';\n $config['cur_tag_open'] = '<li class=\"active\"><a>';\n $config['cur_tag_close'] = '</a></li>';\n $config['first_url'] = $base_url;\n\n $ci->pagination->initialize($config);\n\n return $ci->pagination->create_links();\n}",
"protected function constructPagination($int_nb_tr_total)\n {\n $int_nb_page=ceil($int_nb_tr_total/$this->int_nb_ligne_page);\n \n //- traitement de pages \n $int_max=0;\n for($i=0;$i<$int_nb_page-1;$i++)\n {\n $int_libelle_page=$i+1;\n $int_min=$i*$this->int_nb_ligne_page;\n $int_max=$int_min+$this->int_nb_ligne_page-1;\n $obj_font=new font($int_libelle_page);\n $obj_font->addData('min',$int_min);\n $obj_font->addData('max',$int_max);\n $obj_font->setOnclick(\"table_with_search.getInstance($(this)).paginate($(this));\");\n $obj_font->setStyle('cursor:pointer;');\n $obj_font->setClass('table_with_search__page');\n $arra_font[]=' '.$obj_font->htmlValue();\n }\n \n //- traitement de la dernière page\n $int_min=($int_nb_page-1)*$this->int_nb_ligne_page;\n $int_max=$int_nb_tr_total;\n $int_libelle_page=$int_nb_page;\n $obj_font=new font($int_libelle_page);\n $obj_font->addData('min',$int_min);\n $obj_font->addData('max',$int_max);\n $obj_font->setOnclick(\"table_with_search.getInstance($(this)).paginate($(this));\");\n $obj_font->setStyle('cursor:pointer;');\n $obj_font->setClass('table_with_search__page');\n $arra_font[]=' '.$obj_font->htmlValue();\n \n $obj_tr=new tr();\n $obj_td=$obj_tr->addTd($arra_font);\n $obj_td->setColspan(count($this->arra_column_name));\n $obj_td->setAlign('center');\n $obj_td->setClass('contenu table_with_search__constructPagination');\n \n return $obj_tr;\n }",
"public function pagination(){\n\t\treturn $this->dataInfos['XMLPM']['PAGINATION'];\n\t}",
"function foucs_pagination_number () {\n global $wp_query; // Make [$wp_query] Globale\n\t$all_pages = $wp_query->max_num_pages; // Get All Posts\n $current_pages = esc_html(max(1, get_query_var('paged'))); //Get Current Page\n \n if($all_pages > 1) { // Check If Total Page >1\n\t\treturn paginate_links(array(\n\t\t\t'base' \t\t\t => esc_url(get_pagenum_link() . '%_%'),\n\t\t\t'format' => '?paged=%#%',\n\t\t\t'current' \t\t => $current_pages,\n\t\t\t'mid_size' => 2,\n 'end_size' \t\t\t => 3,\n\t\t\t'prev_text' => __('<i class=\"fas fa-angle-double-left\"></i>'),\n\t\t\t'next_text' => __('<i class=\"fas fa-angle-double-right\"></i>'),\n\t\t));\n\t}\n}",
"function custom_pagination( $pages = '', $range = 2 ) {\n\t$showitems = ( $range * 2 ) + 1;\n\tglobal $paged;\n\tif ( empty( $paged ) ) $paged = 1;\n\tif ( $pages == '' ) {\n\t\tglobal $wp_query;\n\t\t$pages = $wp_query->max_num_pages;\n\t\tif ( !$pages ) {\n\t\t\t$pages = 1;\n\t\t}\n\t}\n\tif ( 1 != $pages ) {\n\t\techo '<div class=\"pagination\">';\n\t\tif ( $paged > 2 && $paged > $range + 1 && $showitems < $pages ) echo '<a href=\"' . get_pagenum_link( 1 ) . '\"><i class=\"fa fa-arrow-left\"></i> Inicio</a>';\n\t\tif ( $paged > 1 && $showitems < $pages ) echo '<a href=\"' . get_pagenum_link( $paged - 1 ) . '\"><i class=\"fa fa-arrow-left\"></i> Anterior</a>';\n\t\tfor ( $i = 1; $i <= $pages; $i++ ) {\n\t\t\tif ( 1 != $pages && ( !( $i >= $paged + $range + 1 || $i <= $paged - $range - 1 ) || $pages <= $showitems ) ) {\n\t\t\t\techo ( $paged == $i ) ? '<span class=\"current\">' . $i . '</span>' : '<a href=\"' . get_pagenum_link( $i ) . '\" class=\"inactive\">' . $i . '</a>';\n\t\t\t}\n\t\t}\n\t\tif ( $paged < $pages && $showitems < $pages ) echo '<a href=\"' . get_pagenum_link( $paged + 1 ) . '\">Siguiente <i class=\"fa fa-arrow-right\"></i></a>';\n\t\tif ( $paged < $pages - 1 && $paged + $range - 1 < $pages && $showitems < $pages ) echo '<a href=\"' . get_pagenum_link( $pages ) . '\">Fin <i class=\"fa fa-arrow-right\"></i></a>';\n\t\techo '</div>' . \"\\n\";\n\t}\n}",
"function getPaginator(){\n\n/// getPaginator Function Code Starts ///\n\n$per_page = 6;\n\nglobal $db;\n\n$aWhere = array();\n\n$aPath = '';\n\n/// Manufacturers Code Starts ///\n\nif(isset($_REQUEST['man'])&&is_array($_REQUEST['man'])){\n\nforeach($_REQUEST['man'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'manufacturer_id='.(int)$sVal;\n\n$aPath .= 'man[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Manufacturers Code Ends ///\n\n/// Products Categories Code Starts ///\n\nif(isset($_REQUEST['p_cat'])&&is_array($_REQUEST['p_cat'])){\n\nforeach($_REQUEST['p_cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'p_cat_id='.(int)$sVal;\n\n$aPath .= 'p_cat[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Products Categories Code Ends ///\n\n/// Categories Code Starts ///\n\nif(isset($_REQUEST['cat'])&&is_array($_REQUEST['cat'])){\n\nforeach($_REQUEST['cat'] as $sKey=>$sVal){\n\nif((int)$sVal!=0){\n\n$aWhere[] = 'cat_id='.(int)$sVal;\n\n$aPath .= 'cat[]='.(int)$sVal.'&';\n\n}\n\n}\n\n}\n\n/// Categories Code Ends ///\n\n$sWhere = (count($aWhere)>0?' WHERE '.implode(' or ',$aWhere):'');\n\n$query = \"select * from products \".$sWhere;\n\n$result = mysqli_query($db,$query);\n\n$total_records = mysqli_num_rows($result);\n\n$total_pages = ceil($total_records / $per_page);\n\necho \"<li><a href='shop.php?page=1\";\n\nif(!empty($aPath)){ echo \"&\".$aPath; }\n\necho \"' >\".'First Page'.\"</a></li>\";\n\nfor ($i=1; $i<=$total_pages; $i++){\n\necho \"<li><a href='shop.php?page=\".$i.(!empty($aPath)?'&'.$aPath:'').\"' >\".$i.\"</a></li>\";\n\n};\n\necho \"<li><a href='shop.php?page=$total_pages\";\n\nif(!empty($aPath)){ echo \"&\".$aPath; }\n\necho \"' >\".'Last Page'.\"</a></li>\";\n\n/// getPaginator Function Code Ends ///\n\n}",
"function mocca_Pagination_number() {\n global $wp_query; // Make [$wp_query] Globale\n $all_pages = $wp_query->max_num_pages; // Get All Posts\n $current_pages = max(1, get_query_var('paged')); //Get Current Page\n\n if($all_pages > 1) { // Check If Total Page >1\n return paginate_links(array(\n 'base' => get_pagenum_link() . '%_%',\n 'format' => 'page/%#%',\n 'current' => $current_pages,\n\n ));\n }\n }",
"function zanblog_page($trigger){ \r\n\r\n global $posts_per_page, $paged;\r\n $my_query = new WP_Query($query_string .\"&posts_per_page=-1\"); \r\n $total_posts = $my_query->post_count;\r\n\r\n if(empty($paged)) $paged = 1; \r\n\r\n $prev = $paged - 1;\r\n $next = $paged + 1; \r\n $range = 4; // only edit this if you want to show more page-links \r\n $showitems = ($range * 2)+1; \r\n \r\n $pages = ceil($total_posts/$posts_per_page);\r\n\r\n // Judge tigger method (auto or manual).\r\n if($trigger == 'auto') {\r\n echo \"<a id='load-more' class='btn btn-zan btn-block' load-data='努力加载中...' href='\" . get_pagenum_link($next) . \"'><i></i> <attr>加载更多</attr></a>\";\r\n\r\n } elseif($trigger == \"manual\") {\r\n if(1 != $pages){ \r\n echo \"<ul class='pagination pull-right'>\"; \r\n echo ($paged > 2 && $paged+$range+1 > $pages && $showitems < $pages)? \"<li><a href='\".get_pagenum_link(1).\"'>首页</a></li>\":\"\"; \r\n echo ($paged > 1 && $showitems < $pages)? \"<li><a href='\".get_pagenum_link($prev).\"'>上一页</a></li>\":\"\"; \r\n \r\n for ($i=1; $i <= $pages; $i++){ \r\n if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems )){ \r\n echo ($paged == $i)? \"<li class='active'><a href='\".get_pagenum_link($i).\"' class='inactive' >\".$i.\"</a></li>\":\"<li><a href='\".get_pagenum_link($i).\"' class='inactive' >\".$i.\"</a></li>\"; \r\n } \r\n } \r\n \r\n echo ($paged < $pages && $showitems < $pages) ? \"<li><a href='\".get_pagenum_link($next).\"'>下一页</a></li>\" :\"\"; \r\n echo ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) ? \"<li><a href='\".get_pagenum_link($pages).\"'>末页</a></li>\":\"\"; \r\n echo \"</ul>\\n\"; \r\n }\r\n\r\n } else {\r\n echo \"<div class='alert alert-danger'><i class='icon-warning-sign'></i> 请输入正确的触发值(auto或者manual)</div>\";\r\n }\r\n}",
"function register_block_core_query_pagination_numbers()\n {\n }",
"public function daftar_pesanan()\n {\n\t\t\tif(isset($_POST[\"page\"])){\n\t\t\t\t$page_number = filter_var($_POST[\"page\"], FILTER_SANITIZE_NUMBER_INT, FILTER_FLAG_STRIP_HIGH); //filter number\n\t\t\t\tif(!is_numeric($page_number)){die('Invalid page number!');} //incase of invalid page number\n\t\t\t}else{\n\t\t\t\t$page_number = 1; //if there's no page number, set it to 1\n\t\t\t}\n\t\t\t\n\t\t\t$item_per_page = 20;\n\t\t\t\n\t\t\t//get total number of records from database for pagination\n\t\t\t$get_total_rows = $this->db->getVar(\"SELECT COUNT('*') FROM pesanan, user, status where pesanan.bayar = '0' and pesanan.id_user = user.id_user AND pesanan.status = status.id_status and pesanan.cekout = '1'\");; //hold total records in variable\n\t\t\t//break records into pages\n\t\t\t$total_pages = ceil($get_total_rows/$item_per_page);\n\t\t\t\n\t\t\t//get starting position to fetch the records\n\t\t\t$page_position = (($page_number-1) * $item_per_page);\n\t\t\t\n\t\t\n\t\t\t//Limit our results within a specified range. \n\t\t\t//$results = $mysqli->prepare(\"SELECT id, name, message FROM paginate ORDER BY id ASC LIMIT $page_position, $item_per_page\");\n\t\t\t$query = $this->db->select()->from('pesanan', 'user', 'status')->where('pesanan.bayar', '=', '0', 'AND')->where('pesanan.id_user', '=', 'user.id_user', 'AND')->where('pesanan.status', '=', 'status.id_status', 'AND')->where('pesanan.cekout', '=', '1')->orderBy('pesanan.kode_pesanan', 'DESC')->limit($item_per_page, $page_position)->getAll();\n\t\t\t//$results->execute(); //Execute prepared Query\n\t\t\t//$results->bind_result($id, $name, $message); //bind variables to prepared statement\n\t\t\t\n\t\t\t$data['pesanan'] = $query;\n\t\t\t$data['pagination'] = $this->data->paginate_function($item_per_page, $page_number, $get_total_rows, $total_pages);\n\t\t\t$data['number']\t\t= $page_position;\n\t\t\t\n\t\t\n\t\t\techo '<div align=\"center\">';\n\t\t\t/* We call the pagination function here to generate Pagination link for us. \n\t\t\tAs you can see I have passed several parameters to the function. */\n\t\t\t//echo paginate_function($item_per_page, $page_number, $get_total_rows[0], $total_pages);\n\t\t\techo '</div>';\n\t\t\t\n\t\t\t$this->data->insertLog(\"Membuka menu daftar user\");\n\t\t\t\n\t\t\t$this->output('pesanan/isi_daftar_pesanan', $data);\n }",
"public function paginate($page = 1, $limit = 10, $all = false)\n {\n }",
"function honeycomb_paging_nav() {\n\t\tglobal $wp_query;\n\n\t\t$args = array(\n\t\t\t'type' \t => 'list',\n\t\t\t'next_text' => _x( 'Next', 'Next post', 'honeycomb' ),\n\t\t\t'prev_text' => _x( 'Previous', 'Previous post', 'honeycomb' ),\n\t\t\t);\n\n\t\tthe_posts_pagination( $args );\n\t}",
"public function ijazah(){\n\n\t\t$cari_ijazah = $this->input->post('cari_ijazah');\n\t\t$parameter = $this->input->post('parameter');\n\t\t$data_ijazah = $this->input->post('data_ijazah');\n\t\t$prodi = $this->input->post('program_studi');\n\t\t$offset = $this->uri->segment(3);\n\t\tif(empty($offset)){\n\t\t\t$offset = 0;\n\t\t}\n\t\t$config['base_url'] = base_url().\"c_index_aka/ijazah/\";\n\t\t$config['per_page'] = 10;\n\t\t$config['total_rows'] = $this->db->count_all_results('t_mahasiswa');\n\t\t$config['prev_link'] = \"<<\";\n\t\t$config['next_link'] = \">>\";\n\t\t$config['full_tag_open'] = \"<ul>\";\n\t\t$config['full_tag_close'] = \"</ul>\";\n\t\t$config['num_tag_open'] = \"<li>\";\n\t\t$config['num_tag_close'] = \"</li>\";\n\t\t$config['cur_tag_open'] = \"<li class='active'><a>\";\n\t\t$config['cur_tag_close'] = \"</a></li>\";\n\t\t$config['next_tag_open'] = \"<li class='next'>\";\n\t\t$config['next_tag_close'] = \"</li>\";\n\t\t$config['prev_tag_open'] = \"<li class='prev'>\";\n\t\t$config['prev_tag_close'] = \"</li>\";\n\t\t$this->pagination->initialize($config);\n\t\t$num = $config['per_page'];\n\t\t$select = \"*\";\n\t\t$table= \"t_mahasiswa\";\n\n\t\t/*if($cari_ijazah){\n\t\t\tif($parameter == 'nim'){\n\t\t\t\t$where = \"WHERE nim = '$data_ijazah'\";\t\t\n\t\t\t}else if($parameter == 'mahasiswa'){\n\t\t\t\t$where = \"WHERE nama LIKE '%$data_ijazah%'\";\t\n\t\t\t}else if($parameter == 'angkatan'){\n\t\t\t\t$where = \"WHERE angkatan = '$data_ijazah'\";\t\n\t\t\t}else{\n\t\t\t\t$where = \"WHERE prodi = '%$prodi%'\";\n\t\t\t}\n\t\t}*/\n\t\tif($cari_ijazah){\n\t\t\tif($parameter == 'nim'){\n\t\t\t\t$where = \"WHERE nim = '$data_ijazah'\";\t\t\n\t\t\t}else if($parameter == 'mahasiswa'){\n\t\t\t\t$where = \"WHERE nama LIKE '%$data_ijazah%'\";\t\n\t\t\t}else{\n\t\t\t\t$where = \"WHERE angkatan = '$data_ijazah' AND program_studi = '$prodi'\";\t\n\t\t\t}\n\t\t}else{\n\t\t\t$where = \"\";\n\t\t\t$limit = \"LIMIT $offset, $num\";\t\n\t\t}\n\t\t$query = (\"SELECT id_mahasiswa,nim,nama,ttl,tanggal_lulus,status_kuliah,angkatan,program_studi FROM t_mahasiswa $where ORDER BY t_mahasiswa.nim ASC $limit\");\n\t\t$data['content'] = \"report/ijazah\";\n\t\t$data['data'] = $this->m_aka->query_aka($query);\n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$this->load->view(\"content\", $data);\n\t}",
"function getPaging($refUrl, $aryOpts, $pgCnt, $curPg) {\n $return = '';\n $return.='<div class=\"box-bottom\"><div class=\"paginate\">';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">First</a>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Prev</a>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.='active';\n $return.='\" >' . $i . '</a>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Next</a>';\n $aryOpts['pg'] = $pgCnt;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Last</a>';\n }\n $return.='<div class=\"clearfix\"></div></div></div>';\n return $return;\n}",
"function kriesi_pagination($pages = '', $range = 4)\n{\n $showitems = ($range * 2)+1;\n\n global $paged;\n if(empty($paged)) $paged = 1;\n\n if($pages == '')\n {\n global $wp_query;\n $pages = $wp_query->max_num_pages;\n if(!$pages)\n {\n $pages = 1;\n }\n }\n\n if(1 != $pages)\n {\n echo \"<ul class=\\\"uk-pagination uk-flex-center\\\">\";\n if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo \"<li><a href='\".get_pagenum_link(1).\"'><span uk-pagination-previous></span><span uk-pagination-previous></span></a></li>\";\n if($paged > 1 && $showitems < $pages) echo \"<li><a href='\".get_pagenum_link($paged - 1).\"'><span uk-pagination-previous></span></a></li>\";\n\n for ($i=1; $i <= $pages; $i++)\n {\n if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))\n {\n echo ($paged == $i)? \"<li class=\\\"uk-active\\\"><span>\".$i.\"</span></li>\":\"<li><a href='\".get_pagenum_link($i).\"' >\".$i.\"</a></li>\";\n }\n }\n\n if ($paged < $pages && $showitems < $pages) echo \"<li><a href='\".get_pagenum_link($paged + 1).\"'><span uk-pagination-next></span></a></li>\";\n if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo \"<li><a href='\".get_pagenum_link($pages).\"'><span uk-pagination-next></span><span uk-pagination-next></span></a></li>\";\n echo \"</ul>\\n\";\n }\n}",
"function pagination($title, $start, $start_name, $max, $max_name, $max_rows, $keep_post = false, $max_page_links = 5, $_selectors = null, $hash = '')\n{\n inform_non_canonical_parameter($max_name);\n inform_non_canonical_parameter($start_name);\n\n if (get_page_name() == 'members') {\n // Don't allow guest bots to probe too deep into the forum index, it gets very slow; the XML Sitemap is for guiding to topics like this\n if (($start > $max * 5) && (is_guest()) && (!is_null(get_bot_type()))) {\n access_denied('NOT_AS_GUEST');\n }\n }\n\n $post_array = array();\n if ($keep_post) {\n foreach ($_POST as $key => $val) {\n if (is_array($val)) {\n continue;\n }\n if (get_magic_quotes_gpc()) {\n $val = stripslashes($val);\n }\n $post_array[$key] = $val;\n }\n }\n\n $get_url = get_self_url(true);\n\n // How many to show per page\n if (is_null($_selectors)) {\n $_selectors = array(10, 25, 50, 80);\n }\n if (has_privilege(get_member(), 'remove_page_split')) {\n if (get_param_integer('keep_avoid_memory_limit', 0) == 1) {\n $_selectors[] = $max_rows;\n }\n }\n $_selectors[] = $max;\n sort($_selectors);\n $_selectors = array_unique($_selectors);\n $selectors = new Tempcode();\n foreach ($_selectors as $selector_value) {\n if ($selector_value > $max_rows) {\n $selector_value = $max_rows;\n }\n $selected = ($max == $selector_value);\n $selectors->attach(do_template('PAGINATION_PER_PAGE_OPTION', array('_GUID' => '1a0583bab42257c60289459ce1ac1e05', 'SELECTED' => $selected, 'VALUE' => strval($selector_value), 'NAME' => integer_format($selector_value))));\n\n if ($selector_value == $max_rows) {\n break;\n }\n }\n $hidden = build_keep_form_fields('_SELF', true, array($max_name, $start_name));\n $per_page = do_template('PAGINATION_PER_PAGE', array('_GUID' => '1993243727e58347d1544279c5eba496', 'HASH' => ($hash == '') ? null : $hash, 'HIDDEN' => $hidden, 'URL' => $get_url, 'MAX_NAME' => $max_name, 'SELECTORS' => $selectors));\n $GLOBALS['INCREMENTAL_ID_GENERATOR']++;\n\n if ($max < $max_rows) { // If they don't all fit on one page\n $parts = new Tempcode();\n $num_pages = ($max == 0) ? 1 : intval(ceil(floatval($max_rows) / floatval($max)));\n\n // Link to first\n if ($start > 0) {\n $url_array = array('page' => '_SELF', $start_name => running_script('index') ? null : 0);\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $first = do_template('PAGINATION_CONTINUE_FIRST', array('_GUID' => 'f5e510da318af9b37c3a4b23face5ae3', 'TITLE' => $title, 'P' => strval(1), 'FIRST_URL' => $cat_url));\n } else {\n $first = new Tempcode();\n }\n\n // Link to previous\n if ($start > 0) {\n $url_array = array('page' => '_SELF', $start_name => strval(max($start - $max, 0)));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $previous = do_template('PAGINATION_PREVIOUS_LINK', array('_GUID' => 'ec4d4da9677b5b9c8cea08676337c6eb', 'TITLE' => $title, 'P' => integer_format(intval($start / $max)), 'URL' => $cat_url));\n } else {\n $previous = do_template('PAGINATION_PREVIOUS');\n }\n\n // CALCULATIONS FOR CROPPING OF SEQUENCE\n // $from is the index number (one less than written page number) we start showing page-links from\n // $to is the index number (one less than written page number) we stop showing page-links from\n if ($max != 0) {\n $max_dispersal = $max_page_links / 2;\n $from = max(0, intval(floatval($start) / floatval($max) - $max_dispersal));\n $to = intval(ceil(min(floatval($max_rows) / floatval($max), floatval($start) / floatval($max) + $max_dispersal)));\n $dif = (floatval($start) / floatval($max) - $max_dispersal);\n if ($dif < 0.0) { // We have more forward range than max dispersal as we're near the start\n $to = intval(ceil(min(floatval($max_rows) / floatval($max), floatval($start) / floatval($max) + $max_dispersal - $dif)));\n }\n } else {\n $from = 0;\n $to = 0;\n }\n\n // Indicate that the sequence is incomplete with an ellipsis\n if ($from > 0) {\n $continues_left = do_template('PAGINATION_CONTINUE');\n } else {\n $continues_left = new Tempcode();\n }\n\n $bot = (is_guest()) && (!is_null(get_bot_type()));\n\n // Show the page number jump links\n for ($x = $from; $x < $to; $x++) {\n $url_array = array('page' => '_SELF', $start_name => ($x == 0) ? null : strval($x * $max));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n if ($x * $max == $start) {\n $parts->attach(do_template('PAGINATION_PAGE_NUMBER', array('_GUID' => '13cdaf548d5486fb8d8ae0d23b6a08ec', 'P' => strval($x + 1))));\n } else {\n $rel = null;\n if ($x == 0) {\n $rel = 'first';\n }\n $parts->attach(do_template('PAGINATION_PAGE_NUMBER_LINK', array('_GUID' => 'a6d1a0ba93e3b7deb6fe6f8f1c117c0f', 'NOFOLLOW' => ($x * $max > $max * 5) && ($bot), 'REL' => $rel, 'TITLE' => $title, 'URL' => $cat_url, 'P' => strval($x + 1))));\n }\n }\n\n // Indicate that the sequence is incomplete with an ellipsis\n if ($to < $num_pages) {\n $continues_right = do_template('PAGINATION_CONTINUE');\n } else {\n $continues_right = new Tempcode();\n }\n\n // Link to next\n if (($start + $max) < $max_rows) {\n $url_array = array('page' => '_SELF', $start_name => strval($start + $max));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $p = ($max == 0) ? 1.0 : ($start / $max + 2);\n $rel = null;\n if (($start + $max * 2) > $max_rows) {\n $rel = 'last';\n }\n $next = do_template('PAGINATION_NEXT_LINK', array('_GUID' => '6da9b396bdd46b7ee18c05b5a7eb4d10', 'NOFOLLOW' => ($start + $max > $max * 5) && ($bot), 'REL' => $rel, 'TITLE' => $title, 'NUM_PAGES' => integer_format($num_pages), 'P' => integer_format(intval($p)), 'URL' => $cat_url));\n } else {\n $next = do_template('PAGINATION_NEXT');\n }\n\n // Link to last\n if ($start + $max < $max_rows) {\n $url_array = array('page' => '_SELF', ($num_pages - 1 == 0) ? null : $start_name => strval(($num_pages - 1) * $max));\n $cat_url = _build_pagination_cat_url($url_array, $post_array, $hash);\n $last = do_template('PAGINATION_CONTINUE_LAST', array('_GUID' => '2934936df4ba90989e949a8ebe905522', 'TITLE' => $title, 'P' => strval($num_pages), 'LAST_URL' => $cat_url));\n } else {\n $last = new Tempcode();\n }\n\n // Page jump dropdown, if we had to crop\n if ($num_pages > $max_page_links) {\n $list = new Tempcode();\n $pg_start = 0;\n $pg_to = $num_pages;\n $pg_at = intval(floatval($start) / floatval($max));\n if ($pg_to > 100) {\n $pg_start = max($pg_at - 50, 0);\n $pg_to = $pg_start + 100;\n }\n if ($pg_start != 0) {\n $list->attach(form_input_list_entry('', false, '...', false, true));\n }\n for ($i = $pg_start; $i < $pg_to; $i++) {\n $list->attach(form_input_list_entry(strval($i * $max), ($i * $max == $start), strval($i + 1)));\n }\n if ($pg_to != $num_pages) {\n $list->attach(form_input_list_entry('', false, '...', false, true));\n }\n $dont_auto_keep = array();\n $hidden = build_keep_form_fields('_SELF', true, $dont_auto_keep);\n $pages_list = do_template('PAGINATION_LIST_PAGES', array('_GUID' => '9e1b394763619433f23b8ed95f5ac134', 'URL' => $get_url, 'HIDDEN' => $hidden, 'START_NAME' => $start_name, 'LIST' => $list));\n } else {\n $pages_list = new Tempcode();\n }\n\n // Put it all together\n return do_template('PAGINATION_WRAP', array(\n '_GUID' => '2c3fc957d4d8ab9103ef26458e18aed1',\n 'TEXT_ID' => $title,\n 'PER_PAGE' => $per_page,\n 'FIRST' => $first,\n 'PREVIOUS' => $previous,\n 'CONTINUES_LEFT' => $continues_left,\n 'PARTS' => $parts,\n 'CONTINUES_RIGHT' => $continues_right,\n 'NEXT' => $next,\n 'LAST' => $last,\n 'PAGES_LIST' => $pages_list,\n\n 'START' => strval($start),\n 'MAX' => strval($max),\n 'MAX_ROWS' => strval($max_rows),\n 'NUM_PAGES' => strval($num_pages),\n ));\n }\n\n if (get_value('pagination_when_not_needed') === '1') {\n return do_template('PAGINATION_WRAP', array('_GUID' => '451167645e67c7beabcafe11c78680db', 'TEXT_ID' => $title,\n 'PER_PAGE' => $per_page,\n 'FIRST' => '',\n 'PREVIOUS' => '',\n 'CONTINUES_LEFT' => '',\n 'PARTS' => '',\n 'CONTINUES_RIGHT' => '',\n 'NEXT' => '',\n 'LAST' => '',\n 'PAGES_LIST' => '',\n\n 'START' => strval($start),\n 'MAX' => strval($max),\n 'MAX_ROWS' => strval($max_rows),\n 'NUM_PAGES' => strval(1),\n ));\n }\n\n return new Tempcode();\n}",
"function shAddPaginationInfo($limit, $limitstart, $showall, $iteration, $url, $location, $shSeparator = null, $defaultListLimitValue = null,\n $suppressPagination = false)\n{\n\t$mainframe = JFactory::getApplication();\n\n\t$pageInfo = Sh404sefFactory::getPageInfo(); // get page details gathered by system plugin\n\t$sefConfig = Sh404sefFactory::getConfig();\n\t$database = ShlDbHelper::getDb();\n\n\t//echo 'Incoming pagination : $listLimit : ' . $listLimit . ' | $defaultListLimit : ' . $defaultListLimit . \"\\n\";\n\n\t// clean suffix and index file before starting to add things to the url\n\t// clean suffix\n\tif (strpos($url, 'option=com_content') !== false && strpos($url, 'format=pdf') !== false)\n\t{\n\t\t$shSuffix = '.pdf';\n\t}\n\telse\n\t{\n\t\t$shSuffix = $sefConfig->suffix;\n\t}\n\t$suffixLength = JString::strLen($shSuffix);\n\tif (!empty($shSuffix) && ($shSuffix != '/') && JString::substr($location, -$suffixLength) == $shSuffix)\n\t{\n\t\t$location = JString::substr($location, 0, JString::strlen($location) - $suffixLength);\n\t}\n\n\t// clean index file\n\tif ($sefConfig->addFile && (empty($shSuffix) || JString::subStr($location, -$suffixLength) != $shSuffix))\n\t{\n\t\t$indexFileLength = JString::strlen($sefConfig->addFile);\n\t\tif (($sefConfig->addFile != '/') && JString::substr($location, -$indexFileLength) == $sefConfig->addFile)\n\t\t{\n\t\t\t$location = JString::substr($location, 0, JString::strlen($location) - $indexFileLength);\n\t\t}\n\t}\n\n\t// get a default limit value, for urls where it's missing\n\t$listLimit = shGetDefaultDisplayNumFromURL($url, $includeBlogLinks = true);\n\t$defaultListLimit = is_null($defaultListLimitValue) ? shGetDefaultDisplayNumFromConfig($url, $includeBlogLinks = false) : $defaultListLimitValue;\n\n\t// do we have a trailing slash ?\n\tif (empty($shSeparator))\n\t{\n\t\t$shSeparator = (JString::substr($location, -1) == '/') ? '' : '/';\n\t}\n\n\tif (!$suppressPagination)\n\t{\n\t\t// start computing pagination\n\t\tif (!empty($limit) && is_numeric($limit))\n\t\t{\n\t\t\t$pagenum = intval($limitstart / $limit);\n\t\t\t$pagenum++;\n\t\t}\n\t\telse if (!isset($limit) && !empty($limitstart))\n\t\t{\n\t\t\t// only limitstart\n\t\t\tif (strpos($url, 'option=com_content') !== false && strpos($url, 'view=article') !== false)\n\t\t\t{\n\t\t\t\t$pagenum = intval($limitstart + 1); // multipage article\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pagenum = intval($limitstart / $listLimit) + 1; // blogs, tables, ...\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$pagenum = $iteration;\n\t\t}\n\t\t// Make sure we do not end in infite loop here.\n\t\tif ($pagenum < $iteration)\n\t\t\t$pagenum = $iteration;\n\t\t// shumisha added to handle table-category and table-section which may have variable number of items per page\n\t\t// There still will be a problem with filter, which may reduce the total number of items. Thus the item we are looking for\n\t\tif ($sefConfig->alwaysAppendItemsPerPage || (strpos($url, 'option=com_virtuemart') && $sefConfig->shVmUsingItemsPerPage))\n\t\t{\n\t\t\t$shMultPageLength = $sefConfig->pagerep . (empty($limit) ? $listLimit : $limit);\n\t\t}\n\t\telse\n\t\t\t$shMultPageLength = '';\n\t\t// shumisha : modified to add # of items per page to URL, for table-category or section-category\n\n\t\tif (!empty($sefConfig->pageTexts[$pageInfo->currentLanguageTag])\n\t\t\t&& (false !== strpos($sefConfig->pageTexts[$pageInfo->currentLanguageTag], '%s'))\n\t\t)\n\t\t{\n\t\t\t$page = str_replace('%s', $pagenum, $sefConfig->pageTexts[$pageInfo->currentLanguageTag]) . $shMultPageLength;\n\t\t\tif ($sefConfig->LowerCase)\n\t\t\t{\n\t\t\t\t$page = JString::strtolower($page);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$page = $sefConfig->pagerep . $pagenum . $shMultPageLength;\n\t\t}\n\n\t\t// V 1.2.4.t special processing to replace page number by headings\n\t\t$shPageNumberWasReplaced = false;\n\t\tif (strpos($url, 'option=com_content') !== false && strpos($url, 'view=article') !== false && !empty($limitstart))\n\t\t{\n\t\t\t// this is multipage article - limitstart instead of limit in J1.5\n\t\t\tif ($sefConfig->shMultipagesTitle)\n\t\t\t{\n\t\t\t\tparse_str($url, $shParams);\n\t\t\t\tif (!empty($shParams['id']))\n\t\t\t\t{\n\t\t\t\t\t$shPageTitle = '';\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t$contentElement = ShlDbHelper::selectObject('#__content', array('id', 'fulltext', 'introtext'),\n\t\t\t\t\t\t\tarray('id' => $shParams['id']));\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception $e)\n\t\t\t\t\t{\n\t\t\t\t\t\tJError::raise(E_ERROR, 500, $e->getMessage());\n\t\t\t\t\t}\n\t\t\t\t\t$contentText = $contentElement->introtext . $contentElement->fulltext;\n\t\t\t\t\tif (!empty($contentElement) && (strpos($contentText, 'class=\"system-pagebreak') !== false))\n\t\t\t\t\t{\n\t\t\t\t\t\t// search for mospagebreak tags\n\t\t\t\t\t\t// copied over from pagebreak plugin\n\t\t\t\t\t\t// expression to search for\n\t\t\t\t\t\t$regex = '#<hr([^>]*)class=(\\\"|\\')system-pagebreak(\\\"|\\')([^>]*)\\/>#iU';\n\t\t\t\t\t\t// find all instances of mambot and put in $matches\n\t\t\t\t\t\t$shMatches = array();\n\t\t\t\t\t\tpreg_match_all($regex, $contentText, $shMatches, PREG_SET_ORDER);\n\t\t\t\t\t\t// adds heading or title to <site> Title\n\t\t\t\t\t\tif (empty($limitstart))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// if first page use heading of first mospagebreak\n\t\t\t\t\t\t\t/* if ( $shMatches[0][2] ) {\n\t\t\t\t\t\t\t parse_str( html_entity_decode( $shMatches[0][2] ), $args );\n\t\t\t\t\t\t\tif ( @$args['heading'] ) {\n\t\t\t\t\t\t\t$shPageTitle = stripslashes( $args['heading'] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{ // for other pages use title of mospagebreak\n\t\t\t\t\t\t\tif ($limitstart > 0 && $shMatches[$limitstart - 1][1])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$args = JUtility::parseAttributes($shMatches[$limitstart - 1][0]);\n\t\t\t\t\t\t\t\tif (@$args['title'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$shPageTitle = $args['title'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse if (@$args['alt'])\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$shPageTitle = $args['alt'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{ // there is a page break, but no title. Use a page number\n\t\t\t\t\t\t\t\t\t$shPageTitle = str_replace('%s', $limitstart + 1, $sefConfig->pageTexts[$pageInfo->currentLanguageTag]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (!empty($shPageTitle))\n\t\t\t\t\t{\n\t\t\t\t\t\t// found a heading, we should use that as a Title\n\t\t\t\t\t\t$location .= $shSeparator . titleToLocation($shPageTitle);\n\t\t\t\t\t}\n\t\t\t\t\t$shPageNumberWasReplaced = true; // always set the flag, otherwise we'll a Page-1 added\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// mutiple pages article, but we don't want to use smart title.\n\t\t\t\t// directly use limitstart\n\t\t\t\t$page = str_replace('%s', $limitstart + 1, $sefConfig->pageTexts[$pageInfo->currentLanguageTag]);\n\t\t\t}\n\t\t}\n\t\t// maybe this is a multipage with \"showall=1\"\n\t\tif (strpos($url, 'option=com_content') !== false && strpos($url, 'view=article') !== false && strpos($url, 'showall=1') !== false)\n\t\t{\n\t\t\t// this is multipage article with showall\n\t\t\t$tempTitle = JText::_('All Pages');\n\t\t\t$location .= $shSeparator . titleToLocation($tempTitle);\n\t\t\t$shPageNumberWasReplaced = true; // always set the flag, otherwise we'll a Page-1 added\n\t\t}\n\n\t\t// make sure we remove bad characters\n\t\t$takethese = str_replace('|', '', $sefConfig->friendlytrim);\n\t\t$location = JString::trim($location, $takethese);\n\n\t\t// add page number\n\t\tif (!$shPageNumberWasReplaced\n\t\t\t&& ((!isset($limitstart) && (isset($limit) && $limit != 1 && $limit != $listLimit && $limit != $defaultListLimit)) || !empty($limitstart))\n\t\t)\n\t\t{\n\t\t\t$location .= $shSeparator . $page;\n\t\t}\n\t}\n\t// add suffix\n\t$format = Sh404sefHelperUrl::getUrlVar($url, 'format');\n\t$shouldAddSuffix = empty($format) || $format == 'html';\n\tif ($shouldAddSuffix && !empty($shSuffix) && !empty($location) && $location != '/' && JString::substr($location, -1) != '/')\n\t{\n\t\t$location = $shSuffix == '/' ? $location . $shSuffix : str_replace($shSuffix, '', $location) . $shSuffix;\n\t}\n\n\t// add default index file\n\tif ($sefConfig->addFile)\n\t{\n\t\tif ((empty($shSuffix) || (!empty($shSuffix) && $shouldAddSuffix && JString::subStr($location, -$suffixLength) != $shSuffix)) && JString::substr($location, -1) == '/')\n\t\t{\n\t\t\t$location .= $sefConfig->addFile;\n\t\t}\n\t}\n\treturn JString::ltrim($location, '/');\n}",
"public function pagination_numbers_set(){\n\t\t\t$this->pages_show_array = array();\n\t\t\t$this->pages_show_array['middle'] = array();\n\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t$this->pages_show_array['first'] = null;\n\t\t\t$this->pages_show_array['last'] = null;\n\n\t\t\t\n\t\t\tfor ($i=0; $i < sizeof($this->pages_array) ;$i++){\n\n\t\t\t\t//first iteration\n\t\t\t\tif ($i == 0){\n\t\t\t\t\t//prev\n\t\t\t\t\tif ($this->current_page <= 1){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = $this->total_pages - 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->pages_show_array['prev'] = $this->current_page - 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->current_page > $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['first'] = \"1 ...\";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t\t//last iteration\n\t\t\t\telse if ($i == sizeof($this->pages_array)-1){\n\n\t\t\t\t\tif ($this->current_page < $this->total_pages - $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['last'] = \"...\" . $this->total_pages;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//next\n\t\t\t\t\tif ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->pages_show_array['next'] = $this->current_page + 1;\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t//middle iterations\n\t\t\t\telse {\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (empty($this->pages_show_array['next'])){\n\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t}\n\t\t\t\n\n\t\t}",
"function custom_pagination($numpages = '', $pagerange = '', $paged='') {\n\n if (empty($pagerange)) {\n $pagerange = 2;\n }\n\n /**\n * This first part of our function is a fallback\n * for custom pagination inside a regular loop that\n * uses the global $paged and global $wp_query variables.\n * \n * It's good because we can now override default pagination\n * in our theme, and use this function in default queries\n * and custom queries.\n */\n\n if ($paged == '') {\n global $paged;\n if (empty($paged)) {\n $paged = 1;\n }\n }\n if ($numpages == '') {\n global $wp_query;\n $numpages = $wp_query->max_num_pages;\n if(!$numpages) {\n $numpages = 1;\n }\n }\n\n /** \n * We construct the pagination arguments to enter into our paginate_links\n * function. \n */\n\n $pagination_args = array(\n 'base' => get_pagenum_link(1) . '%_%',\n 'format' => 'page/%#%',\n 'total' => $numpages,\n 'current' => $paged,\n 'show_all' => false,\n 'end_size' => 1,\n 'mid_size' => $pagerange,\n 'prev_next' => true,\n 'prev_text' => __('◄'),\n 'next_text' => __('►'),\n 'type' => 'plain',\n 'add_args' => true,\n 'add_fragment' => '',\n 'after_page_number' => '',\n 'before_page_number' =>'',\n );\n $paginate_links = paginate_links($pagination_args);\n\n if ( $paginate_links ) {\n echo \"<nav class='custom-pagination'>\";\n //echo \"<span class='page-numbers page-num'>Page \" . $paged . \" of \" . $numpages . \"</span> \";\n echo $paginate_links;\n echo \"</nav>\";\n }\n }",
"function getPaginator()\n{\n/// getPaginator Function Code Starts ///\n $per_page = 6;\n global $db;\n $aWhere = array();\n $aPath = '';\n/// Manufacturers Code Starts ///\n if (isset($_REQUEST['man']) && is_array($_REQUEST['man'])) {\n foreach ($_REQUEST['man'] as $sKey => $sVal) {\n if ((int) $sVal != 0) {\n $aWhere[] = 'manufacturer_id=' . (int) $sVal;\n $aPath .= 'man[]=' . (int) $sVal . '&';\n }\n }\n }\n/// Manufacturers Code Ends ///\n /// Products Categories Code Starts ///\n if (isset($_REQUEST['p_cat']) && is_array($_REQUEST['p_cat'])) {\n foreach ($_REQUEST['p_cat'] as $sKey => $sVal) {\n if ((int) $sVal != 0) {\n $aWhere[] = 'p_cat_id=' . (int) $sVal;\n $aPath .= 'p_cat[]=' . (int) $sVal . '&';\n }\n }\n }\n/// Products Categories Code Ends ///\n /// Categories Code Starts ///\n if (isset($_REQUEST['cat']) && is_array($_REQUEST['cat'])) {\n foreach ($_REQUEST['cat'] as $sKey => $sVal) {\n if ((int) $sVal != 0) {\n $aWhere[] = 'cat_id=' . (int) $sVal;\n $aPath .= 'cat[]=' . (int) $sVal . '&';\n }\n }\n }\n/// Categories Code Ends ///\n $sWhere = (count($aWhere) > 0 ? ' WHERE ' . implode(' or ', $aWhere) : '');\n $query = \"select * from products \" . $sWhere;\n $result = mysqli_query($db, $query);\n $total_records = mysqli_num_rows($result);\n $total_pages = ceil($total_records / $per_page);\n echo \"<li><a href='shop.php?page=1\";\n if (!empty($aPath)) {\n echo \"&\" . $aPath;\n }\n echo \"' >\" . 'First Page' . \"</a></li>\";\n for ($i = 1; $i <= $total_pages; $i++) {\n echo \"<li><a href='shop.php?page=\" . $i . (!empty($aPath) ? '&' . $aPath : '') . \"' >\" . $i . \"</a></li>\";\n }\n ;\n echo \"<li><a href='shop.php?page=$total_pages\";\n if (!empty($aPath)) {\n echo \"&\" . $aPath;\n }\n echo \"' >\" . 'Last Page' . \"</a></li>\";\n/// getPaginator Function Code Ends ///\n}",
"function paging_2($str,$width,$course)\n{\n global $currenttotal,$limit,$offset,$showed,$last,$PHP_SELF,$align;\n\n if($currenttotal>0)\n {\n #### PAGING STARTS\n print \"<table width='$width' cellpadding='2' cellspacing='0' align='right'>\";\n\tprint \"<tr>\";\n\t#---------------------------------------\n print \"<td width='30%' valign='top' align='right'>\";\n if($offset>=$limit)\n print \"<a href='$PHP_SELF?offset=$last¤ttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>Previous</a> \";\n\tif(isset($align))\n\t{\n print \"<span class='astro'>Pic:</span> \";\n\t}\n\telse\n\t{\n print \"<span class='gottopage' style='font-size:12px'>Page:</span> \";\n\t}\n\t$pages=$currenttotal%$limit;\n\tif($pages==0)\n $pages=$currenttotal/$limit;\n\telse\n\t{\n $pages=$currenttotal/$limit;\n $pages=(int)$pages+1;\n\t}\t\t\n\t$m=\"0\";\n\tfor($i=1;$i<=$pages;$i++)\n\t{\n $pageoff=($i-1)*$limit;\n if($showed==($i*$limit))\n {\n\t\tprint \"<span class'pagingtext' style='font-size:12px'>$i </span> \";\n }\n else\n {\n\t\tprint \"<a href='$PHP_SELF?offset=$pageoff¤ttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>$i</a> \";\n }\n if($m==\"29\")\n {\n\t\t$m=\"0\";\n\t\tprint \"<br>\";\n }\n\t\t$m++;\n\t}\n\t#---------------------------------------\n\tprint \" <a href='$PHP_SELF?offset=$showed¤ttotal=$currenttotal&course=\".$course.\"' class='pagingtextlink' style='font-size:12px'>\";\n\tif($showed<$currenttotal)\n print \"Next</a>\";\n\tprint \"</td>\";\n\t#---------------------------------------\n\tprint \"</tr>\";\n\tprint \"</table><br>\";\n#### PAGING ENDS\n }\n\n}",
"function magillDev_pagination()\n{\n\tglobal $wp_query;\n\t$big = 999999999;\n\techo paginate_links(array(\n\t\t'base' => str_replace($big, '%#%', get_pagenum_link($big)),\n\t\t'format' => '?paged=%#%',\n\t\t'current' => max(1, get_query_var('paged')),\n\t\t'total' => $wp_query->max_num_pages\n\t));\n}",
"public function getChapitresPage($start, $perPage, $id_membre)\n {\n if(isset($_POST['parPage']) && !empty($_POST['parPage']) && ctype_digit($_POST['parPage']) == 1)\n {\n $perPage = $_POST['parPage'];\n }\n else\n {\n $perPage = 4;\n }\n\n $total = $this->chapitre->getCount();\n $total = intval($total[0]);\n $perPage = intval($perPage);\n $nbPage = ceil($total/$perPage); \n $categories = $this->category->getCategories();\n $nb_articles = $this->caddie->getNbArticles($id_membre);\n \n\n \n if(isset($_GET['page']) && !empty($_GET['page']) && ctype_digit($_GET['page']) == 1)\n {\n if($_GET['page'] > $nbPage)\n {\n $current = $nbPage; \n }\n else\n {\n $current = $_GET['page']; \n }\n }\n else\n {\n $current = 1;\n }\n $start = ($current-1)*$perPage;\n $chapitres = $this->chapitre->getChapitresPage($start, $perPage);\n\n require ('views/allBlogView.php');\n }"
] | [
"0.8485992",
"0.79322016",
"0.7763516",
"0.7741167",
"0.77384055",
"0.7724328",
"0.7690332",
"0.7616799",
"0.76094365",
"0.7571506",
"0.7429983",
"0.74229145",
"0.74229145",
"0.7403203",
"0.73856395",
"0.7357314",
"0.7327077",
"0.7308424",
"0.7286956",
"0.7277868",
"0.72676677",
"0.7260214",
"0.72466385",
"0.7245373",
"0.724447",
"0.7221733",
"0.7219338",
"0.7192713",
"0.71910846",
"0.7190732",
"0.71651834",
"0.71266603",
"0.71266454",
"0.71224105",
"0.71166307",
"0.71147984",
"0.710642",
"0.70850694",
"0.7060169",
"0.7057631",
"0.7042532",
"0.7033885",
"0.70309407",
"0.70303065",
"0.702372",
"0.70227605",
"0.6999473",
"0.69923186",
"0.6953962",
"0.6917505",
"0.6916184",
"0.6900099",
"0.68959063",
"0.6885737",
"0.68846303",
"0.6871741",
"0.6871257",
"0.6871173",
"0.68687266",
"0.6857322",
"0.68488836",
"0.68488836",
"0.6844523",
"0.6838884",
"0.68352336",
"0.6820106",
"0.6819101",
"0.68150693",
"0.68018967",
"0.6792299",
"0.679043",
"0.6787316",
"0.678487",
"0.67838085",
"0.6781173",
"0.6775005",
"0.67470604",
"0.6745253",
"0.67437905",
"0.67434376",
"0.67341745",
"0.67337334",
"0.6730265",
"0.67278826",
"0.67259264",
"0.6724548",
"0.67181295",
"0.67132527",
"0.67112726",
"0.6710931",
"0.670213",
"0.67014885",
"0.67003995",
"0.66992384",
"0.6698167",
"0.66940916",
"0.6689097",
"0.66841984",
"0.66836965",
"0.6679281",
"0.66783077"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.